Skip to content

Commit

Permalink
Fine-tune hunk controls block (#18543)
Browse files Browse the repository at this point in the history
This PR changes the undo icon and adds a background color so that indent
lines don't bleed through the control block.

<img width="900" alt="Screenshot 2024-09-30 at 5 38 44 PM"
src="https://github.com/user-attachments/assets/4955f0f6-50ce-432f-85b9-1da0172d5e51">

Release Notes:

- N/A
  • Loading branch information
danilo-leal authored Sep 30, 2024
1 parent 69e698c commit 053e319
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions crates/editor/src/hunk_diff.rs
Original file line number Diff line number Diff line change
Expand Up @@ -360,8 +360,11 @@ impl Editor {

h_flex()
.id(cx.block_id)
.w_full()
.h(cx.line_height())
.w_full()
.border_t_1()
.border_color(border_color)
.bg(cx.theme().colors().editor_background)
.child(
div()
.id("gutter-strip")
Expand All @@ -381,12 +384,10 @@ impl Editor {
)
.child(
h_flex()
.pl_1p5()
.pl_2()
.pr_6()
.size_full()
.justify_between()
.border_t_1()
.border_color(border_color)
.child(
h_flex()
.gap_1()
Expand Down Expand Up @@ -513,7 +514,7 @@ impl Editor {
}),
)
.child(
IconButton::new("discard", IconName::RotateCcw)
IconButton::new("discard", IconName::Undo)
.shape(IconButtonShape::Square)
.icon_size(IconSize::Small)
.tooltip({
Expand Down

0 comments on commit 053e319

Please sign in to comment.