2
import Ubuntu.Components 1.1
3
import Ubuntu.Components.ListItems 1.0 as ListItem
4
import "../dateutils.js" as DateUtils
5
import "../databasemodule_v2.js" as DB
11
property bool invalid: false
12
property var modelItem
14
property int modelIndex
16
// property string secretProp: ""
19
height: units.gu(20) /*content.height + units.gu(4)*/
20
color: invalid ? "black" : modelItem.status == "1" ? Qt.rgba(0, 0, 0, 0.7) : Qt.rgba(0, 0, 0, 0.4)
24
if (modelItem == null) {
33
fill: parent; topMargin: units.gu(2); bottomMargin: units.gu(1.5);
34
leftMargin: units.gu(1); rightMargin: units.gu(1.5)
43
height: labelTime.paintedHeight
44
spacing: units.gu(0.5)
48
anchors.verticalCenter: labelTime.verticalCenter
49
fillMode: Image.PreserveAspectCrop
50
source: Qt.resolvedUrl("../icons_tmp/favorite-selected.svg")
51
sourceSize.height: invalid ? 0 : (modelItem.favourite == "1" ? units.gu(1.5) : 0)
52
visible: invalid ? false : (modelItem.favourite == "1")
57
text: { invalid ? "" : DateUtils.formatRelativeTime(i18n, modelItem.pubdate) }
59
width: parent.width - units.gu(2)
60
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
68
text: invalid ? "" : modelItem.title
73
height: parent.height - parent.spacing * 2 - labelTime.paintedHeight - labelFeedname.paintedHeight
74
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
76
textFormat: Text.PlainText
77
font.weight: Font.DemiBold
78
elide: Text.ElideRight
79
opacity: invalid ? 0.4 : modelItem.status == "1" ? 0.4 : 0.8
85
text: invalid? "" : modelItem.feed_name
91
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
99
mainView.showArticle(rssModel, modelIndex)