mirror of
https://github.com/rust-kotlin/ashell.git
synced 2026-09-22 08:01:00 +00:00
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:
+2
-1
@@ -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
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user