aboutsummaryrefslogtreecommitdiffstats
path: root/desktop/modules/deckit/DeckItPage.qml
diff options
context:
space:
mode:
Diffstat (limited to 'desktop/modules/deckit/DeckItPage.qml')
-rw-r--r--desktop/modules/deckit/DeckItPage.qml34
1 files changed, 34 insertions, 0 deletions
diff --git a/desktop/modules/deckit/DeckItPage.qml b/desktop/modules/deckit/DeckItPage.qml
index fe4092c..4368ca4 100644
--- a/desktop/modules/deckit/DeckItPage.qml
+++ b/desktop/modules/deckit/DeckItPage.qml
@@ -38,6 +38,15 @@ Column {
}
function setApps(list) { col.st.put("launch", "apps", list); }
+ // The dashboard's action icons: every id deck-it knows is in the
+ // defaults' list; the file keeps the ones switched on, in that order.
+ readonly property var allActions: col.def("dashboard", "actions") ?? []
+ readonly property var actions: col.st.value("dashboard", "actions") ?? col.allActions
+ function setAction(id, on) {
+ col.st.put("dashboard", "actions",
+ col.allActions.filter(a => a === id ? on : col.actions.includes(a)));
+ }
+
component Small: Text {
width: col.width
wrapMode: Text.Wrap
@@ -203,6 +212,31 @@ Column {
}
}
+ Heading { objectName: "dashboard/actions"; text: "Dashboard actions" }
+ Small { text: "Icon buttons at the bottom of the tablet's dashboard." }
+ Repeater {
+ model: col.allActions
+ Item {
+ id: act
+ required property string modelData
+ width: col.width
+ height: 34
+ Text {
+ id: actLabel
+ anchors { left: parent.left; verticalCenter: parent.verticalCenter }
+ width: 160
+ text: act.modelData
+ color: Theme.subtext
+ font { family: Theme.fontFamily; pixelSize: Theme.fontSize - 3 }
+ }
+ Switch {
+ anchors { left: actLabel.right; leftMargin: 8; verticalCenter: parent.verticalCenter }
+ checked: col.actions.includes(act.modelData)
+ onToggled: on => col.setAction(act.modelData, on)
+ }
+ }
+ }
+
Heading { text: "Modules" }
Small { text: "The dashboard's panels and tabs." }
Repeater {