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 bool isBusy: false | 15 | property bool isBusy: false | ||
▲ Show 20 Lines • Show All 151 Lines • ▼ Show 20 Line(s) | 119 | { | |||
167 | 167 | | |||
168 | model: QSortFilterProxyModel { | 168 | model: QSortFilterProxyModel { | ||
169 | sourceModel: updateModel | 169 | sourceModel: updateModel | ||
170 | sortRole: UpdateModel.SectionResourceProgressRole | 170 | sortRole: UpdateModel.SectionResourceProgressRole | ||
171 | } | 171 | } | ||
172 | 172 | | |||
173 | section { | 173 | section { | ||
174 | property: "section" | 174 | property: "section" | ||
175 | delegate: Kirigami.Heading { | 175 | delegate: Kirigami.ListSectionHeader { | ||
176 | x: Kirigami.Units.gridUnit | 176 | width: updatesView.width | ||
177 | level: 2 | 177 | label: section | ||
178 | text: section | | |||
179 | height: implicitHeight + Kirigami.Units.largeSpacing * 2 | | |||
180 | } | 178 | } | ||
181 | } | 179 | } | ||
182 | 180 | | |||
183 | delegate: Kirigami.AbstractListItem { | 181 | delegate: Kirigami.AbstractListItem { | ||
184 | backgroundColor: Kirigami.Theme.backgroundColor | 182 | backgroundColor: Kirigami.Theme.backgroundColor | ||
185 | highlighted: ListView.isCurrentItem | 183 | highlighted: ListView.isCurrentItem | ||
186 | onEnabledChanged: if (!enabled) { | 184 | onEnabledChanged: if (!enabled) { | ||
187 | layout.extended = false; | 185 | layout.extended = false; | ||
▲ Show 20 Lines • Show All 176 Lines • Show Last 20 Lines |