From aba8221521e2efcaca1ec585d2b87d3133fc1c48 Mon Sep 17 00:00:00 2001 From: Smit Barmase Date: Mon, 20 Oct 2025 07:53:49 -0700 Subject: [PATCH] settings_ui: Use window controls on Linux (#40706) Closes #40657 Release Notes: - Added window controls to the settings window on Linux. --- crates/settings_ui/src/settings_ui.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/crates/settings_ui/src/settings_ui.rs b/crates/settings_ui/src/settings_ui.rs index bba39105d5612159bbe6f1237a4187853bc9d5a3..ecffb284fb4f0b7068f999284e665af6411f61cd 100644 --- a/crates/settings_ui/src/settings_ui.rs +++ b/crates/settings_ui/src/settings_ui.rs @@ -473,6 +473,12 @@ pub fn open_settings_editor( let scale_factor = current_rem_size / default_rem_size; let scaled_bounds: gpui::Size = default_bounds.map(|axis| axis * scale_factor); + let window_decorations = match std::env::var("ZED_WINDOW_DECORATIONS") { + Ok(val) if val == "server" => gpui::WindowDecorations::Server, + Ok(val) if val == "client" => gpui::WindowDecorations::Client, + _ => gpui::WindowDecorations::Client, + }; + cx.open_window( WindowOptions { titlebar: Some(TitlebarOptions { @@ -485,6 +491,7 @@ pub fn open_settings_editor( is_movable: true, kind: gpui::WindowKind::Floating, window_background: cx.theme().window_background_appearance(), + window_decorations: Some(window_decorations), window_min_size: Some(scaled_bounds), window_bounds: Some(WindowBounds::centered(scaled_bounds, cx)), ..Default::default()