Skip to content

Commit

Permalink
Fine-tune hunk control spacing (#18463)
Browse files Browse the repository at this point in the history
<img width="900" alt="Screenshot 2024-09-28 at 1 09 35 AM"
src="https://github.com/user-attachments/assets/0b9d744f-3b92-488a-bc74-987f5a9d8c6c">

---

Release Notes:

- N/A
  • Loading branch information
danilo-leal authored Sep 27, 2024
1 parent 3737d4e commit 675673e
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions crates/editor/src/hunk_diff.rs
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ impl Editor {
hunk: &HoveredHunk,
cx: &mut ViewContext<'_, Editor>,
) -> BlockProperties<Anchor> {
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,
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 675673e

Please sign in to comment.