Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Increase padding on search
Piotr Osiewiczb2f773e91dd3
diff --git a/crates/search/src/project_search.rs b/crates/search/src/project_search.rsindex 52797aa8db3..a3ae61f0a88 100644--- a/crates/search/src/project_search.rs+++ b/crates/search/src/project_search.rs@@ -1616,7 +1616,6 @@ impl View for ProjectSearchBar {).with_children(filters).contained()- .with_style(theme.search.container).aligned().top().flex(1., false),@@ -1643,7 +1642,6 @@ impl View for ProjectSearchBar {.constrained().with_height(theme.workspace.toolbar.height).contained()- .with_style(theme.search.container).aligned().right().top()@@ -1659,7 +1657,7 @@ impl View for ProjectSearchBar {.flex(1., true),).contained()- .with_uniform_padding(theme.workspace.toolbar.height / 3.)+ .with_style(theme.search.container).flex_float().into_any_named("project search")} else {@@ -1693,7 +1691,7 @@ impl ToolbarItemView for ProjectSearchBar {.as_ref().map(|search| {let offset = search.read(cx).filters_enabled as usize;- 2 + offset+ 3 + offset}).unwrap_or_else(|| 2)}diff --git a/crates/search/src/search_bar.rs b/crates/search/src/search_bar.rsindex 19d8fa6b986..19feb10c950 100644--- a/crates/search/src/search_bar.rs+++ b/crates/search/src/search_bar.rs@@ -65,11 +65,6 @@ pub(super) fn render_nav_button<V: View>(MouseEventHandler::<NavButton, _>::new(direction as usize, cx, |state, cx| {let theme = theme::current(cx);let mut style = theme.search.nav_button.style_for(state).clone();-- match direction {- Direction::Prev => style.container.border.left = false,- Direction::Next => style.container.border.right = false,- };let label = Label::new(icon, style.label.clone()).contained().with_style(style.container.clone());@@ -110,13 +105,7 @@ pub(super) fn render_nav_button<V: View>(.with_height(theme.workspace.toolbar.height),}})- .on_click(- MouseButton::Left,- on_click, /*move |_, this, cx| {- if let Some(search) = this.active_project_search.as_ref() {- search.update(cx, |search, cx| search.select_match(direction, cx));- }*/- )+ .on_click(MouseButton::Left, on_click).with_cursor_style(CursorStyle::PointingHand).with_tooltip::<NavButton>(direction as usize,diff --git a/styles/src/style_tree/search.ts b/styles/src/style_tree/search.tsindex fb9b356591c..3de76f1d7ee 100644--- a/styles/src/style_tree/search.ts+++ b/styles/src/style_tree/search.ts@@ -34,6 +34,7 @@ export default function search(): any {}return {+ padding: { top: 32, bottom: 32, left: 32, right: 32 },// TODO: Add an activeMatchBackground on the rust side to differentiate between active and inactivematch_background: with_opacity(foreground(theme.highest, "accent"),@@ -187,7 +188,11 @@ export default function search(): any {...text(theme.highest, "mono", "on"),background: background(theme.highest, "on"),- border: border(theme.highest, "on"),+ border: {+ ...border(theme.highest, "on"),+ left: false,+ right: false+ },padding: {bottom: 6,@@ -230,7 +235,11 @@ export default function search(): any {text: text(theme.highest, "mono", "on"),background: background(theme.highest, "on"),corner_radius: 2,- border: border(theme.highest, "on"),+ border: {+ ...border(theme.highest, "on"),+ left: false,+ right: false,+ },padding: {bottom: 6,