Scroll decorator should hint when data is hidden
This commit is contained in:
parent
e6f8e7ab4b
commit
76d1d48bff
1 changed files with 21 additions and 2 deletions
|
@ -27,10 +27,29 @@ Rectangle {
|
||||||
|
|
||||||
x: flickable.width - width
|
x: flickable.width - width
|
||||||
y: flickable.visibleArea.yPosition * flickable.height
|
y: flickable.visibleArea.yPosition * flickable.height
|
||||||
width: 5 * pgst.scalef
|
width: 10 * pgst.scalef
|
||||||
height: flickable.visibleArea.heightRatio * flickable.height
|
height: flickable.visibleArea.heightRatio * flickable.height
|
||||||
visible: flickable.visibleArea.heightRatio < 1
|
visible: flickable.visibleArea.heightRatio < 1
|
||||||
color: Constants.colors.background
|
color: Constants.colors.background
|
||||||
opacity: flickable.moving ? 1 : 0
|
opacity: (showMoreTimer.showTemporarily || flickable.moving) ? .5 : 0
|
||||||
Behavior on opacity { PropertyAnimation { duration: 100 } }
|
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();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue