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

List:       kde-commits
Subject:    playground/base/plasma/declarative-applets/replacements/news/package/platformcontents/application/ta
From:       Marco Martin <notmart () gmail ! com>
Date:       2011-04-08 21:09:48
Message-ID: 20110408210948.5EF1EAC8D1 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1227413 by mart:

go back with a gesture


 M  +34 -7     main.qml  


--- trunk/playground/base/plasma/declarative-applets/replacements/news/package/platformcontents/application/tablet/ui/main.qml \
#1227412:1227413 @@ -43,21 +43,24 @@
     states: [
          State {
              name: "feeds"
-             PropertyChanges { target: mainView; x: 0 }
+             PropertyChanges { target: mainFlickable; contentX: 0 }
              PropertyChanges { target: itemsList; width: mainWindow.width/4*3}
              PropertyChanges { target: toolbarFrame; backEnabled: false }
+             PropertyChanges { target: bodyView; visible: false}
          },
          State {
              name: "items"
-             PropertyChanges { target: mainView; x: 0 }
+             PropertyChanges { target: mainFlickable; contentX: 0 }
              PropertyChanges { target: itemsList; width: mainWindow.width/4*3}
              PropertyChanges { target: toolbarFrame; backEnabled: false }
+             PropertyChanges { target: bodyView; visible: false}
          },
          State {
              name: "item"
-             PropertyChanges { target: mainView; x: -mainWindow.width/4}
+             PropertyChanges { target: mainFlickable; contentX: mainWindow.width/4}
              PropertyChanges { target: itemsList; width: mainWindow.width/4}
              PropertyChanges { target: toolbarFrame; backEnabled: true }
+             PropertyChanges { target: bodyView; visible: true}
          }
      ]
 
@@ -109,21 +112,44 @@
             onBackRequested: bodyView.html = bodyView.articleHtml
         }
 
-        Row {
-            id: mainView
-            width: mainWindow.width
+        Flickable {
+            id: mainFlickable
+            interactive: mainWindow.state == "item"
+            contentWidth: mainView.width
+            contentHeight: mainView.height
+            width: mainWindow.width/4
             height: mainWindow.height - toolbarFrame.height +9
 
-            Behavior on x {
+            Behavior on contentX {
                 NumberAnimation {duration: 250; easing.type: Easing.InOutQuad}
             }
 
+            onMovementEnded: {
+                if (contentX < mainWindow.width/8) {
+                    mainWindow.state = "items"
+                } else {
+                    contentX = mainWindow.width/4
+                }
+            }
+
+            Row {
+                id: mainView
+                //width: mainWindow.width
+                height: mainFlickable.height
+
             FeedList {
                 id: feedList
                 anchors.top: mainView.top
                 anchors.bottom: mainView.bottom
                 width: mainWindow.width/4
+
+                    PlasmaCore.SvgItem {
+                        width: 32
+                        height: feedList.height
+                        svg: shadowSvg
+                        elementId: "right"
             }
+                }
 
             ItemsList {
                 id: itemsList
@@ -162,3 +188,4 @@
         }
     }
 }
+}


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

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