Fine-tune hunk control spacing (#18463)
Some checks are pending
CI / Check formatting and spelling (push) Waiting to run
CI / (macOS) Run Clippy and tests (push) Waiting to run
CI / (Linux) Run Clippy and tests (push) Waiting to run
CI / (Windows) Run Clippy and tests (push) Waiting to run
CI / Create a macOS bundle (push) Blocked by required conditions
CI / Create a Linux bundle (push) Blocked by required conditions
CI / Create arm64 Linux bundle (push) Blocked by required conditions
Deploy Docs / Deploy Docs (push) Waiting to run
Docs / Check formatting (push) Waiting to run

<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
This commit is contained in:
Danilo Leal 2024-09-28 01:45:40 +02:00 committed by GitHub
parent 3737d4eb4f
commit 675673ed54
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -338,7 +338,7 @@ impl Editor {
hunk: &HoveredHunk, hunk: &HoveredHunk,
cx: &mut ViewContext<'_, Editor>, cx: &mut ViewContext<'_, Editor>,
) -> BlockProperties<Anchor> { ) -> BlockProperties<Anchor> {
let border_color = cx.theme().colors().border_disabled; let border_color = cx.theme().colors().border_variant;
let gutter_color = match hunk.status { let gutter_color = match hunk.status {
DiffHunkStatus::Added => cx.theme().status().created, DiffHunkStatus::Added => cx.theme().status().created,
DiffHunkStatus::Modified => cx.theme().status().modified, DiffHunkStatus::Modified => cx.theme().status().modified,
@ -381,14 +381,15 @@ impl Editor {
) )
.child( .child(
h_flex() h_flex()
.pl_1p5()
.pr_6()
.size_full() .size_full()
.justify_between() .justify_between()
.border_t_1() .border_t_1()
.border_color(border_color) .border_color(border_color)
.child( .child(
h_flex() h_flex()
.gap_2() .gap_1()
.pl_6()
.child( .child(
IconButton::new("next-hunk", IconName::ArrowDown) IconButton::new("next-hunk", IconName::ArrowDown)
.shape(IconButtonShape::Square) .shape(IconButtonShape::Square)
@ -595,7 +596,7 @@ impl Editor {
}), }),
) )
.child( .child(
h_flex().gap_2().pr_6().child( div().child(
IconButton::new("collapse", IconName::Close) IconButton::new("collapse", IconName::Close)
.shape(IconButtonShape::Square) .shape(IconButtonShape::Square)
.icon_size(IconSize::Small) .icon_size(IconSize::Small)