From 8ef900ce5b8a55dfe8d047307963a56d46a32835 Mon Sep 17 00:00:00 2001 From: Danilo Leal <67129314+danilo-leal@users.noreply.github.com> Date: Sun, 4 Jan 2026 20:58:42 -0300 Subject: [PATCH] git_panel: Add hover state to latest commit button (#46046) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The button for opening the latest commit view didn't have a hover state, but now it does! Screenshot 2026-01-04 at 8  44@2x Release Notes: - N/A --- crates/git_ui/src/git_panel.rs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/crates/git_ui/src/git_panel.rs b/crates/git_ui/src/git_panel.rs index c2ab62810b47fbe1338e54f1d0220e644bbc967b..c016562866fb0ad89987e043160dee937830838a 100644 --- a/crates/git_ui/src/git_panel.rs +++ b/crates/git_ui/src/git_panel.rs @@ -4367,23 +4367,24 @@ impl GitPanel { Some( h_flex() - .py_1p5() - .px_2() + .p_1p5() .gap_1p5() .justify_between() .border_t_1() .border_color(cx.theme().colors().border.opacity(0.8)) .child( div() + .id("commit-msg-hover") + .px_1() .cursor_pointer() - .overflow_hidden() .line_clamp(1) + .rounded_sm() + .hover(|s| s.bg(cx.theme().colors().element_hover)) .child( Label::new(commit.subject.clone()) .size(LabelSize::Small) .truncate(), ) - .id("commit-msg-hover") .on_click({ let commit = commit.clone(); let repo = active_repository.downgrade(); @@ -4415,7 +4416,7 @@ impl GitPanel { ) .when(commit.has_parent, |this| { let has_unstaged = self.has_unstaged_changes(); - this.child( + this.pr_2().child( panel_icon_button("undo", IconName::Undo) .icon_size(IconSize::XSmall) .icon_color(Color::Muted)