settings_ui: Use window controls on Linux (#40706)
Closes #40657 Release Notes: - Added window controls to the settings window on Linux.
This commit is contained in:
@@ -474,6 +474,12 @@ pub fn open_settings_editor(
|
||||
let scale_factor = current_rem_size / default_rem_size;
|
||||
let scaled_bounds: gpui::Size<Pixels> = 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 {
|
||||
@@ -486,6 +492,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()
|
||||
|
||||
Reference in New Issue
Block a user