~ubuntu-docviewer-dev/ubuntu-docviewer-app/lo-viewer

« back to all changes in this revision

Viewing changes to src/app/qml/loView/PartsView.qml

Use UITK 1.3 ListItemLayout.

Approved by Jenkins Bot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
49
49
 
50
50
            onClicked: internal.delegate_onClicked(model.index)
51
51
 
52
 
            RowLayout {
53
 
                anchors {
54
 
                    fill: parent
55
 
                    leftMargin: units.gu(1)
56
 
                    rightMargin: units.gu(1)
57
 
                }
58
 
                spacing: units.gu(1)
59
 
 
 
52
            /*** UITK 1.3 specs: Three slot layout (B-A-C)
 
53
              ________________________________________
 
54
             |   |                                |   |
 
55
             | B |               A                | C |
 
56
             |___|________________________________|___|
 
57
 
 
58
            *********************************************/
 
59
 
 
60
            ListItemLayout {
 
61
                id: listItemLayout
 
62
                anchors.fill: parent
 
63
 
 
64
                /* UITK 1.3 specs: Slot B */
60
65
                Image {
61
 
                    Layout.fillHeight: true
62
 
                    Layout.preferredWidth: height
 
66
                    SlotsLayout.position: SlotsLayout.Leading
 
67
                    height: parent.height; width: height
63
68
                    fillMode: Image.PreserveAspectFit
64
69
                    // Do not store a cache of the thumbnail, so that we don't show
65
70
                    // thumbnails of a previously loaded document.
67
72
                    source: model.thumbnail
68
73
                }
69
74
 
70
 
                Label {
71
 
                    Layout.fillWidth: true
 
75
                /* UITK 1.3 specs: Slot A */
 
76
                title {
72
77
                    wrapMode: Text.WordWrap
73
78
                    text: model.name
74
79
                    visible: view.isWide
76
81
                                                                         : theme.palette.selected.backgroundText
77
82
                }
78
83
 
 
84
                /* UITK 1.3 specs: Slot C */
79
85
                Label {
 
86
                    SlotsLayout.position: SlotsLayout.Trailing
 
87
 
80
88
                    text: model.index + 1
81
89
                    color: (loView.document.currentPart === model.index) ? UbuntuColors.orange
82
90
                                                                         : theme.palette.selected.backgroundText