From 34fbffb4cc339776b932912b01f1a79e5b5eb45a Mon Sep 17 00:00:00 2001 From: Mikayla Maki Date: Tue, 28 Feb 2023 22:48:31 -0800 Subject: [PATCH 1/3] Fix tab bar x --- styles/src/styleTree/tabBar.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/styles/src/styleTree/tabBar.ts b/styles/src/styleTree/tabBar.ts index c06195f4816039bae12f66c3b06fe3bb78f35f5c..80afadaaee8ecfe378eff410feade699f45b9dbf 100644 --- a/styles/src/styleTree/tabBar.ts +++ b/styles/src/styleTree/tabBar.ts @@ -24,7 +24,7 @@ export default function tabBar(colorScheme: ColorScheme) { spacing: 8, // Close icons - iconWidth: 14, + iconWidth: 8, iconClose: foreground(layer, "variant"), iconCloseActive: foreground(layer, "hovered"), From 8734bd8435448c6a230508742276b18134554558 Mon Sep 17 00:00:00 2001 From: Mikayla Maki Date: Wed, 1 Mar 2023 00:18:45 -0800 Subject: [PATCH 2/3] Seperate out x-mark width --- crates/search/src/project_search.rs | 2 +- crates/terminal_view/src/terminal_view.rs | 2 +- crates/theme/src/theme.rs | 3 ++- crates/workspace/src/pane.rs | 2 +- crates/workspace/src/shared_screen.rs | 2 +- styles/src/styleTree/tabBar.ts | 5 ++++- 6 files changed, 10 insertions(+), 6 deletions(-) diff --git a/crates/search/src/project_search.rs b/crates/search/src/project_search.rs index e48d78e84fc14282b6df971e5617b7a375f83fdf..0a250cfe2b7953958089d1d85c094bf9d49630f8 100644 --- a/crates/search/src/project_search.rs +++ b/crates/search/src/project_search.rs @@ -253,7 +253,7 @@ impl Item for ProjectSearchView { Svg::new("icons/magnifying_glass_12.svg") .with_color(tab_theme.label.text.color) .constrained() - .with_width(tab_theme.icon_width) + .with_width(tab_theme.type_icon_width) .aligned() .contained() .with_margin_right(tab_theme.spacing) diff --git a/crates/terminal_view/src/terminal_view.rs b/crates/terminal_view/src/terminal_view.rs index 7400950c3b8c1f59287df406a8fb6f86df44681c..3821185ec02e9d1981162863efa1a1708c9e3f97 100644 --- a/crates/terminal_view/src/terminal_view.rs +++ b/crates/terminal_view/src/terminal_view.rs @@ -585,7 +585,7 @@ impl Item for TerminalView { gpui::elements::Svg::new("icons/terminal_12.svg") .with_color(tab_theme.label.text.color) .constrained() - .with_width(tab_theme.icon_width) + .with_width(tab_theme.type_icon_width) .aligned() .contained() .with_margin_right(tab_theme.spacing) diff --git a/crates/theme/src/theme.rs b/crates/theme/src/theme.rs index 06122b9dda91600714d48d0778ffc14dd8a04de1..cc1781d8b2433a269cec63b52be1293455a8fcf4 100644 --- a/crates/theme/src/theme.rs +++ b/crates/theme/src/theme.rs @@ -215,7 +215,8 @@ pub struct Tab { pub label: LabelStyle, pub description: ContainedText, pub spacing: f32, - pub icon_width: f32, + pub close_icon_width: f32, + pub type_icon_width: f32, pub icon_close: Color, pub icon_close_active: Color, pub icon_dirty: Color, diff --git a/crates/workspace/src/pane.rs b/crates/workspace/src/pane.rs index 2e5565ea63f5dd5d7dea68aed931cc6322762402..22df4de7c46dd542514d84da174c636c909a183a 100644 --- a/crates/workspace/src/pane.rs +++ b/crates/workspace/src/pane.rs @@ -1355,7 +1355,7 @@ impl Pane { } else { Empty::new().boxed() }) - .with_width(tab_style.icon_width) + .with_width(tab_style.close_icon_width) .boxed(), ) .boxed(), diff --git a/crates/workspace/src/shared_screen.rs b/crates/workspace/src/shared_screen.rs index 43e7f24f627f23ae9b7507077f512a65c93068a2..8d6e8c91047cc8facfac853b06233a0af030770c 100644 --- a/crates/workspace/src/shared_screen.rs +++ b/crates/workspace/src/shared_screen.rs @@ -108,7 +108,7 @@ impl Item for SharedScreen { Svg::new("icons/disable_screen_sharing_12.svg") .with_color(style.label.text.color) .constrained() - .with_width(style.icon_width) + .with_width(style.type_icon_width) .aligned() .contained() .with_margin_right(style.spacing) diff --git a/styles/src/styleTree/tabBar.ts b/styles/src/styleTree/tabBar.ts index 80afadaaee8ecfe378eff410feade699f45b9dbf..8067003cb2057bab6a90ec4a68d4110143e43597 100644 --- a/styles/src/styleTree/tabBar.ts +++ b/styles/src/styleTree/tabBar.ts @@ -23,8 +23,11 @@ export default function tabBar(colorScheme: ColorScheme) { }, spacing: 8, + // Tab type icons (e.g. Project Search) + typeIconWidth: 14, + // Close icons - iconWidth: 8, + closeIconWidth: 14, iconClose: foreground(layer, "variant"), iconCloseActive: foreground(layer, "hovered"), From 9f86ca85747186a13c2c27114cd2f27c90b76040 Mon Sep 17 00:00:00 2001 From: Mikayla Maki Date: Thu, 2 Mar 2023 15:48:31 -0800 Subject: [PATCH 3/3] Update tabBar.ts --- styles/src/styleTree/tabBar.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/styles/src/styleTree/tabBar.ts b/styles/src/styleTree/tabBar.ts index 8067003cb2057bab6a90ec4a68d4110143e43597..61d30be7e03c8eceb026ea3f0fa1c39eab9cca60 100644 --- a/styles/src/styleTree/tabBar.ts +++ b/styles/src/styleTree/tabBar.ts @@ -27,7 +27,7 @@ export default function tabBar(colorScheme: ColorScheme) { typeIconWidth: 14, // Close icons - closeIconWidth: 14, + closeIconWidth: 8, iconClose: foreground(layer, "variant"), iconCloseActive: foreground(layer, "hovered"),