From 19a427447394908b01f89dcadfe4e0fe873d0607 Mon Sep 17 00:00:00 2001 From: TomZz Date: Sun, 14 Jun 2026 23:32:32 +0800 Subject: [PATCH] feat: enhance UI for active tabs and settings dialog - Active Tab: Now uses `FontWeight::BOLD`, `text_base()` font size, and the primary theme color. This makes it far more distinct from inactive tabs, especially in themes where background differences are subtle. - Settings Dialog: Overrode the default sidebar style to use the main dialog background (`cx.theme().background`), seamlessly blending the sidebar with the content pane. - Refactor: Renamed unused `_cx` parameter to `cx` in the settings dialog render closure since it is now being utilized to access the theme. --- src/app/dialogs.rs | 3 ++- src/app/ui.rs | 10 +++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/app/dialogs.rs b/src/app/dialogs.rs index b8713f1..1ef0143 100644 --- a/src/app/dialogs.rs +++ b/src/app/dialogs.rs @@ -871,7 +871,7 @@ impl Ashell { .h(px(560.)) .content({ let view = view.clone(); - move |content, _window, _cx| { + move |content, _window, cx| { use gpui_component::setting::{Settings, SettingPage, SettingGroup, SettingItem, SettingField}; use gpui::IntoElement; let version = env!("CARGO_PKG_VERSION"); @@ -880,6 +880,7 @@ impl Ashell { content.child( Settings::new("settings") .sidebar_width(px(180.)) + .sidebar_style(div().bg(cx.theme().background).style()) .page( SettingPage::new(t!("settings_general").to_string()) .icon(IconName::Settings) diff --git a/src/app/ui.rs b/src/app/ui.rs index aa88080..0c326e9 100644 --- a/src/app/ui.rs +++ b/src/app/ui.rs @@ -1470,7 +1470,15 @@ impl Ashell { .h(px(32.)) .bg(dot_color), ) - .label(label) + .child( + div() + .when(ix == selected, |this| { + this.font_weight(FontWeight::BOLD) + .text_color(cx.theme().primary) + .text_base() + }) + .child(label), + ) .on_click(cx.listener( move |this, _, window, cx| { this.activate_group(