Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
added svg right margin in search bar
KCaverly7d5ff60ff01c
diff --git a/crates/search/src/project_search.rs b/crates/search/src/project_search.rsindex 992f9b143b4..7a4f1ad1a74 100644--- a/crates/search/src/project_search.rs+++ b/crates/search/src/project_search.rs@@ -1230,7 +1230,7 @@ impl ProjectSearchBar {cx: &mut ViewContext<Self>,) -> AnyElement<Self> {let tooltip_style = theme::current(cx).tooltip.clone();- let is_active = current_mode == SearchMode::Regex;+ let is_active = current_mode == SearchMode::Regex; //self.is_option_enabled(option, cx);let option = SearchOptions::REGEX;MouseEventHandler::<Self, _>::new(option.bits as usize, cx, |state, cx| {let theme = theme::current(cx);@@ -1405,7 +1405,7 @@ impl View for ProjectSearchBar {let case_sensitive = if is_semantic_disabled {Some(self.render_option_button_icon(- "icons/case_insensitive_14.svg",+ "icons/case_insensitive_12.svg",SearchOptions::CASE_SENSITIVE,cx,))@@ -1424,13 +1424,14 @@ impl View for ProjectSearchBar {};let search = _search.read(cx);+ let icon_style = theme.search.editor_icon.clone();+ // "let query = Flex::row().with_child(- Svg::new("icons/magnifying_glass_12.svg")- .with_color(gpui::color::Color::white())- //.with_color(tab_theme.label.text.color)+ Svg::for_style(icon_style.icon).contained()- .constrained(), //.with_margin_right(tab_theme.spacing),+ .with_style(icon_style.container)+ .constrained(),).with_child(ChildView::new(&search.query_editor, cx)diff --git a/crates/theme/src/theme.rs b/crates/theme/src/theme.rsindex 4766f636f37..db6785c6fd8 100644--- a/crates/theme/src/theme.rs+++ b/crates/theme/src/theme.rs@@ -385,6 +385,7 @@ pub struct Search {pub match_index: ContainedText,pub results_status: TextStyle,pub dismiss_button: Interactive<IconButton>,+ pub editor_icon: IconStyle,}#[derive(Clone, Deserialize, Default, JsonSchema)]diff --git a/styles/src/style_tree/search.ts b/styles/src/style_tree/search.tsindex 43689c01bc5..c2357f53b63 100644--- a/styles/src/style_tree/search.ts+++ b/styles/src/style_tree/search.ts@@ -54,7 +54,7 @@ export default function search(): any {left: 6,right: 6,top: 6,- },+ },},state: {hovered: {@@ -163,5 +163,18 @@ export default function search(): any {},},}),+ editor_icon: {+ icon: {+ color: foreground(theme.highest, "variant"),+ asset: "icons/magnifying_glass_12.svg",+ dimensions: {+ width: 12,+ height: 12,+ }+ },+ container: {+ padding: { right: 6 }+ }+ }}}