← Back to team overview

ubuntu-touch-coreapps-reviewers team mailing list archive

[Merge] lp:~pkunal-parmar/ubuntu-calendar-app/WeekView-Scrolling into lp:ubuntu-calendar-app

 

Kunal Parmar has proposed merging lp:~pkunal-parmar/ubuntu-calendar-app/WeekView-Scrolling into lp:ubuntu-calendar-app.

Commit message:
Changed week view scrolling to resolve Bug #1473682

Requested reviews:
  Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot): continuous-integration
  Ubuntu Calendar Developers (ubuntu-calendar-dev)
Related bugs:
  Bug #1473682 in Ubuntu Calendar App: "[Calendar] Scrolling in Week view is confusing"
  https://bugs.launchpad.net/ubuntu-calendar-app/+bug/1473682

For more details, see:
https://code.launchpad.net/~pkunal-parmar/ubuntu-calendar-app/WeekView-Scrolling/+merge/269564

Changed week view scrolling to resolve Bug #1473682
-- 
Your team Ubuntu Calendar Developers is requested to review the proposed merge of lp:~pkunal-parmar/ubuntu-calendar-app/WeekView-Scrolling into lp:ubuntu-calendar-app.
=== modified file 'EventBubble.qml'
--- EventBubble.qml	2015-01-22 19:34:59 +0000
+++ EventBubble.qml	2015-08-29 09:01:33 +0000
@@ -221,8 +221,8 @@
         anchors.fill: parent
         drag.target: isLiveEditing ? infoBubble : null
         drag.axis: Drag.YAxis
-        drag.minimumY: flickable.y
-        drag.maximumY: flickable.contentHeight - infoBubble.height
+        drag.minimumY: flickable ? flickable.y : 0
+        drag.maximumY: flickable ? flickable.contentHeight - infoBubble.height : infoBubble.height
         onReleased: parent.Drag.drop()
         onClicked: {
             if( isLiveEditing ) {

=== modified file 'PathViewBase.qml'
--- PathViewBase.qml	2014-09-20 10:45:35 +0000
+++ PathViewBase.qml	2015-08-29 09:01:33 +0000
@@ -51,6 +51,23 @@
         return 1;
     }
 
+    function swipeDirection() {
+
+        if( intern.previousIndex == 0 && currentIndex == count - 1) {
+            return -1;
+        }
+
+        if( intern.previousIndex == count-1 && currentIndex == 0) {
+            return 1;
+        }
+
+        if(currentIndex > intern.previousIndex ){
+            return 1;
+        } else {
+            return -1;
+        }
+    }
+
     Keys.onLeftPressed:{
         root.decrementCurrentIndex();
     }

=== modified file 'TimeLineBaseComponent.qml'
--- TimeLineBaseComponent.qml	2015-07-25 05:19:10 +0000
+++ TimeLineBaseComponent.qml	2015-08-29 09:01:33 +0000
@@ -72,7 +72,13 @@
                 timeLineView.contentX = timeLineView.contentWidth - timeLineView.width
             }
         } else {
-            timeLineView.contentX = 0;
+            //need to check swipe direction
+            //and change startion position as per direction
+            if(weekViewPath.swipeDirection() === -1) {
+                timeLineView.contentX = timeLineView.contentWidth - timeLineView.width
+            } else {
+                timeLineView.contentX = 0;
+            }
         }
     }