From d416044f47ca892f4f58e56b753bed430c68f121 Mon Sep 17 00:00:00 2001 From: William Casarin Date: Thu, 26 Sep 2024 12:29:29 -0700 Subject: [PATCH] context: set cursor icon on hover So we know its clickable. I mean the animation signals that as well, but still. Signed-off-by: William Casarin --- src/ui/note/context.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/ui/note/context.rs b/src/ui/note/context.rs index 5ce9bf6..342af4b 100644 --- a/src/ui/note/context.rs +++ b/src/ui/note/context.rs @@ -105,9 +105,12 @@ impl NoteContextButton { let anim_speed = 0.05; let response = ui.interact(put_at, id, egui::Sense::click()); - let animation_progress = - ui.ctx() - .animate_bool_with_time(id, response.hovered(), anim_speed); + let hovered = response.hovered(); + let animation_progress = ui.ctx().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