X-Git-Url: http://git.maemo.org/git/?p=quicknewsreader;a=blobdiff_plain;f=qml%2FQuickNewsReader%2Fcontent%2Fview%2FNewsDelegate.qml;h=bc5c88b4861793b47b01d50164faf0535cc21fa3;hp=d51f3ee30be6d59facd557515a714f8726430f0b;hb=2263ab5869648d0eb7d82d8794aae03fd0ce954d;hpb=a51793a460112730f0fed3d58dcc3c4b2393553e diff --git a/qml/QuickNewsReader/content/view/NewsDelegate.qml b/qml/QuickNewsReader/content/view/NewsDelegate.qml index d51f3ee..bc5c88b 100644 --- a/qml/QuickNewsReader/content/view/NewsDelegate.qml +++ b/qml/QuickNewsReader/content/view/NewsDelegate.qml @@ -59,6 +59,7 @@ Item { Row { + id: descriptionRow spacing: 5 Image { @@ -67,7 +68,7 @@ Item { } Text { - anchors.verticalCenter: detailImage.verticalCenter + anchors.verticalCenter: descriptionRow.verticalCenter text: description; width: column.width - detailImage.width - 10; wrapMode: Text.WordWrap font.family: "Helvetica" } @@ -78,9 +79,10 @@ Item { anchors.fill: delegate onClicked: { - if (typeof detailedContent != "undefined") { - var currentSourceDepth = delegate.ListView.view.model.sourceDepth + var currentSourceDepth = delegate.ListView.view.model.sourceDepth + if (listSourceModel[window.currentSourceIndex].listViews.length >= currentSourceDepth+1) + { // here we remove everything in viewsModel after index "nextSourceDepth" while(window.windowViewsModel.count>currentSourceDepth+1) window.windowViewsModel.remove(window.windowViewsModel.count-1) @@ -88,18 +90,10 @@ Item { delegate.ListView.view.currentIndex = index var path = listSourceModel[window.currentSourceIndex].currentPath path[currentSourceDepth] = index - listSourceModel[window.currentSourceIndex].currentPath = path + listSourceModel[window.currentSourceIndex].currentPath = path.slice(0,currentSourceDepth+1) window.windowViewsModel.append({ component: listSourceModel[window.currentSourceIndex].listViews[currentSourceDepth].viewComponent, - componentId: listSourceModel[window.currentSourceIndex].listViews[currentSourceDepth].viewId, componentDepth: currentSourceDepth+1 }) - - window.windowViewsList.currentIndex = currentSourceDepth+1; - - //newsDetailRect.webViewAction.enabled = false - //// sourcesRect.x -= window.width + newsRect.x - //newsDetailRect.webViewAction.enabled = true - //newsDetailRect.webViewAction.trigger() } } }