From e4e0c608e1234df4b238bfaf2a21abb7303cdca9 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Sat, 20 Oct 2018 05:01:11 -0400 Subject: 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 --- mobile-widgets/qml/DiveList.qml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'mobile-widgets/qml/DiveList.qml') 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: { -- cgit v1.2.3-70-g09d2