~qqworini/ubuntu-rssreader-app/alpha-1

« back to all changes in this revision

Viewing changes to ArticleOneImgB.qml

  • Committer: Tarmac
  • Author(s): Dariusz Gadomski
  • Date: 2013-07-30 08:34:07 UTC
  • mfrom: (20.2.2 relative-time-formatting)
  • Revision ID: tarmac-20130730083407-v69zz7s1glpps1yh
Improved relative time formatting utility.

Approved by Ubuntu Phone Apps Jenkins Bot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
import QtQuick 2.0
2
2
import Ubuntu.Components 0.1
3
3
import Ubuntu.Components.ListItems 0.1 as ListItem
 
4
import "./dateutils.js" as DateUtils
4
5
 
5
6
Column {
6
7
    id: delegate_item
7
8
    width: units.gu(34)
8
9
//    height: units.gu(16)
9
10
//    anchors.fill: parent
10
 
    property string rss_title: ""
 
11
    property variant rss_item
11
12
    property variant imageArray: []
12
13
    property variant rss_model
13
14
    property int model_index
59
60
        Label
60
61
        {
61
62
            id: label_title
62
 
            text: rss_title
 
63
            text: rss_item.title
63
64
//            anchors.horizontalCenter: parent.horizontalCenter
64
65
            width: units.gu(14)
65
66
            wrapMode: Text.WrapAtWordBoundaryOrAnywhere
91
92
    Label
92
93
    {
93
94
        id: label_time
94
 
        text: "13 minutes ago"
 
95
        text: DateUtils.formatRelativeTime(i18n, rss_item.pubdate)
95
96
        color: "black"
96
97
        fontSize: "medium"
97
98
    }