@@ -22,7 +22,7 @@ import "../Components/ListItems" as ListItems
2222Item {
2323 id: root
2424
25− property alias model: repeater.model
25+ property alias model: list.model
2626 property var scopeStyle
2727 property bool isFavoriteFeeds: false
2828
@@ -42,60 +42,62 @@ Item {
4242 property var myComponents: JSON.parse('{"art":{"aspect-ratio":1,"field":"art"},"title":{"field":"title"},"attributes":{}}')
4343
4444
45− Column {
46− anchors.top: header.bottom
47− Repeater {
48− id: repeater
45+ ListView {
46+ id: list
47+ height: contentHeight
48+ interactive: false
4949
50− delegate: Loader {
51− asynchronous: true
50+ anchors.top: header.bottom
51+ delegate: Loader {
52+ asynchronous: true
53+ width: root.width
54+ height: units.gu(6)
55+ sourceComponent: Item {
56+ height: units.gu(6)
5257 width: root.width
53− sourceComponent: Item {
54− height: units.gu(6)
55− UbuntuShape {
56− id: shape
57− anchors {
58− left: parent.left
59− leftMargin: units.gu(1)
60− verticalCenter: parent.verticalCenter
61− }
62− width: units.gu(5)
63− height: units.gu(5)
64− image: Image {
65− source: model["art"] || ""
66− cache: true
67− fillMode: Image.PreserveAspectCrop
68− }
58+ UbuntuShape {
59+ id: shape
60+ anchors {
61+ left: parent.left
62+ leftMargin: units.gu(1)
63+ verticalCenter: parent.verticalCenter
64+ }
65+ width: units.gu(5)
66+ height: units.gu(5)
67+ image: Image {
68+ source: model["art"] || ""
69+ cache: true
70+ fillMode: Image.PreserveAspectCrop
6971 }
70− Label {
71− id: titleLabel
72− anchors {
73− left: shape.right
74− leftMargin: units.gu(1)
75− right: star.right
76− rightMargin: units.gu(1)
77− verticalCenter: parent.verticalCenter
78− }
79− text: model["title"] || ""
80− elide: Text.ElideRight
81− wrapMode: Text.Wrap
82− maximumLineCount: 1
83− verticalAlignment: Text.AlignHCenter
72+ }
73+ Label {
74+ id: titleLabel
75+ anchors {
76+ left: shape.right
77+ leftMargin: units.gu(1)
78+ right: star.right
79+ rightMargin: units.gu(1)
80+ verticalCenter: parent.verticalCenter
81+ }
82+ text: model["title"] || ""
83+ elide: Text.ElideRight
84+ wrapMode: Text.Wrap
85+ maximumLineCount: 1
86+ verticalAlignment: Text.AlignHCenter
87+ }
88+ Icon {
89+ id: star
90+ anchors {
91+ right: parent.right
92+ rightMargin: units.gu(1)
93+ verticalCenter: parent.verticalCenter
8494 }
85− Icon {
86− id: star
87− anchors {
88− right: parent.right
89− rightMargin: units.gu(1)
90− verticalCenter: parent.verticalCenter
91− }
92− height: units.gu(2)
93− width: units.gu(2)
94− source: isFavoriteFeeds ? "image://theme/starred" : "image://theme/non-starred"
95− MouseArea {
96− anchors.fill: parent
97− onClicked: root.requestFavorite(model.scopeId, !isFavoriteFeeds);
98− }
95+ height: units.gu(2)
96+ width: units.gu(2)
97+ source: isFavoriteFeeds ? "image://theme/starred" : "image://theme/non-starred"
98+ MouseArea {
99+ anchors.fill: parent
100+ onClicked: root.requestFavorite(model.scopeId, !isFavoriteFeeds);
99101 }
100102 }
101103 }