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.
This commit is contained in:
TomZz
2026-06-14 23:34:01 +08:00
parent 4bb3bee6c8
commit 19a4274473
2 changed files with 11 additions and 2 deletions
+2 -1
View File
@@ -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)
+9 -1
View File
@@ -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(