app

Local-first trade for farms and co-ops
git clone https://radroots.dev/git/app.git
Log | Files | Refs | README | LICENSE

commit 7d27910ea49e1633563f66ab9830cd998868e290
parent 3e068732f42023addc84d17f346ff97ced69eba5
Author: triesap <tyson@radroots.org>
Date:   Sun,  7 Jun 2026 12:33:43 -0700

ui: tune account underline tabs

Diffstat:
Mcrates/desktop/src/window.rs | 4++--
Mcrates/ui/src/primitives.rs | 20+++++++++++++++++++-
2 files changed, 21 insertions(+), 3 deletions(-)

diff --git a/crates/desktop/src/window.rs b/crates/desktop/src/window.rs @@ -5006,7 +5006,7 @@ impl HomeView { .max_w(px(APP_UI_THEME.shells.home_card_max_width_px)) .mx_auto() .child(app_text_value(app_shared_text(AppTextKey::AccountTitle))) - .child(app_surface_card( + .child( app_stack_v(APP_UI_THEME.shells.home_stack_gap_px) .w_full() .child(app_underline_tabs( @@ -5018,7 +5018,7 @@ impl HomeView { }), )) .child(account_placeholder_panel(selected_tab.panel_text_key())), - )) + ) .into_any_element() } } diff --git a/crates/ui/src/primitives.rs b/crates/ui/src/primitives.rs @@ -302,12 +302,30 @@ pub fn app_underline_tabs( selected_index: usize, on_click: impl Fn(&usize, &mut Window, &mut App) + 'static, ) -> impl IntoElement { + let tab_text_px = APP_UI_THEME.foundation.typography.body_text_px + 1.0; + let active_foreground = APP_UI_THEME.components.app_button.primary_colors.background; + let inactive_foreground = APP_UI_THEME.foundation.text.secondary; + TabBar::new(id) .underline() .with_size(Size::Medium) .w_full() .selected_index(selected_index) - .children(tabs.into_iter().map(|tab| Tab::new().label(tab.label))) + .children(tabs.into_iter().enumerate().map(|(index, tab)| { + let foreground = if index == selected_index { + active_foreground + } else { + inactive_foreground + }; + + Tab::new().child( + div() + .text_size(px(tab_text_px)) + .font_weight(gpui::FontWeight::MEDIUM) + .text_color(rgb(foreground)) + .child(tab.label), + ) + })) .on_click(on_click) }