feat: unify theme system (#7)
Reviewed-on: #7
This commit was merged in pull request #7.
This commit is contained in:
@@ -16,7 +16,7 @@ use gpui_native_core::scroll_area::{ScrollArea, ScrollAxes};
|
||||
use gpui_native_core::spinner::Spinner;
|
||||
use gpui_native_core::tooltip::Tooltip;
|
||||
use gpui_native_icons::IconRole;
|
||||
use gpui_native_theme::{ActiveTheme as _, POPUP_MAX_HEIGHT, Size};
|
||||
use gpui_native_theme::{ActiveTheme as _, POPUP_MAX_HEIGHT, Size, TAB_INDICATOR_WIDTH};
|
||||
use gpui_native_utils::{StyledExt as _, adjacent_selectable};
|
||||
|
||||
/// Reports the next selected tab by pointer and keys.
|
||||
@@ -609,7 +609,7 @@ impl Tabs {
|
||||
})
|
||||
.flex()
|
||||
.items_center()
|
||||
.gap_1p5()
|
||||
.gap_2()
|
||||
.cursor_pointer()
|
||||
.role(Role::Tab)
|
||||
.aria_selected(selected)
|
||||
@@ -624,7 +624,7 @@ impl Tabs {
|
||||
.py_1()
|
||||
.rounded_tl(theme.radius.sm)
|
||||
.rounded_tr(theme.radius.sm)
|
||||
.border_b_2()
|
||||
.border_b(TAB_INDICATOR_WIDTH)
|
||||
.border_color(gpui::transparent_black())
|
||||
.when(active, |chip| chip.border_color(theme.ramps.primary.base)),
|
||||
TabsVariant::Pill => chip
|
||||
@@ -1019,7 +1019,7 @@ impl Tab {
|
||||
})
|
||||
.flex()
|
||||
.items_center()
|
||||
.gap_1p5()
|
||||
.gap_2()
|
||||
.role(Role::Tab)
|
||||
.aria_selected(selected)
|
||||
.text_color(label_color)
|
||||
@@ -1033,7 +1033,7 @@ impl Tab {
|
||||
.py_1()
|
||||
.rounded_tl(theme.radius.sm)
|
||||
.rounded_tr(theme.radius.sm)
|
||||
.border_b_2()
|
||||
.border_b(TAB_INDICATOR_WIDTH)
|
||||
.border_color(gpui::transparent_black())
|
||||
.when(active, |strip_tab| {
|
||||
strip_tab.border_color(theme.ramps.primary.base)
|
||||
@@ -1072,9 +1072,9 @@ impl Tab {
|
||||
div()
|
||||
.absolute()
|
||||
.left_0()
|
||||
.top(px(2.0))
|
||||
.bottom(px(2.0))
|
||||
.w(px(2.0))
|
||||
.top(TAB_INDICATOR_WIDTH)
|
||||
.bottom(TAB_INDICATOR_WIDTH)
|
||||
.w(TAB_INDICATOR_WIDTH)
|
||||
.rounded(theme.radius.sm)
|
||||
.bg(theme.ramps.primary.base),
|
||||
)
|
||||
@@ -1201,7 +1201,7 @@ impl Tab {
|
||||
Button::new((self.key.clone(), "tab-close"))
|
||||
.icon(IconRole::Close)
|
||||
.variant(ButtonVariant::Ghost)
|
||||
.small()
|
||||
.xsmall()
|
||||
.tab_stop(false)
|
||||
.debug_selector({
|
||||
let tabs_id = tabs_id.clone();
|
||||
|
||||
Reference in New Issue
Block a user