diff options
Diffstat (limited to 'metawatch/qml')
-rw-r--r-- | metawatch/qml/com/javispedro/sowatch/metawatch/MWScrollable.qml | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/metawatch/qml/com/javispedro/sowatch/metawatch/MWScrollable.qml b/metawatch/qml/com/javispedro/sowatch/metawatch/MWScrollable.qml index 65952c1..1a48118 100644 --- a/metawatch/qml/com/javispedro/sowatch/metawatch/MWScrollable.qml +++ b/metawatch/qml/com/javispedro/sowatch/metawatch/MWScrollable.qml @@ -10,9 +10,15 @@ Flickable { boundsBehavior: Flickable.StopAtBounds flickableDirection: Flickable.VerticalFlick + contentWidth: childrenRect.width + contentHeight: childrenRect.height + function scrollDown() { - var maxY = contentHeight - height; + console.log(contentHeight + " " + height); + console.log(childrenRect.height); + var maxY = Math.max(0, contentHeight - height); var newContentY = contentY + 96/3; + console.log(maxY + " " + newContentY); if (newContentY > maxY) { contentY = maxY; // Never overscroll. |