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 <jb55@jb55.com>
This commit is contained in:
@@ -105,9 +105,12 @@ impl NoteContextButton {
|
|||||||
let anim_speed = 0.05;
|
let anim_speed = 0.05;
|
||||||
let response = ui.interact(put_at, id, egui::Sense::click());
|
let response = ui.interact(put_at, id, egui::Sense::click());
|
||||||
|
|
||||||
let animation_progress =
|
let hovered = response.hovered();
|
||||||
ui.ctx()
|
let animation_progress = ui.ctx().animate_bool_with_time(id, hovered, anim_speed);
|
||||||
.animate_bool_with_time(id, response.hovered(), anim_speed);
|
|
||||||
|
if hovered {
|
||||||
|
ui.ctx().set_cursor_icon(egui::CursorIcon::PointingHand);
|
||||||
|
}
|
||||||
|
|
||||||
let min_distance = Self::min_distance_between_circles();
|
let min_distance = Self::min_distance_between_circles();
|
||||||
let cur_distance = min_distance
|
let cur_distance = min_distance
|
||||||
|
|||||||
Reference in New Issue
Block a user