Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Deduplicate tab theme related code
Petros Amoiridis81ece4fd44cc
diff --git a/crates/search/src/project_search.rs b/crates/search/src/project_search.rsindex b2e3c81bc98..04f4b1470a7 100644--- a/crates/search/src/project_search.rs+++ b/crates/search/src/project_search.rs@@ -248,15 +248,15 @@ impl Item for ProjectSearchView {tab_theme: &theme::Tab,cx: &gpui::AppContext,) -> ElementBox {- let settings = cx.global::<Settings>();- let search_theme = &settings.theme.search;Flex::row().with_child(Svg::new("icons/magnifying_glass_12.svg").with_color(tab_theme.label.text.color).constrained()- .with_width(search_theme.tab_icon_width)+ .with_width(tab_theme.icon_width).aligned()+ .contained()+ .with_margin_right(tab_theme.spacing).boxed(),).with_children(self.model.read(cx).active_query.as_ref().map(|query| {@@ -264,8 +264,6 @@ impl Item for ProjectSearchView {Label::new(query_text, tab_theme.label.clone()).aligned()- .contained()- .with_margin_left(search_theme.tab_icon_spacing).boxed()})).boxed()diff --git a/crates/theme/src/theme.rs b/crates/theme/src/theme.rsindex bc338bbe269..72ec15bb22c 100644--- a/crates/theme/src/theme.rs+++ b/crates/theme/src/theme.rs@@ -246,8 +246,6 @@ pub struct Search {pub match_background: Color,pub match_index: ContainedText,pub results_status: TextStyle,- pub tab_icon_width: f32,- pub tab_icon_spacing: f32,pub dismiss_button: Interactive<IconButton>,}diff --git a/styles/src/styleTree/search.ts b/styles/src/styleTree/search.tsindex 2edd3807a53..5d5f2111dc7 100644--- a/styles/src/styleTree/search.ts+++ b/styles/src/styleTree/search.ts@@ -29,8 +29,6 @@ export default function search(colorScheme: ColorScheme) {return {// TODO: Add an activeMatchBackground on the rust side to differenciate between active and inactivematchBackground: withOpacity(foreground(layer, "accent"), 0.4),- tabIconSpacing: 8,- tabIconWidth: 14,optionButton: {...text(layer, "mono", "on"),background: background(layer, "on"),