From b282bdfe5a3e02bceba2464b9c9d22ed1094f5cd Mon Sep 17 00:00:00 2001 From: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com> Date: Wed, 9 Aug 2023 01:09:07 +0200 Subject: [PATCH] buffer: finish up moving things around --- crates/search/src/buffer_search.rs | 70 +++++++++++++++++------------- 1 file changed, 40 insertions(+), 30 deletions(-) diff --git a/crates/search/src/buffer_search.rs b/crates/search/src/buffer_search.rs index a4658c94289ec467cf41b161880bdec1bc07c3b4..915ede6cb53366e3d3b349200fe8a0687ac19a33 100644 --- a/crates/search/src/buffer_search.rs +++ b/crates/search/src/buffer_search.rs @@ -211,47 +211,56 @@ impl View for BufferSearchBar { )) .aligned() .left() - .top(), + .top() + .flex(1., true) + .constrained(), ) - .contained() - .flex(1., true), + .contained(), ) .with_child( - Flex::row() + Flex::column() .align_children_center() .with_child( Flex::row() .with_child( - ChildView::new(&self.query_editor, cx) + Flex::row() + .with_child( + ChildView::new(&self.query_editor, cx) + .aligned() + .left() + .flex(1., true), + ) + .with_children(render_search_option( + supported_options.case, + "icons/case_insensitive_12.svg", + SearchOptions::CASE_SENSITIVE, + cx, + )) + .with_children(render_search_option( + supported_options.word, + "icons/word_search_12.svg", + SearchOptions::WHOLE_WORD, + cx, + )) + .contained() + .with_style(editor_container) .aligned() - .left() - .flex(1., true), + .top() + .constrained() + .with_min_width(theme.search.editor.min_width) + .with_max_width(theme.search.editor.max_width) + .flex(1., false), + ) + .with_child( + Flex::row() + .with_child(self.render_action_button("Select All", cx)) + .aligned(), ) - .with_children(render_search_option( - supported_options.case, - "icons/case_insensitive_12.svg", - SearchOptions::CASE_SENSITIVE, - cx, - )) - .with_children(render_search_option( - supported_options.word, - "icons/word_search_12.svg", - SearchOptions::WHOLE_WORD, - cx, - )) - .contained() - .with_style(editor_container) - .aligned() - .constrained() - .with_min_width(theme.search.editor.min_width) - .with_max_width(theme.search.editor.max_width) .flex(1., false), ) - .with_child( - Flex::row() - .with_child(self.render_action_button("Select All", cx)) - .aligned(), - ) + .contained() + .aligned() + .top() .flex(1., false), ) .with_child( @@ -275,6 +284,7 @@ impl View for BufferSearchBar { ) .contained() .with_style(theme.search.container) + .flex_float() .into_any_named("search bar") } }