Changeset View
Changeset View
Standalone View
Standalone View
sidebar/package/contents/ui/SubCategoryPage.qml
Show First 20 Lines • Show All 112 Lines • ▼ Show 20 Line(s) | 108 | Connections { | |||
---|---|---|---|---|---|
113 | } | 113 | } | ||
114 | } | 114 | } | ||
115 | 115 | | |||
116 | delegate: Kirigami.BasicListItem { | 116 | delegate: Kirigami.BasicListItem { | ||
117 | id: delegate | 117 | id: delegate | ||
118 | icon: model.decoration | 118 | icon: model.decoration | ||
119 | label: model.display | 119 | label: model.display | ||
120 | separatorVisible: false | 120 | separatorVisible: false | ||
121 | highlighted: focus | 121 | checkable: false | ||
122 | onClicked: systemsettings.activeSubCategory = index | 122 | onClicked: systemsettings.activeSubCategory = index | ||
123 | onFocusChanged: { | 123 | onFocusChanged: { | ||
124 | if (focus) { | 124 | if (focus) { | ||
125 | onCurrentIndexChanged: subCategoryView.positionViewAtIndex(index, ListView.Contain); | 125 | onCurrentIndexChanged: subCategoryView.positionViewAtIndex(index, ListView.Contain); | ||
126 | } | 126 | } | ||
127 | } | 127 | } | ||
128 | checked: systemsettings.activeSubCategory == index | 128 | highlighted: systemsettings.activeSubCategory == index | ||
129 | //checkable: false | | |||
130 | //FIXME: Qt 5.7 doesn't have checkable, this way fails at runtime but still works correctly on 5.7 | | |||
131 | Component.onCompleted: delegate.checkable = true; | | |||
132 | } | 129 | } | ||
133 | } | 130 | } | ||
134 | } | 131 | } |