mirror of
https://github.com/zed-industries/zed.git
synced 2025-02-08 19:43:11 +00:00
added svg right margin in search bar
Co-authored-by: Piotr <piotr@zed.dev>
This commit is contained in:
parent
00a9672eca
commit
7d5ff60ff0
3 changed files with 22 additions and 7 deletions
|
@ -1230,7 +1230,7 @@ impl ProjectSearchBar {
|
||||||
cx: &mut ViewContext<Self>,
|
cx: &mut ViewContext<Self>,
|
||||||
) -> AnyElement<Self> {
|
) -> AnyElement<Self> {
|
||||||
let tooltip_style = theme::current(cx).tooltip.clone();
|
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;
|
let option = SearchOptions::REGEX;
|
||||||
MouseEventHandler::<Self, _>::new(option.bits as usize, cx, |state, cx| {
|
MouseEventHandler::<Self, _>::new(option.bits as usize, cx, |state, cx| {
|
||||||
let theme = theme::current(cx);
|
let theme = theme::current(cx);
|
||||||
|
@ -1405,7 +1405,7 @@ impl View for ProjectSearchBar {
|
||||||
|
|
||||||
let case_sensitive = if is_semantic_disabled {
|
let case_sensitive = if is_semantic_disabled {
|
||||||
Some(self.render_option_button_icon(
|
Some(self.render_option_button_icon(
|
||||||
"icons/case_insensitive_14.svg",
|
"icons/case_insensitive_12.svg",
|
||||||
SearchOptions::CASE_SENSITIVE,
|
SearchOptions::CASE_SENSITIVE,
|
||||||
cx,
|
cx,
|
||||||
))
|
))
|
||||||
|
@ -1424,13 +1424,14 @@ impl View for ProjectSearchBar {
|
||||||
};
|
};
|
||||||
|
|
||||||
let search = _search.read(cx);
|
let search = _search.read(cx);
|
||||||
|
let icon_style = theme.search.editor_icon.clone();
|
||||||
|
// "
|
||||||
let query = Flex::row()
|
let query = Flex::row()
|
||||||
.with_child(
|
.with_child(
|
||||||
Svg::new("icons/magnifying_glass_12.svg")
|
Svg::for_style(icon_style.icon)
|
||||||
.with_color(gpui::color::Color::white())
|
|
||||||
//.with_color(tab_theme.label.text.color)
|
|
||||||
.contained()
|
.contained()
|
||||||
.constrained(), //.with_margin_right(tab_theme.spacing),
|
.with_style(icon_style.container)
|
||||||
|
.constrained(),
|
||||||
)
|
)
|
||||||
.with_child(
|
.with_child(
|
||||||
ChildView::new(&search.query_editor, cx)
|
ChildView::new(&search.query_editor, cx)
|
||||||
|
|
|
@ -385,6 +385,7 @@ pub struct Search {
|
||||||
pub match_index: ContainedText,
|
pub match_index: ContainedText,
|
||||||
pub results_status: TextStyle,
|
pub results_status: TextStyle,
|
||||||
pub dismiss_button: Interactive<IconButton>,
|
pub dismiss_button: Interactive<IconButton>,
|
||||||
|
pub editor_icon: IconStyle,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Deserialize, Default, JsonSchema)]
|
#[derive(Clone, Deserialize, Default, JsonSchema)]
|
||||||
|
|
|
@ -54,7 +54,7 @@ export default function search(): any {
|
||||||
left: 6,
|
left: 6,
|
||||||
right: 6,
|
right: 6,
|
||||||
top: 6,
|
top: 6,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
state: {
|
state: {
|
||||||
hovered: {
|
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 }
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue