commit c1ab0ac224b2822d7b1fe1ca564530e6370f19be
parent 93a1a0089d474e0625ca89347d7aaf84b73277df
Author: triesap <tyson@radroots.org>
Date: Sun, 7 Jun 2026 12:40:08 -0700
ui: seat account tab indicator
Diffstat:
1 file changed, 21 insertions(+), 19 deletions(-)
diff --git a/crates/ui/src/primitives.rs b/crates/ui/src/primitives.rs
@@ -317,25 +317,27 @@ pub fn app_underline_tabs(
} else {
inactive_foreground
};
- Tab::new().child(
- div()
- .h_full()
- .flex()
- .flex_col()
- .justify_between()
- .text_size(px(tab_text_px))
- .font_weight(gpui::FontWeight::MEDIUM)
- .text_color(rgb(foreground))
- .child(tab.label)
- .child(
- div()
- .w_full()
- .h(px(2.0))
- .rounded(px(1.0))
- .when(is_selected, |this| this.bg(rgb(active_foreground)))
- .when(!is_selected, |this| this.bg(transparent_black())),
- ),
- )
+
+ let tab_label = div()
+ .text_size(px(tab_text_px))
+ .font_weight(gpui::FontWeight::MEDIUM)
+ .text_color(rgb(foreground))
+ .child(tab.label);
+ let tab = Tab::new().relative().child(tab_label);
+ if is_selected {
+ tab.suffix(
+ div()
+ .absolute()
+ .left_0()
+ .right_0()
+ .bottom_0()
+ .h(px(2.0))
+ .rounded(px(1.0))
+ .bg(rgb(active_foreground)),
+ )
+ } else {
+ tab
+ }
}))
.on_click(on_click)
}