From 25eecf940815db811f66256831a7b74a3b8ea9f7 Mon Sep 17 00:00:00 2001 From: "Javier S. Pedro" Date: Sun, 12 May 2013 15:35:25 +0200 Subject: mwscrollable bug --- metawatch/qml/com/javispedro/sowatch/metawatch/MWScrollable.qml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'metawatch') 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. -- cgit v1.2.3