Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

git: Refine diff hunk controls visuals (#26317)

Danilo Leal6ed6e8bc26ec
diff --git a/crates/editor/src/element.rs b/crates/editor/src/element.rs
index 9ac4ce5ae07..a094516d283 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| {