summaryrefslogtreecommitdiff
path: root/launcher/components/SelectionState.qml
diff options
context:
space:
mode:
Diffstat (limited to 'launcher/components/SelectionState.qml')
-rw-r--r--launcher/components/SelectionState.qml10
1 files changed, 10 insertions, 0 deletions
diff --git a/launcher/components/SelectionState.qml b/launcher/components/SelectionState.qml
index 2e53155..6df7116 100644
--- a/launcher/components/SelectionState.qml
+++ b/launcher/components/SelectionState.qml
@@ -8,8 +8,18 @@ Singleton {
property int cursorPosition: 0
property var priorities: []
property int selectedPriority: 0
+ property int previousSelectedPriority: 0
property var widgets: []
+ onSelectedPriorityChanged: {
+ if (selectedPriority > previousSelectedPriority)
+ priorities[selectedPriority].home();
+ else
+ priorities[selectedPriority].end();
+
+ previousSelectedPriority = selectedPriority;
+ }
+
// order them based on widgets(which came from order from config)
onPrioritiesChanged: {
for (let i = priorities.length - 1; i >= 0; i--)