1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-24 21:42:51 -05:00

fix some topbar issues

This commit is contained in:
bbedward
2025-08-15 09:32:58 -04:00
parent bf493b39fd
commit ff70343fa0
5 changed files with 95 additions and 53 deletions

View File

@@ -374,16 +374,14 @@ Item {
}
Component.onCompleted: {
if (!SettingsData.topBarLeftWidgets
|| SettingsData.topBarLeftWidgets.length === 0)
// Only set defaults if widgets have never been configured (null/undefined, not empty array)
if (!SettingsData.topBarLeftWidgets)
SettingsData.setTopBarLeftWidgets(defaultLeftWidgets)
if (!SettingsData.topBarCenterWidgets
|| SettingsData.topBarCenterWidgets.length === 0)
if (!SettingsData.topBarCenterWidgets)
SettingsData.setTopBarCenterWidgets(defaultCenterWidgets)
if (!SettingsData.topBarRightWidgets
|| SettingsData.topBarRightWidgets.length === 0)
if (!SettingsData.topBarRightWidgets)
SettingsData.setTopBarRightWidgets(defaultRightWidgets)
["left", "center", "right"].forEach(sectionId => {