tabs: simplify selected strip tab styling

This commit is contained in:
2026-11-15 11:17:15 +07:00
parent 45ea41b93b
commit 032158fc01
3 changed files with 7 additions and 9 deletions
+3
View File
@@ -109,7 +109,10 @@ impl RenderOnce for Panel {
.flex_1()
.min_w_0()
.h_full()
// the titlebar's centered tabs leave slack above the strip's
// bottom edge, so the top gutter is narrower to even out.
.p_2()
.pt_1()
.bg(app_background)
.child(row)
}
+3 -4
View File
@@ -7,7 +7,7 @@
use gpui::prelude::FluentBuilder as _;
use gpui::{
AnyElement, App, ElementId, InteractiveElement as _, IntoElement, ParentElement, RenderOnce,
SharedString, Styled as _, Window, div,
SharedString, Styled as _, Window,
};
use gpui_native_theme::{ActiveTheme as _, Size, TRAFFIC_LIGHT_PAD};
use gpui_native_utils::h_flex;
@@ -80,6 +80,7 @@ impl RenderOnce for Titlebar {
.flex_none()
.w_full()
.h(height)
.gap_2()
.bg(app_background)
.px(padding_x)
.when(cfg!(target_os = "macos"), |bar| bar.pl(TRAFFIC_LIGHT_PAD))
@@ -96,12 +97,10 @@ impl RenderOnce for Titlebar {
})
.when_some(self.tab_bar, |bar, tab_bar| {
bar.child(
div()
.flex()
h_flex()
.flex_1()
.min_w_0()
.h_full()
.items_center()
.overflow_hidden()
.when(cfg!(target_os = "windows"), |slot| slot.occlude())
.child(tab_bar),