GTK4 help: Cannot change mouse cursor. #1981
Replies: 4 comments
-
not sure why you want to set the cursor on the surface, maybe try calling widget.set_cursor directly, see https://gtk-rs.org/gtk4-rs/stable/latest/docs/gtk4/prelude/trait.WidgetExt.html#method.set_cursor? |
Beta Was this translation helpful? Give feedback.
-
Yes I did initially try that - if let Some(cursor) = gtk4::gdk::Cursor::from_name("pointer", None) {
logger::debug!("Setting pointer cursor: {:?}", cursor.name());
left_arrow.set_cursor(Some(&cursor));
} Still I just see the debug statement on build and the cursor doesn't change when I hover on the left_arrow Label.
Also for context Im in -
|
Beta Was this translation helpful? Give feedback.
-
That could possibly be a compositor issue as well. |
Beta Was this translation helpful? Give feedback.
-
Possibly, but still couldn't find anything. Ill try digging some more. |
Beta Was this translation helpful? Give feedback.
-
Well im writing a widget and I wanna have cursor pointer on a CenterBox on hover. my curent code is this-
I can see the debug statements on hover-enter and hover-leave. but my cursor does not chnage.
what exactly am I doing wrong?
saw #1325
and tried -
same behaviour as previous.
Anyone knows what I'm doing wrong?
Full code for anyone looking-
Beta Was this translation helpful? Give feedback.
All reactions