From 76d1d48bffca11041b5f3ed8ed41b1d5addb5d30 Mon Sep 17 00:00:00 2001 From: Thomas Perl Date: Mon, 27 Oct 2014 12:52:05 +0100 Subject: [PATCH] Scroll decorator should hint when data is hidden --- touch/PScrollDecorator.qml | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/touch/PScrollDecorator.qml b/touch/PScrollDecorator.qml index 3682766..0e2a2ad 100644 --- a/touch/PScrollDecorator.qml +++ b/touch/PScrollDecorator.qml @@ -27,10 +27,29 @@ Rectangle { x: flickable.width - width y: flickable.visibleArea.yPosition * flickable.height - width: 5 * pgst.scalef + width: 10 * pgst.scalef height: flickable.visibleArea.heightRatio * flickable.height visible: flickable.visibleArea.heightRatio < 1 color: Constants.colors.background - opacity: flickable.moving ? 1 : 0 + opacity: (showMoreTimer.showTemporarily || flickable.moving) ? .5 : 0 Behavior on opacity { PropertyAnimation { duration: 100 } } + + Timer { + id: showMoreTimer + property bool showTemporarily: false + interval: 500 + onTriggered: { + if (parent.visible && !showTemporarily) { + showTemporarily = true; + showMoreTimer.interval = 2000; + showMoreTimer.start(); + } else { + showTemporarily = false; + } + } + } + + Component.onCompleted: { + showMoreTimer.start(); + } }