tabs: use relative line height for tab labels
This commit is contained in:
@@ -7,7 +7,7 @@ use gpui::{
|
|||||||
AnyElement, App, AppContext as _, Bounds, ClickEvent, Context, Div, ElementId, Global,
|
AnyElement, App, AppContext as _, Bounds, ClickEvent, Context, Div, ElementId, Global,
|
||||||
InteractiveElement as _, IntoElement, KeyDownEvent, MouseButton, ParentElement as _, Pixels,
|
InteractiveElement as _, IntoElement, KeyDownEvent, MouseButton, ParentElement as _, Pixels,
|
||||||
Point, Render, RenderOnce, Role, SharedString, Stateful, StatefulInteractiveElement as _,
|
Point, Render, RenderOnce, Role, SharedString, Stateful, StatefulInteractiveElement as _,
|
||||||
Styled as _, Window, canvas, div, px,
|
Styled as _, Window, canvas, div, px, relative,
|
||||||
};
|
};
|
||||||
use gpui_native_core::button::{Button, ButtonVariant};
|
use gpui_native_core::button::{Button, ButtonVariant};
|
||||||
use gpui_native_core::common::{Sizable as _, v_flex};
|
use gpui_native_core::common::{Sizable as _, v_flex};
|
||||||
@@ -1000,6 +1000,7 @@ impl Tab {
|
|||||||
.role(Role::Tab)
|
.role(Role::Tab)
|
||||||
.aria_selected(selected)
|
.aria_selected(selected)
|
||||||
.text_color(label_color)
|
.text_color(label_color)
|
||||||
|
.line_height(relative(1.0))
|
||||||
.when(!self.disabled && !active, |strip_tab| {
|
.when(!self.disabled && !active, |strip_tab| {
|
||||||
strip_tab.hover(|strip_tab| strip_tab.bg(theme.colors.muted))
|
strip_tab.hover(|strip_tab| strip_tab.bg(theme.colors.muted))
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user