From 6ed6e8bc26ec4e1c95aeb41e9992fd4dda9a14a9 Mon Sep 17 00:00:00 2001 From: Danilo Leal <67129314+danilo-leal@users.noreply.github.com> Date: Sat, 8 Mar 2025 01:00:47 -0300 Subject: [PATCH] git: Refine diff hunk controls visuals (#26317) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit You may need to zoom in hard to see this 😅 but the main addition of this PR is just ensuring there's also horizontal border instead of just on the bottom. Also added some box-shadow here to make it pop out of the diff a bit more. | Before | After | |--------|--------| | ![CleanShot 2025-03-08 at 12  37 40@2x](https://github.com/user-attachments/assets/98e0329e-646f-4455-89fa-3f6ec1211361) | ![CleanShot 2025-03-08 at 12  36 40@2x](https://github.com/user-attachments/assets/7f667e65-5b72-4156-b0ec-2b162eb76f2f) | Release Notes: - N/A --- crates/editor/src/element.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/crates/editor/src/element.rs b/crates/editor/src/element.rs index 9ac4ce5ae0719d36e8fb9398519162f3941bdcfc..a094516d283173b46a54446b80256cc6db74966d 100644 --- a/crates/editor/src/element.rs +++ b/crates/editor/src/element.rs @@ -8896,14 +8896,16 @@ fn diff_hunk_controls( .h(line_height) .mr_1() .gap_1() - .px_1() + .px_0p5() .pb_1() + .border_x_1() .border_b_1() .border_color(cx.theme().colors().border_variant) .rounded_b_lg() .bg(cx.theme().colors().editor_background) .gap_1() .occlude() + .shadow_md() .child(if status.has_secondary_hunk() { Button::new(("stage", row as u64), "Stage") .alpha(if status.is_pending() { 0.66 } else { 1.0 }) @@ -8960,7 +8962,7 @@ fn diff_hunk_controls( }) }) .child( - Button::new("discard", "Restore") + Button::new("restore", "Restore") .tooltip({ let focus_handle = editor.focus_handle(cx); move |window, cx| {