mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-10-01 02:30:25 +03:00
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:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user