summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleix Pol <aleixpol@kde.org>2015-10-16 11:41:32 (GMT)
committerAleix Pol <aleixpol@kde.org>2015-10-16 11:41:32 (GMT)
commite60128613acc6285f6f258c13b6ce49a2216ad69 (patch)
treed3ea34456efcc5f04a85832b65aeee4fb635ee55
parent37e960549e225994021ef43d700a0f219d3d5020 (diff)
While loading, show a special loading page
Instead of lying saying there's no updates
-rw-r--r--discover/qml/UpdatesPage.qml19
1 files changed, 18 insertions, 1 deletions
diff --git a/discover/qml/UpdatesPage.qml b/discover/qml/UpdatesPage.qml
index 06a0fe7..f7520d7 100644
--- a/discover/qml/UpdatesPage.qml
+++ b/discover/qml/UpdatesPage.qml
@@ -33,6 +33,14 @@ ConditionalLoader
ColumnLayout {
width: app.actualWidth
anchors.centerIn: parent
+ BusyIndicator {
+ id: busy
+ visible: false
+ enabled: visible
+ anchors.horizontalCenter: parent.horizontalCenter
+ width: icon.width
+ height: icon.height
+ }
QIconItem {
anchors.horizontalCenter: parent.horizontalCenter
@@ -44,6 +52,7 @@ ConditionalLoader
id: title
Layout.fillWidth: true
horizontalAlignment: Text.AlignHCenter
+ font.pointSize: description.font.pointSize*1.5
}
Label {
id: description
@@ -54,7 +63,8 @@ ConditionalLoader
readonly property var secSinceUpdate: resourcesUpdatesModel.secsToLastUpdate
- state: ( secSinceUpdate < 0 ? "unknown"
+ state: ( ResourcesModel.isFetching ? "fetching"
+ : secSinceUpdate < 0 ? "unknown"
: secSinceUpdate < 1000 * 60 * 60 * 24 ? "uptodate"
: secSinceUpdate < 1000 * 60 * 60 * 24 * 7 ? "medium"
: "low"
@@ -62,6 +72,13 @@ ConditionalLoader
states: [
State {
+ name: "fetching"
+ PropertyChanges { target: icon; visible: false }
+ PropertyChanges { target: busy; visible: true }
+ PropertyChanges { target: title; text: i18nc("@info", "Loading...") }
+ PropertyChanges { target: description; text: "" }
+ },
+ State {
name: "uptodate"
PropertyChanges { target: icon; icon: "security-high" }
PropertyChanges { target: title; text: i18nc("@info", "The software on this computer is up to date.") }