diff options
Diffstat (limited to 'desktop/Prefs.qml')
| -rw-r--r-- | desktop/Prefs.qml | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/desktop/Prefs.qml b/desktop/Prefs.qml index 0861258..09960c4 100644 --- a/desktop/Prefs.qml +++ b/desktop/Prefs.qml @@ -85,8 +85,9 @@ Singleton { } // The island bar's settings (modules/island): the length a new event gets, - // and that its end keeps from the start, in minutes. - readonly property var islandDefaults: ({ eventMinutes: 60 }) + // and that its end keeps from the start, in minutes; the pills left to + // right, the first two left of the screen's centre, the last two right. + readonly property var islandDefaults: ({ eventMinutes: 60, pills: ["media", "clock", "status", "obs"] }) property var island: islandDefaults function setIsland(changes) { root.island = Object.assign({}, root.island, changes); @@ -167,6 +168,9 @@ Singleton { root.island = { eventMinutes: Number.isInteger(isl.eventMinutes) && isl.eventMinutes >= 5 && isl.eventMinutes <= 1440 ? isl.eventMinutes : 60, + pills: Array.isArray(isl.pills) && isl.pills.length === 4 + && root.islandDefaults.pills.every(p => isl.pills.includes(p)) + ? isl.pills.slice() : root.islandDefaults.pills, }; } |
