settings_ui: Fix settings window doesn't inherit Zed icon (#41031)
Closes #40946 Release Notes: - N/A
This commit is contained in:
@@ -13,6 +13,7 @@ use gpui::{
|
||||
};
|
||||
use heck::ToTitleCase as _;
|
||||
use project::{Project, WorktreeId};
|
||||
use release_channel::ReleaseChannel;
|
||||
use schemars::JsonSchema;
|
||||
use serde::Deserialize;
|
||||
use settings::{Settings, SettingsContent, SettingsStore};
|
||||
@@ -579,6 +580,7 @@ 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 app_id = ReleaseChannel::global(cx).app_id();
|
||||
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,
|
||||
@@ -597,6 +599,7 @@ pub fn open_settings_editor(
|
||||
is_movable: true,
|
||||
kind: gpui::WindowKind::Floating,
|
||||
window_background: cx.theme().window_background_appearance(),
|
||||
app_id: Some(app_id.to_owned()),
|
||||
window_decorations: Some(window_decorations),
|
||||
window_min_size: Some(scaled_bounds),
|
||||
window_bounds: Some(WindowBounds::centered(scaled_bounds, cx)),
|
||||
|
||||
Reference in New Issue
Block a user