Changeset View
Changeset View
Standalone View
Standalone View
sidebar/package/contents/ui/CategoriesPage.qml
Show All 13 Lines | 1 | /* | |||
---|---|---|---|---|---|
14 | along with this library; see the file COPYING.LIB. If not, write to | 14 | along with this library; see the file COPYING.LIB. If not, write to | ||
15 | the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 15 | the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | ||
16 | Boston, MA 02110-1301, USA. | 16 | Boston, MA 02110-1301, USA. | ||
17 | */ | 17 | */ | ||
18 | 18 | | |||
19 | import QtQuick 2.5 | 19 | import QtQuick 2.5 | ||
20 | import QtQuick.Controls 2.5 as QQC2 | 20 | import QtQuick.Controls 2.5 as QQC2 | ||
21 | import QtQuick.Layouts 1.1 | 21 | import QtQuick.Layouts 1.1 | ||
22 | 22 | import org.kde.kirigami 2.10 as Kirigami | |||
23 | import org.kde.kirigami 2.8 as Kirigami | | |||
24 | 23 | | |||
25 | Kirigami.ScrollablePage { | 24 | Kirigami.ScrollablePage { | ||
26 | id: mainColumn | 25 | id: mainColumn | ||
27 | Component.onCompleted: searchField.forceActiveFocus() | 26 | Component.onCompleted: searchField.forceActiveFocus() | ||
28 | 27 | | |||
29 | header: Rectangle { | 28 | header: Rectangle { | ||
30 | Kirigami.Theme.colorSet: Kirigami.Theme.Window | 29 | Kirigami.Theme.colorSet: Kirigami.Theme.Window | ||
31 | Kirigami.Theme.inherit: false | 30 | Kirigami.Theme.inherit: false | ||
▲ Show 20 Lines • Show All 75 Lines • ▼ Show 20 Line(s) | 105 | Keys.onTabPressed: { | |||
107 | if (applicationWindow().wideScreen) { | 106 | if (applicationWindow().wideScreen) { | ||
108 | subCategoryColumn.focus = true; | 107 | subCategoryColumn.focus = true; | ||
109 | } else { | 108 | } else { | ||
110 | root.focusNextRequest(); | 109 | root.focusNextRequest(); | ||
111 | } | 110 | } | ||
112 | } | 111 | } | ||
113 | section { | 112 | section { | ||
114 | property: "categoryDisplayRole" | 113 | property: "categoryDisplayRole" | ||
115 | delegate: Kirigami.AbstractListItem { | 114 | delegate: Kirigami.ListSectionHeader { | ||
116 | width: categoryView.width | 115 | width: categoryView.width | ||
117 | 116 | label: section | |||
118 | backgroundColor: Kirigami.Theme.backgroundColor | | |||
119 | Kirigami.Theme.inherit: false | | |||
120 | Kirigami.Theme.colorSet: Kirigami.Theme.Window | | |||
121 | | ||||
122 | hoverEnabled: false | | |||
123 | supportsMouseEvents: false | | |||
124 | | ||||
125 | Kirigami.Heading { | | |||
126 | level: 2 | | |||
127 | text: section | | |||
128 | } | | |||
129 | } | 117 | } | ||
130 | } | 118 | } | ||
131 | 119 | | |||
132 | delegate: Kirigami.BasicListItem { | 120 | delegate: Kirigami.BasicListItem { | ||
133 | id: delegate | 121 | id: delegate | ||
134 | icon: model.decoration | 122 | icon: model.decoration | ||
135 | label: model.display | 123 | label: model.display | ||
136 | separatorVisible: false | 124 | separatorVisible: false | ||
Show All 28 Lines |