Skip to content

Commit

Permalink
context: set cursor icon on hover
Browse files Browse the repository at this point in the history
So we know its clickable. I mean the animation signals that as well, but
still.

Signed-off-by: William Casarin <[email protected]>
  • Loading branch information
jb55 committed Sep 26, 2024
1 parent 5120686 commit 649b8f8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/ui/note/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,14 @@ impl NoteContextButton {
let anim_speed = 0.05;
let response = ui.interact(put_at, id, egui::Sense::click());

let hovered = response.hovered();
let animation_progress =
ui.ctx()
.animate_bool_with_time(id, response.hovered(), anim_speed);
.animate_bool_with_time(id, hovered, anim_speed);

if hovered {
ui.ctx().set_cursor_icon(egui::CursorIcon::PointingHand);
}

let min_distance = Self::min_distance_between_circles();
let cur_distance = min_distance
Expand Down

0 comments on commit 649b8f8

Please sign in to comment.