LibWeb: Set cursor on mousemove for non-text elements
This commit is contained in:
parent
45004022ad
commit
7a035558e1
Notes:
sideshowbarker
2024-07-17 18:42:57 +09:00
Author: https://github.com/adamplumb 🔰 Commit: https://github.com/SerenityOS/serenity/commit/7a035558e1 Pull-request: https://github.com/SerenityOS/serenity/pull/12568
1 changed files with 6 additions and 0 deletions
|
@ -352,6 +352,12 @@ bool EventHandler::handle_mousemove(const Gfx::IntPoint& position, unsigned butt
|
|||
hovered_node_cursor = Gfx::StandardCursor::IBeam;
|
||||
else
|
||||
hovered_node_cursor = cursor_css_to_gfx(cursor);
|
||||
} else if (node->is_element()) {
|
||||
auto cursor = result.layout_node->computed_values().cursor();
|
||||
if (cursor == CSS::Cursor::Auto)
|
||||
hovered_node_cursor = Gfx::StandardCursor::Arrow;
|
||||
else
|
||||
hovered_node_cursor = cursor_css_to_gfx(cursor);
|
||||
}
|
||||
|
||||
auto offset = compute_mouse_event_offset(position, *result.layout_node);
|
||||
|
|
Loading…
Add table
Reference in a new issue