[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [plasma-mobile/mart/themeunits] components/mobilecomponents/qml: proper animation behavior in pop()
From:       Marco Martin <notmart () gmail ! com>
Date:       2015-11-29 16:30:13
Message-ID: E1a34rd-00013j-FS () scm ! kde ! org
[Download RAW message or body]

Git commit 4cc9b26297bb3b57fb7ca06578d7e02891fe45bf by Marco Martin.
Committed on 29/11/2015 at 16:30.
Pushed by mart into branch 'mart/themeunits'.

proper animation behavior in pop()

M  +4    -1    components/mobilecomponents/qml/PageRow.qml

http://commits.kde.org/plasma-mobile/4cc9b26297bb3b57fb7ca06578d7e02891fe45bf

diff --git a/components/mobilecomponents/qml/PageRow.qml \
b/components/mobilecomponents/qml/PageRow.qml index 941f77f..364ba31 100644
--- a/components/mobilecomponents/qml/PageRow.qml
+++ b/components/mobilecomponents/qml/PageRow.qml
@@ -82,6 +82,7 @@ Item {
     // Returns the page instance.
     function push(page, properties, immediate)
     {
+        scrollAnimation.running = false;
         var item = Engine.push(page, properties, false, immediate)
         scrollToLevel(depth)
         return item
@@ -93,6 +94,7 @@ Item {
     // Returns the page instance that was popped off the stack.
     function pop(page, immediate)
     {
+        scrollToLevel(depth-1);
         return Engine.pop(page, immediate);
     }
 
@@ -100,6 +102,7 @@ Item {
     // See push() for details.
     function replace(page, properties, immediate)
     {
+        scrollAnimation.running = false;
         var item = Engine.push(page, properties, true, immediate);
         scrollToLevel(depth)
         return item
@@ -128,7 +131,7 @@ Item {
         }
 
         var firstLevel = Math.max(0, level - mainFlickable.width/columnWidth + 1);
-        scrollAnimation.to = Math.max(0, Math.min(Math.max(0, columnWidth * \
(firstLevel - 1)), mainFlickable.contentWidth+1000)) +        scrollAnimation.to = \
Math.max(0, Math.min(Math.max(0, columnWidth * (firstLevel - 1)), \
mainFlickable.contentWidth))  scrollAnimation.running = true
     }
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic