mirror of
https://github.com/YGGverse/Yoda.git
synced 2025-01-15 17:20:08 +00:00
fix cursor update
This commit is contained in:
parent
72f9293239
commit
26160ba521
@ -180,15 +180,22 @@ impl Reader {
|
||||
|
||||
if let Some(iter) = gobject.iter_at_location(window_x, window_y) {
|
||||
for tag in iter.tags() {
|
||||
// Toggle cursor icon if tag contain URI (is link)
|
||||
match _links_.get(&tag) {
|
||||
Some(_) => gobject.set_cursor_from_name(Some("pointer")), // @TODO Show tooltip
|
||||
None => gobject.set_cursor_from_name(Some("text")),
|
||||
// Tag contain URI (is link)
|
||||
if let Some(_) = _links_.get(&tag) {
|
||||
// Toggle cursor
|
||||
gobject.set_cursor_from_name(Some("pointer"));
|
||||
|
||||
// @TODO Show tooltip
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Restore default cursor
|
||||
gobject.set_cursor_from_name(Some("text"));
|
||||
}
|
||||
}); // @TODO may be expensive for CPU
|
||||
}); // @TODO may be expensive for CPU, add timeout?
|
||||
|
||||
// @TODO
|
||||
// middle_button_controller(|_, _, _, _| {});
|
||||
|
Loading…
x
Reference in New Issue
Block a user