Prechádzať zdrojové kódy

feat: adjust macOS window style

GyDi 2 rokov pred
rodič
commit
23b728a762

+ 6 - 1
src-tauri/src/utils/resolve.rs

@@ -94,7 +94,12 @@ pub fn create_window(app_handle: &AppHandle) {
     }
 
     #[cfg(target_os = "macos")]
-    crate::log_err!(builder.decorations(true).inner_size(800.0, 642.0).build());
+    crate::log_err!(builder
+        .decorations(true)
+        .inner_size(800.0, 642.0)
+        .hidden_title(true)
+        .title_bar_style(tauri::TitleBarStyle::Overlay)
+        .build());
 
     #[cfg(target_os = "linux")]
     crate::log_err!(builder

+ 11 - 0
src/assets/styles/layout.scss

@@ -104,3 +104,14 @@
     }
   }
 }
+
+.macos {
+  &.layout {
+    .layout__left {
+      padding-top: 24px;
+    }
+    .layout__right .the-content {
+      top: 20px;
+    }
+  }
+}