Changeset View
Changeset View
Standalone View
Standalone View
discover/qml/UpdatesPage.qml
1 | import QtQuick.Controls 2.3 | 1 | import QtQuick.Controls 2.3 | ||
---|---|---|---|---|---|
2 | import QtQuick.Layouts 1.1 | 2 | import QtQuick.Layouts 1.1 | ||
3 | import QtQuick 2.4 | 3 | import QtQuick 2.4 | ||
4 | import org.kde.discover 2.0 | 4 | import org.kde.discover 2.0 | ||
5 | import org.kde.discover.app 1.0 | 5 | import org.kde.discover.app 1.0 | ||
6 | import "navigation.js" as Navigation | 6 | import "navigation.js" as Navigation | ||
7 | import org.kde.kirigami 2.3 as Kirigami | 7 | import org.kde.kirigami 2.10 as Kirigami | ||
8 | 8 | | |||
9 | DiscoverPage | 9 | DiscoverPage | ||
10 | { | 10 | { | ||
11 | id: page | 11 | id: page | ||
12 | title: i18n("Updates") | 12 | title: i18n("Updates") | ||
13 | 13 | | |||
14 | property string footerLabel: "" | 14 | property string footerLabel: "" | ||
15 | property int footerProgress: 0 | 15 | property int footerProgress: 0 | ||
▲ Show 20 Lines • Show All 186 Lines • ▼ Show 20 Line(s) | 192 | { | |||
202 | 202 | | |||
203 | model: QSortFilterProxyModel { | 203 | model: QSortFilterProxyModel { | ||
204 | sourceModel: updateModel | 204 | sourceModel: updateModel | ||
205 | sortRole: UpdateModel.SectionResourceProgressRole | 205 | sortRole: UpdateModel.SectionResourceProgressRole | ||
206 | } | 206 | } | ||
207 | 207 | | |||
208 | section { | 208 | section { | ||
209 | property: "section" | 209 | property: "section" | ||
210 | delegate: Kirigami.Heading { | 210 | delegate: Kirigami.ListSectionHeader { | ||
211 | x: Kirigami.Units.gridUnit | 211 | width: updatesView.width | ||
212 | level: 2 | 212 | label: section | ||
213 | text: section | | |||
214 | height: implicitHeight + Kirigami.Units.largeSpacing * 2 | | |||
215 | } | 213 | } | ||
216 | } | 214 | } | ||
217 | 215 | | |||
218 | delegate: Kirigami.AbstractListItem { | 216 | delegate: Kirigami.AbstractListItem { | ||
219 | id: listItem | 217 | id: listItem | ||
220 | backgroundColor: Kirigami.Theme.backgroundColor | 218 | backgroundColor: Kirigami.Theme.backgroundColor | ||
221 | highlighted: ListView.isCurrentItem | 219 | highlighted: ListView.isCurrentItem | ||
222 | onEnabledChanged: if (!enabled) { | 220 | onEnabledChanged: if (!enabled) { | ||
▲ Show 20 Lines • Show All 180 Lines • Show Last 20 Lines |