summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2018-10-20 05:01:11 -0400
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-10-23 22:45:30 +0100
commite4e0c608e1234df4b238bfaf2a21abb7303cdca9 (patch)
treea9b0dde03a8dc0cb60d6a5804816591611f0fbfe
parent52ec544c3b44054ad0d54c797a09c0a36572528c (diff)
downloadsubsurface-e4e0c608e1234df4b238bfaf2a21abb7303cdca9.tar.gz
Mobile/filtering: simple busy indicator
Filtering takes a noticeable time on mobile, so lets show the user we are doing something. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--mobile-widgets/qml/DiveList.qml14
1 files changed, 13 insertions, 1 deletions
diff --git a/mobile-widgets/qml/DiveList.qml b/mobile-widgets/qml/DiveList.qml
index 1e4d1cff4..2e0ef290e 100644
--- a/mobile-widgets/qml/DiveList.qml
+++ b/mobile-widgets/qml/DiveList.qml
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0
import QtQuick 2.6
-import QtQuick.Controls 2.2 as Controls
+import QtQuick.Controls 2.4 as Controls
import QtQuick.Layouts 1.2
import QtQuick.Window 2.2
import QtQuick.Dialogs 1.2
@@ -19,6 +19,7 @@ Kirigami.ScrollablePage {
property color secondaryTextColor: subsurfaceTheme.secondaryTextColor
property int horizontalPadding: Kirigami.Units.gridUnit / 2 - Kirigami.Units.smallSpacing + 1
property string activeTrip
+ property bool showBusy: false
supportsRefreshing: true
onRefreshingChanged: {
@@ -324,6 +325,13 @@ Kirigami.ScrollablePage {
}
}
+ Controls.BusyIndicator {
+ running: showBusy
+ z: 10
+ anchors.fill: parent
+ anchors.margins: Kirigami.Units.gridUnit
+ }
+
StartPage {
id: startPage
anchors.fill: parent
@@ -412,8 +420,12 @@ Kirigami.ScrollablePage {
text: ""
placeholderText: "Full text search"
onAccepted: {
+ showBusy = true
+ console.log("show busy")
rootItem.filterPattern = text
diveModel.setFilter(text)
+ console.log("back from setFilter")
+ showBusy = false
numShown.text = diveModel.shown()
}
onVisibleChanged: {