From 3ccbd7726949bd6fef1d2fefc651aac23017902b Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Mon, 31 Jan 2022 14:06:49 +0100 Subject: [PATCH] Move match index before the navigation buttons Co-Authored-By: Nathan Sobo --- crates/find/src/find.rs | 14 +++++++------- crates/zed/assets/themes/_base.toml | 1 - 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/crates/find/src/find.rs b/crates/find/src/find.rs index 2bf2e1133d..859e9f4923 100644 --- a/crates/find/src/find.rs +++ b/crates/find/src/find.rs @@ -111,6 +111,13 @@ impl View for FindBar { .aligned() .boxed(), ) + .with_child( + Flex::row() + .with_child(self.render_nav_button("<", Direction::Prev, cx)) + .with_child(self.render_nav_button(">", Direction::Next, cx)) + .aligned() + .boxed(), + ) .with_children(self.active_editor.as_ref().and_then(|editor| { let (_, highlighted_ranges) = editor.read(cx).highlighted_ranges_for_type::()?; @@ -128,13 +135,6 @@ impl View for FindBar { .boxed(), ) })) - .with_child( - Flex::row() - .with_child(self.render_nav_button("<", Direction::Prev, cx)) - .with_child(self.render_nav_button(">", Direction::Next, cx)) - .aligned() - .boxed(), - ) .contained() .with_style(theme.find.container) .constrained() diff --git a/crates/zed/assets/themes/_base.toml b/crates/zed/assets/themes/_base.toml index 80d9c7cc69..93019db6e4 100644 --- a/crates/zed/assets/themes/_base.toml +++ b/crates/zed/assets/themes/_base.toml @@ -353,7 +353,6 @@ background = "$surface.2" [find.match_index] extends = "$text.1" padding = 6 -margin.left = 24 [find.editor] max_width = 400