diff --git a/crates/search/src/project_search.rs b/crates/search/src/project_search.rs index 992f9b143b..7a4f1ad1a7 100644 --- a/crates/search/src/project_search.rs +++ b/crates/search/src/project_search.rs @@ -1230,7 +1230,7 @@ impl ProjectSearchBar { cx: &mut ViewContext, ) -> AnyElement { 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::::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.rs index 4766f636f3..db6785c6fd 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, + pub editor_icon: IconStyle, } #[derive(Clone, Deserialize, Default, JsonSchema)] diff --git a/styles/src/style_tree/search.ts b/styles/src/style_tree/search.ts index 43689c01bc..c2357f53b6 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 } + } + } } }