From 675673ed5462711916e7824528698fc235d679b2 Mon Sep 17 00:00:00 2001 From: Danilo Leal <67129314+danilo-leal@users.noreply.github.com> Date: Sat, 28 Sep 2024 01:45:40 +0200 Subject: [PATCH] Fine-tune hunk control spacing (#18463) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Screenshot 2024-09-28 at 1 09 35 AM --- Release Notes: - N/A --- crates/editor/src/hunk_diff.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/crates/editor/src/hunk_diff.rs b/crates/editor/src/hunk_diff.rs index cf2a857b67..4e7a0f05f4 100644 --- a/crates/editor/src/hunk_diff.rs +++ b/crates/editor/src/hunk_diff.rs @@ -338,7 +338,7 @@ impl Editor { hunk: &HoveredHunk, cx: &mut ViewContext<'_, Editor>, ) -> BlockProperties { - let border_color = cx.theme().colors().border_disabled; + let border_color = cx.theme().colors().border_variant; let gutter_color = match hunk.status { DiffHunkStatus::Added => cx.theme().status().created, DiffHunkStatus::Modified => cx.theme().status().modified, @@ -381,14 +381,15 @@ impl Editor { ) .child( h_flex() + .pl_1p5() + .pr_6() .size_full() .justify_between() .border_t_1() .border_color(border_color) .child( h_flex() - .gap_2() - .pl_6() + .gap_1() .child( IconButton::new("next-hunk", IconName::ArrowDown) .shape(IconButtonShape::Square) @@ -595,7 +596,7 @@ impl Editor { }), ) .child( - h_flex().gap_2().pr_6().child( + div().child( IconButton::new("collapse", IconName::Close) .shape(IconButtonShape::Square) .icon_size(IconSize::Small)