~uriboni/webbrowser-app/tab-context-menu

« back to all changes in this revision

Viewing changes to src/app/webbrowser/HistorySectionDelegate.qml

  • Committer: CI Train Bot
  • Author(s): Arthur Mello, Ugo Riboni, Olivier Tilloy
  • Date: 2015-08-12 19:53:13 UTC
  • mfrom: (1126.1.5 wide-views-newtab-history)
  • Revision ID: ci-train-bot@canonical.com-20150812195313-u5v7kzrj8hfiacsj
Wide screen versions of the history view and new tab view, per design specification.
This adds a build dependency on qml-module-qt-labs-settings (for unit tests). Fixes: #1351157, #1481647

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
import Ubuntu.Components.ListItems 1.3 as ListItem
22
22
 
23
23
Item {
24
 
    height: units.gu(6.5)
 
24
    height: units.gu(5.5)
 
25
 
 
26
    property string todaySectionTitle: i18n.tr("Last Visited") 
25
27
 
26
28
    Label {
27
29
        anchors {
28
30
            left: parent.left
29
31
            right: parent.right
30
32
            top: parent.top
31
 
            topMargin: units.gu(2.5)
 
33
            topMargin: units.gu(1.5)
32
34
        }
33
35
        height: units.gu(2)
34
36
 
41
43
                (sectionDate.getUTCMonth() == today.getMonth())) {
42
44
                var dayDifference = sectionDate.getUTCDate() - today.getDate()
43
45
                if (dayDifference == 0) {
44
 
                    return i18n.tr("Last Visited")
 
46
                    return todaySectionTitle
45
47
                } else if (dayDifference == -1) {
46
48
                    return i18n.tr("Yesterday")
47
49
                }
48
50
            }
49
 
            return Qt.formatDate(sectionDate, Qt.DefaultLocaleLongDate)
 
51
            return Qt.formatDate(section, Qt.DefaultLocaleLongDate)
50
52
        }
51
53
 
52
54
        fontSize: "small"