From 9bf227b884a35098670e26b988b52b8a282dfa1e Mon Sep 17 00:00:00 2001 From: KCaverly Date: Wed, 16 Aug 2023 12:17:59 +0100 Subject: [PATCH] remove regex keymap, and made spacing consistent between search objects Co-authored-by: Piotr --- crates/search/src/project_search.rs | 10 +++------- styles/src/style_tree/search.ts | 10 +++------- 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/crates/search/src/project_search.rs b/crates/search/src/project_search.rs index 0b2c06f4b8e23cf9ab6cc3efa1f3387ac63339c3..fb0e71b1ed66ab53ae9b0529be3d1c3fcdef6b07 100644 --- a/crates/search/src/project_search.rs +++ b/crates/search/src/project_search.rs @@ -64,7 +64,7 @@ pub fn init(cx: &mut AppContext) { cx.add_action(ProjectSearchBar::cycle_mode); cx.add_action(ProjectSearchBar::next_history_query); cx.add_action(ProjectSearchBar::previous_history_query); - cx.add_action(ProjectSearchBar::activate_regex_mode); + // cx.add_action(ProjectSearchBar::activate_regex_mode); cx.capture_action(ProjectSearchBar::tab); cx.capture_action(ProjectSearchBar::tab_previous); add_toggle_option_action::(SearchOptions::CASE_SENSITIVE, cx); @@ -1498,7 +1498,7 @@ impl View for ProjectSearchBar { .with_max_width(theme.search.include_exclude_editor.max_width), ) .contained() - .with_padding_top(3.) + .with_padding_top(theme.workspace.toolbar.container.padding.bottom) }); let editor_column = Flex::column() @@ -1513,8 +1513,6 @@ impl View for ProjectSearchBar { .flex(1., false), ) .with_children(filters) - .contained() - .with_background_color(gpui::color::Color::blue()) .flex(1., false); let matches = search.active_match_index.map(|match_ix| { @@ -1569,9 +1567,7 @@ impl View for ProjectSearchBar { .with_child(nav_button_for_direction(">", Direction::Next, cx)) .with_child(Flex::row().with_children(matches)) .constrained() - .with_height(theme.search.search_bar_row_height) - .contained() - .with_background_color(gpui::color::Color::red()); + .with_height(theme.search.search_bar_row_height); let side_column_min_width = 200.; let mode_column = Flex::row() diff --git a/styles/src/style_tree/search.ts b/styles/src/style_tree/search.ts index 05392ce48d9fd347b6dda796bd9fd498151a3b51..abb27f39e8190064f0be95b770e31af7b0d29875 100644 --- a/styles/src/style_tree/search.ts +++ b/styles/src/style_tree/search.ts @@ -102,6 +102,9 @@ export default function search(): any { right: 10, // top: 2, }, + margin: { + right: 9, + } }, state: { hovered: {} @@ -112,14 +115,7 @@ export default function search(): any { base: { ...text(theme.highest, "mono", "on"), background: background(theme.highest, "on"), - corner_radius: 6, border: border(theme.highest, "on"), - padding: { - // bottom: 2, - left: 10, - right: 10, - // top: 2, - }, }, state: { hovered: {