1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2025-12-06 05:25:41 -05:00

fix spacer reactivity

This commit is contained in:
bbedward
2025-08-25 15:44:20 -04:00
parent 3d54723ec6
commit adb15a7945
2 changed files with 15 additions and 2 deletions

View File

@@ -107,6 +107,19 @@ Singleton {
signal workspaceIconsUpdated
function initializeListModels() {
// ! Hack-ish to add all properties to the listmodel once
// ! allows the properties to be bound on new widget addtions
var dummyItem = {
"widgetId": "dummy",
"enabled": true,
"size": 20,
"selectedGpuIndex": 0,
"pciId": ""
}
leftWidgetsModel.append(dummyItem)
centerWidgetsModel.append(dummyItem)
rightWidgetsModel.append(dummyItem)
updateListModel(leftWidgetsModel, topBarLeftWidgets)
updateListModel(centerWidgetsModel, topBarCenterWidgets)
updateListModel(rightWidgetsModel, topBarRightWidgets)
@@ -658,10 +671,8 @@ Singleton {
}
if (size !== undefined)
item.size = size
if (selectedGpuIndex !== undefined)
item.selectedGpuIndex = selectedGpuIndex
if (pciId !== undefined)
item.pciId = pciId

View File

@@ -422,6 +422,7 @@ PanelWindow {
opacity: topBarContent.getWidgetEnabled(
model.enabled) ? 1 : 0
asynchronous: false
}
}
}
@@ -601,6 +602,7 @@ PanelWindow {
opacity: topBarContent.getWidgetEnabled(
model.enabled) ? 1 : 0
asynchronous: false
}
}
}