git_panel: Add hover state to latest commit button (#46046)
The button for opening the latest commit view didn't have a hover state, but now it does! <img width="400" height="548" alt="Screenshot 2026-01-04 at 8 44@2x" src="https://github.com/user-attachments/assets/6a58fefb-5f3f-4973-b5e8-35c400996e12" /> Release Notes: - N/A
This commit is contained in:
1 parent
7d0f23db11
commit
8ef900ce5b
1 file changed
+6
-5
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user