2014-07-09 14:18:48 +00:00
|
|
|
import QtQuick 2.0
|
|
|
|
|
|
|
|
Rectangle {
|
|
|
|
property var flickable
|
|
|
|
property int yPos: 0
|
|
|
|
|
|
|
|
function flickableContentYChanged() {
|
|
|
|
if(flickable === undefined)
|
|
|
|
return
|
|
|
|
|
|
|
|
var t = flickable.height - height
|
|
|
|
y = (flickable.contentY / (flickable.contentHeight - flickable.height)) * t + yPos
|
|
|
|
}
|
|
|
|
|
2014-07-22 14:55:25 +00:00
|
|
|
width: 15
|
2014-07-09 14:18:48 +00:00
|
|
|
height: {
|
|
|
|
var t = (flickable.height * flickable.height) / flickable.contentHeight
|
|
|
|
return t < 20 ? 20 : t
|
|
|
|
}
|
|
|
|
z: 1; y: yPos
|
|
|
|
color: "#DBDBDB"
|
|
|
|
anchors.right: flickable.right
|
|
|
|
opacity: flickable.moving ? 0.5 : 0
|
|
|
|
visible: flickable.contentHeight > flickable.height
|
|
|
|
|
|
|
|
Behavior on opacity {
|
|
|
|
NumberAnimation { duration: 100; easing.type: Easing.InQuad }
|
|
|
|
}
|
|
|
|
}
|