settings_ui: Respect window decorations setting (#57371)

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [ ] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Closes #57370

Release Notes:

- Server-side window decorations now also apply to the settings window.
This commit is contained in:
hollmmax 2026-05-21 12:43:52 +02:00 committed by GitHub
parent f15d759bf6
commit 0ec218fa5f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -42,7 +42,8 @@ use ui::{
use util::{ResultExt as _, paths::PathStyle, rel_path::RelPath};
use workspace::{
AppState, MultiWorkspace, OpenOptions, OpenVisible, Workspace, client_side_decorations,
AppState, MultiWorkspace, OpenOptions, OpenVisible, Workspace, WorkspaceSettings,
client_side_decorations,
};
use zed_actions::{OpenProjectSettings, OpenSettings, OpenSettingsAt};
@ -662,7 +663,10 @@ pub fn open_settings_editor(
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,
_ => match WorkspaceSettings::get_global(cx).window_decorations {
settings::WindowDecorations::Server => gpui::WindowDecorations::Server,
settings::WindowDecorations::Client => gpui::WindowDecorations::Client,
},
};
cx.open_window(