Changeset View
Changeset View
Standalone View
Standalone View
sidebar/package/contents/ui/SubCategoryPage.qml
Show First 20 Lines • Show All 119 Lines • ▼ Show 20 Line(s) | 119 | onCountChanged: { | |||
---|---|---|---|---|---|
120 | if (count > 1) { | 120 | if (count > 1) { | ||
121 | if (root.pageStack.depth < 2) { | 121 | if (root.pageStack.depth < 2) { | ||
122 | root.pageStack.push(subCategoryColumn); | 122 | root.pageStack.push(subCategoryColumn); | ||
123 | } | 123 | } | ||
124 | } else { | 124 | } else { | ||
125 | root.pageStack.pop(mainColumn) | 125 | root.pageStack.pop(mainColumn) | ||
126 | } | 126 | } | ||
127 | } | 127 | } | ||
128 | | ||||
128 | Connections { | 129 | Connections { | ||
129 | target: systemsettings | 130 | target: systemsettings | ||
130 | onActiveSubCategoryChanged: { | 131 | onActiveSubCategoryChanged: { | ||
132 | subCategoryView.currentIndex = systemsettings.activeSubCategory; | ||||
133 | if (systemsettings.activeSubCategory < 0) { | ||||
134 | root.pageStack.pop(mainColumn) | ||||
135 | } else { | ||||
131 | root.pageStack.currentIndex = 1; | 136 | root.pageStack.currentIndex = 1; | ||
132 | subCategoryView.forceActiveFocus(); | 137 | subCategoryView.forceActiveFocus(); | ||
133 | } | 138 | } | ||
134 | } | 139 | } | ||
140 | } | ||||
135 | 141 | | |||
136 | delegate: Kirigami.BasicListItem { | 142 | delegate: Kirigami.BasicListItem { | ||
137 | id: delegate | 143 | id: delegate | ||
138 | icon: model.decoration | 144 | icon: model.decoration | ||
139 | label: model.display | 145 | label: model.display | ||
140 | separatorVisible: false | 146 | separatorVisible: false | ||
141 | onClicked: systemsettings.activeSubCategory = index | 147 | onClicked: systemsettings.activeSubCategory = index | ||
142 | onHoveredChanged: { | 148 | onHoveredChanged: { | ||
Show All 17 Lines |