feat(window): use the frameless title bar on Linux (#279)

Linux windows used the GTK menu bar and the system title bar, unlike the frameless main toolbar on Windows.

Linux project and Settings windows now turn off decorations, install no GTK menu bar and draw the main menu and caption buttons in the title bar.

Co-authored-by: xRookieFight <[email protected]>
Цей коміт міститься в:
xRookieFightтаxRookieFight authored and GitHub committed 2026-10-31 12:43:01 +08:00
1 джерело cbdc177bbc
коміт a553dafa7a
8 files changed
+30 -12

No files matched your search

+3 -3
Переглянути файл
@@ -1173,10 +1173,10 @@ pub fn model(spec: &[Entry], recent: &[RecentItem], config: &MenuConfig) -> Vec<
out
}
/// Whether the OS menu bar is used. Windows project windows draw IDEA's
/// hamburger menu in their own title bar instead.
/// Whether the OS menu bar is used. Windows and Linux project windows are
/// frameless and draw IDEA's hamburger menu in their own title bar instead.
pub fn native_menu_bar() -> bool {
!cfg!(target_os = "windows")
cfg!(target_os = "macos")
}
/// Rebuilds and installs the app menu from the current config and recent list.
+1 -1
Переглянути файл
@@ -724,7 +724,7 @@ pub fn open_settings_window(
let mut config = window_config(app)?;
config.label = label.clone();
config.title = "Settings".into();
// Frameless on Windows like project windows (tauri.windows.conf.json): the page draws
// Frameless on Windows and Linux like project windows (tauri.<os>.conf.json): the page draws
// the title bar in the app theme instead of a system caption that follows the OS theme.
(config.width, config.height) = SETTINGS_SIZE;
(config.min_width, config.min_height) = (Some(SETTINGS_MIN_SIZE.0), Some(SETTINGS_MIN_SIZE.1));