Browse Source

fix cursor update

master
yggverse 2 months ago
parent
commit
26160ba521
  1. 17
      src/app/browser/window/tab/item/page/content/text/gemini/reader.rs

17
src/app/browser/window/tab/item/page/content/text/gemini/reader.rs

@ -180,15 +180,22 @@ impl Reader {
if let Some(iter) = gobject.iter_at_location(window_x, window_y) { if let Some(iter) = gobject.iter_at_location(window_x, window_y) {
for tag in iter.tags() { for tag in iter.tags() {
// Toggle cursor icon if tag contain URI (is link) // Tag contain URI (is link)
match _links_.get(&tag) { if let Some(_) = _links_.get(&tag) {
Some(_) => gobject.set_cursor_from_name(Some("pointer")), // @TODO Show tooltip // Toggle cursor
None => gobject.set_cursor_from_name(Some("text")), 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 // @TODO
// middle_button_controller(|_, _, _, _| {}); // middle_button_controller(|_, _, _, _| {});

Loading…
Cancel
Save