commit 49fe7ae5c7c194a0edde7458bcd8864be02d0a72
parent 482a3cb818950ad37ca540b44dea37246a8c7635
Author: William Casarin <jb55@jb55.com>
Date: Tue, 17 Dec 2024 11:52:28 -0800
ui: add show_pointer
For showing the cursor when hovering over a clickable thing. We need
this in more places.
Signed-off-by: William Casarin <jb55@jb55.com>
Diffstat:
1 file changed, 4 insertions(+), 0 deletions(-)
diff --git a/crates/notedeck_columns/src/ui/mod.rs b/crates/notedeck_columns/src/ui/mod.rs
@@ -59,3 +59,7 @@ pub fn hline(ui: &egui::Ui) {
let stroke = ui.style().visuals.widgets.noninteractive.bg_stroke;
ui.painter().hline(rect.x_range(), resize_y, stroke);
}
+
+pub fn show_pointer(ui: &egui::Ui) {
+ ui.ctx().set_cursor_icon(egui::CursorIcon::PointingHand);
+}