~mutse-young/ubuntu-docviewer-app/trunk

« back to all changes in this revision

Viewing changes to src/app/qml/pdfView/PdfContentsPage.qml

  • Committer: Tarmac
  • Author(s): carla-sella
  • Date: 2015-05-15 12:47:01 UTC
  • mfrom: (127.1.19 test-toc)
  • Revision ID: tarmac-20150515124701-q65mnbh76iix4yqf
First test for testing Docviewer app TOC. Fixes: https://bugs.launchpad.net/bugs/1418652.

Approved by Ubuntu Phone Apps Jenkins Bot, Nicholas Skaggs, Stefano Verzegnassi.

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
import "../upstreamComponents"
23
23
 
24
24
Page {
 
25
    id: pdfContents
 
26
    objectName: "pdfcontents"
 
27
 
 
28
    // this property will have to be removed when bug #1341671 will be fixed.
 
29
    property string testProperty: "for page name issue"
 
30
 
25
31
    // TRANSLATORS: "Contents" refers to the "Table of Contents" of a PDF document.
26
32
    title: i18n.tr("Contents")
27
33
 
57
63
 
58
64
    ListView {
59
65
        id: view
 
66
        objectName: "view"
60
67
        anchors.fill: parent
61
68
        clip: true
62
69
 
64
71
 
65
72
        delegate: ListItemWithActions {
66
73
            id: delegate
 
74
            objectName: "delegate" + index
67
75
 
68
76
            width: parent.width
69
77
            height: (model.level === 0) ? units.gu(7) : units.gu(6)
73
81
                                                      : Theme.palette.normal.background
74
82
 
75
83
            AbstractButton {
 
84
                objectName: "abstractbutton"
76
85
                anchors.fill: parent
77
86
 
78
87
                onClicked: {
91
100
                spacing: units.gu(1)
92
101
 
93
102
                Label {
 
103
                    objectName: "content"
94
104
                    Layout.fillWidth: true
95
105
 
96
106
                    text: model.title
102
112
                }
103
113
 
104
114
                Label {
 
115
                    objectName: "pageindex"
105
116
                    text: model.pageIndex + 1
106
117
                    font.weight: model.level == 0 ? Font.DemiBold : Font.Normal
107
118
                    color: (model.level === 0) ? UbuntuColors.midAubergine