fix(settings): resolve barIsVertical property assignment conflict

CustomButtonSettings now calculates barIsVertical from Settings directly
instead of receiving it from parent, avoiding Loader.setSource() conflict.
This commit is contained in:
loner
2026-04-06 09:04:11 +08:00
parent 5c3b3a2185
commit b8a7c2f77d
2 changed files with 2 additions and 3 deletions
@@ -186,7 +186,6 @@ Popup {
}
settingsLoader.setSource(source, {
"screen": screen,
"barIsVertical": barIsVertical,
"widgetData": currentWidgetData,
"widgetMetadata": BarWidgetRegistry.widgetMetadata[widgetId]
});
@@ -17,8 +17,8 @@ ColumnLayout {
signal settingsChanged(var settings)
// Bar orientation (per-screen) - passed from parent
property bool barIsVertical: false
// Bar orientation (per-screen)
property bool barIsVertical: (Settings.getBarPositionForScreen(screen?.name) === "left" || Settings.getBarPositionForScreen(screen?.name) === "right")
property string valueIcon: widgetData.icon !== undefined ? widgetData.icon : widgetMetadata.icon
property string valueIconPosition: widgetData.iconPosition !== undefined ? widgetData.iconPosition : widgetMetadata.iconPosition