psa: Full width articles
[feedingit] / psa_harmattan / feedingit / deb_dist / feedingit-0.1.0 / qml / ArticleViewer.qml
index 7e58501..f4a18a9 100644 (file)
@@ -69,7 +69,7 @@ Item {
         width: parent.width;
         height: updateBarArticles.visible? parent.height-updateBarArticles.height : parent.height;
         visible: false; z:8
-        //onCurrentIndexChanged: photosGridView.positionViewAtIndex(currentIndex, GridView.Contain)
+        onCurrentIndexChanged: articlesView.positionViewAtIndex(currentIndex, ListView.Contain)
         highlightRangeMode: ListView.StrictlyEnforceRange; snapMode: ListView.SnapOneItem
         //cacheBuffer: 5;
         onMovementStarted: articleViewer.vertPanningEnabled=false;
@@ -165,7 +165,7 @@ Item {
                     font.pointSize: settings.articleListingTextSize
                 }
                 MouseArea { anchors.fill: listItem;
-                    onClicked: { articleView.positionViewAtIndex(index, ListView.Contain); articleView.visible = true; }
+                    onClicked: { articleView.currentIndex = index; articleView.visible = true; }
                 }
             }
 
@@ -175,11 +175,13 @@ Item {
         id: viewer
         Item {
             id: flipItem;
-            width: articleViewer.width; height: articleViewer.height;
+            width: articleDisplay.width;
+            height: articleView.height;
 
             //property string url: (articleView.visible && Math.abs(articleView.currentIndex-index)<2) ? path: "";
             property string html: controller.getArticle(articleViewer.feedid, articleid)
             ArticleDisplay {
+                id: articleDisplay
                 zoomEnabled: articleViewer.zoomEnabled;
                 property bool vertPanningEnabled: articleViewer.vertPanningEnabled;