diff options
| author | Javier S. Pedro <maemo@javispedro.com> | 2013-05-12 15:35:25 +0200 | 
|---|---|---|
| committer | Javier S. Pedro <maemo@javispedro.com> | 2013-05-12 15:35:25 +0200 | 
| commit | 25eecf940815db811f66256831a7b74a3b8ea9f7 (patch) | |
| tree | 01d103ae930e34b231b4f8e52194aef7bc6e4601 | |
| parent | 3ca9235ddb93b52730099164a0dc387f7a301280 (diff) | |
| download | sowatch-25eecf940815db811f66256831a7b74a3b8ea9f7.tar.gz sowatch-25eecf940815db811f66256831a7b74a3b8ea9f7.zip | |
mwscrollable bug
| -rw-r--r-- | metawatch/qml/com/javispedro/sowatch/metawatch/MWScrollable.qml | 8 | ||||
| -rw-r--r-- | metawatchwatchlets/metawatch-digital-notification.qml | 6 | 
2 files changed, 10 insertions, 4 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. diff --git a/metawatchwatchlets/metawatch-digital-notification.qml b/metawatchwatchlets/metawatch-digital-notification.qml index dad8cca..dd4dc66 100644 --- a/metawatchwatchlets/metawatch-digital-notification.qml +++ b/metawatchwatchlets/metawatch-digital-notification.qml @@ -99,12 +99,15 @@ MWPage {  	}  	function openNotification(notification) { +		scrollable.scrollTop();  		curNotification = notification;  	}  	Connections {  		target: watch  		onButtonPressed: { +			console.log(emailContainer.height); +			console.log()  			switch (button) {  			case 1:  				scrollable.scrollUp(); @@ -114,8 +117,5 @@ MWPage {  				break;  			}  		} -		onActiveChanged: { -			scrollable.scrollTop(); -		}  	}  } | 
