Fix CSS pointer cursor handling on hovered widgets

Map the standard CSS pointer value to the hand cursor and retain the
computed cursor in each UIWidget instead of mutating the scene during
style application.

Apply the retained cursor when a widget becomes the hover target, restore
the arrow when leaving the UI, and make cursor inheritance available to
descendants such as inline SVG elements.

Store cursor state in an existing UIWidget padding gap and centralize
cursor serialization in Cursor::toName().

Add regressions for pointer parsing, cursor serialization, inheritance,
and the SS64 search button SVG.
This commit is contained in:
Martín Lucas Golini
2026-07-30 16:47:52 -03:00
parent 246161be7e
commit ae0c5ffef0
7 changed files with 57 additions and 4 deletions
@@ -23,6 +23,8 @@ using namespace EE::UI;
UTEST( UISceneNode, CssPointerCursorUsesHandCursor ) {
EXPECT_EQ( Cursor::fromName( "pointer" ), Cursor::Hand );
EXPECT_EQ( Cursor::fromName( "POINTER" ), Cursor::Hand );
EXPECT_STREQ( Cursor::toName( Cursor::Hand ), "hand" );
EXPECT_STREQ( Cursor::toName( Cursor::Arrow ), "arrow" );
}
static UISceneNode* init_test_scene_node() {