settings_ui: Fix settings window doesn't inherit Zed icon (#41031)

Smit Barmase created

Closes #40946

Release Notes:

- N/A

Change summary

Cargo.lock                            | 1 +
crates/settings_ui/Cargo.toml         | 1 +
crates/settings_ui/src/settings_ui.rs | 3 +++
3 files changed, 5 insertions(+)

Detailed changes

Cargo.lock 🔗

@@ -15334,6 +15334,7 @@ dependencies = [
  "picker",
  "pretty_assertions",
  "project",
+ "release_channel",
  "schemars 1.0.4",
  "search",
  "serde",

crates/settings_ui/Cargo.toml 🔗

@@ -28,6 +28,7 @@ menu.workspace = true
 paths.workspace = true
 picker.workspace = true
 project.workspace = true
+release_channel.workspace = true
 schemars.workspace = true
 search.workspace = true
 serde.workspace = true

crates/settings_ui/src/settings_ui.rs 🔗

@@ -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)),