From 23b728a762917931d29c73641f6a2f7b34fcca05 Mon Sep 17 00:00:00 2001 From: GyDi Date: Mon, 16 Jan 2023 22:57:53 +0800 Subject: [PATCH] feat: adjust macOS window style --- src-tauri/src/utils/resolve.rs | 7 ++++++- src/assets/styles/layout.scss | 11 +++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/src-tauri/src/utils/resolve.rs b/src-tauri/src/utils/resolve.rs index 94579bb..f926293 100644 --- a/src-tauri/src/utils/resolve.rs +++ b/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 diff --git a/src/assets/styles/layout.scss b/src/assets/styles/layout.scss index 0727042..3d16c86 100644 --- a/src/assets/styles/layout.scss +++ b/src/assets/styles/layout.scss @@ -104,3 +104,14 @@ } } } + +.macos { + &.layout { + .layout__left { + padding-top: 24px; + } + .layout__right .the-content { + top: 20px; + } + } +}