Repository navigation
v0.10.1
·
114 commits
to master
since this release
Additive Tabs toolbar geometry
No breaking changes. Defaults are identical to 0.10.0: the Md size step is still a 32px-tall box with 16px horizontal padding (a typical label therefore paints a 48px segment), and the Primary tray still insets 4px. The new builders only apply when set.
Signatures
impl TabItem {
pub fn width(self, w: impl Into<Pixels>) -> Self;
pub fn height(self, h: impl Into<Pixels>) -> Self;
pub fn padding_x(self, p: impl Into<Pixels>) -> Self;
}
impl Tabs {
pub fn list_padding(self, padding: impl Into<Pixels>) -> Self;
pub fn hover_fill(self, v: bool) -> Self; // default true
}Reference toolbar shape:
TabItem::new("preview", "Preview")
.trigger(icon)
.width(px(32.))
.height(px(32.))
.padding_x(px(0.))
// ...
Tabs::new(id, items, "preview")
.list_padding(px(0.))
.hover_fill(false)width/height/padding_xare per-tab. An explicit width also wins overfull_widthfor that tab alone and replaces the vertical list's 80px minimum. The sliding indicator measures the fixed box.list_paddingoverrides the Primary tray's uniform inset (Tabs.List className="p-0"). Secondary already has no inset, so the builder is ignored there.hover_fill(false)drops the unselected-tab wash (the port's translation of v3'sopacity-70overlay) and recolours a hovered unselected label to the theme foreground. SVGtriggers still need their owntext_color— gpui svgs do not inherit the tab's, so this hover cannot recolour an icon the caller painted explicitly.
The 0.10.0 paint knobs (TabItem::trigger, Tabs::radius / list_bg / indicator_bg / indicator_shadow) are unchanged.
Full Changelog: v0.10.0...v0.10.1