@@ -442,7 +442,7 @@ export abstract class LVGLPageRuntime {
442
442
}
443
443
444
444
getThemedColor ( colorValue : string ) {
445
- if ( colorValue . startsWith ( "#" ) ) {
445
+ if ( typeof colorValue != "string" || colorValue . startsWith ( "#" ) ) {
446
446
return { colorValue, isFromTheme : false } ;
447
447
}
448
448
@@ -1313,6 +1313,8 @@ export class LVGLStylesEditorRuntime extends LVGLPageRuntime {
1313
1313
10
1314
1314
) ;
1315
1315
1316
+ this . lvglWidgetsMap . set ( lvglScreenWidget . type , lvglScreenWidget ) ;
1317
+
1316
1318
for ( const component of lvglScreenWidget . children ) {
1317
1319
this . lvglWidgetsMap . set ( component . type , component ) ;
1318
1320
}
@@ -1418,27 +1420,13 @@ export class LVGLStylesEditorRuntime extends LVGLPageRuntime {
1418
1420
lvglWidget . _useStyleForStylePreview = "" ;
1419
1421
lvglWidget . states = "" ;
1420
1422
1421
- flags . push ( "HIDDEN" ) ;
1423
+ if ( lvglWidget != this . page . lvglScreenWidget ) {
1424
+ flags . push ( "HIDDEN" ) ;
1425
+ }
1422
1426
}
1423
1427
1424
1428
lvglWidget . widgetFlags = flags . join ( "|" ) ;
1425
1429
}
1426
-
1427
- const lvglScreenWidget = this . page . lvglScreenWidget ! ;
1428
- if (
1429
- this . selectedStyle &&
1430
- this . canvas &&
1431
- lvglScreenWidget . type ==
1432
- this . selectedStyle . forWidgetType
1433
- ) {
1434
- lvglScreenWidget . _useStyleForStylePreview =
1435
- this . selectedStyle . name ;
1436
- lvglScreenWidget . states =
1437
- this . project . _store . uiStateStore . lvglState ;
1438
- } else {
1439
- lvglScreenWidget . _useStyleForStylePreview = "" ;
1440
- lvglScreenWidget . states = "" ;
1441
- }
1442
1430
} ) ;
1443
1431
1444
1432
const pageObj = this . lvglCreatePage ( ) ;
0 commit comments