@@ -41,9 +41,7 @@ DashPreview {
4141 }
4242 }
4343
44− title: Label {
45− id: title
46− objectName: "titleLabel"
44+ title: Column {
4745 anchors {
4846 top: parent.top
4947 topMargin: units.gu(2)
@@ -51,18 +49,39 @@ DashPreview {
5149 right: parent.right
5250 }
5351
54− elide: Text.ElideRight
55− fontSize: "x-large"
56− font.weight: Font.Light
57− color: Theme.palette.selected.backgroundText
58− opacity: 0.9
59− text: previewData.title
60− style: Text.Raised
61− styleColor: "black"
62− maximumLineCount: 2
63− wrapMode: Text.WordWrap
64− }
52+ Label {
53+ id: title
54+ objectName: "titleLabel"
55+ anchors { left: parent.left; right: parent.right }
6556
57+ elide: Text.ElideRight
58+ fontSize: "x-large"
59+ font.weight: Font.Light
60+ color: Theme.palette.selected.backgroundText
61+ opacity: 0.9
62+ text: previewData.title
63+ style: Text.Raised
64+ styleColor: "black"
65+ maximumLineCount: 2
66+ wrapMode: Text.WordWrap
67+ }
68+
69+ Label {
70+ anchors { left: parent.left; right: parent.right }
71+ visible: text != ""
72+ fontSize: "medium"
73+ opacity: 0.6
74+ color: "white"
75+ text: previewData.subtitle.replace(/[\r\n]+/g, "<br />")
76+ style: Text.Raised
77+ styleColor: "black"
78+ wrapMode: Text.WordWrap
79+ textFormat: Text.RichText
80+ maximumLineCount: 1
81+ // FIXME: workaround for https://bugreports.qt-project.org/browse/QTBUG-33020
82+ onWidthChanged: { wrapMode = Text.NoWrap; wrapMode = Text.WordWrap }
83+ }
84+ }
6685 buttons: GridView {
6786 id: buttons
6887 model: genericPreview.previewData.actions
@@ -97,21 +116,7 @@ DashPreview {
97116 spacing: units.gu(2)
98117
99118 Label {
100− anchors { left: parent.left; right: parent.right }
101− visible: text != ""
102− fontSize: "medium"
103− opacity: 0.6
104− color: "white"
105− text: previewData.subtitle.replace(/[\r\n]+/g, "<br />")
106− style: Text.Raised
107− styleColor: "black"
108− wrapMode: Text.WordWrap
109− textFormat: Text.RichText
110− // FIXME: workaround for https://bugreports.qt-project.org/browse/QTBUG-33020
111− onWidthChanged: { wrapMode = Text.NoWrap; wrapMode = Text.WordWrap }
112− }
113−
114− Label {
119+ id: descriptionLabel
115120 anchors { left: parent.left; right: parent.right }
116121 visible: text != ""
117122 fontSize: "small"
@@ -125,5 +130,47 @@ DashPreview {
125130 // FIXME: workaround for https://bugreports.qt-project.org/browse/QTBUG-33020
126131 onWidthChanged: { wrapMode = Text.NoWrap; wrapMode = Text.WordWrap }
127132 }
133+
134+ Column {
135+ id: infoItem
136+ anchors {
137+ left: parent.left
138+ right: parent.right
139+ }
140+ Repeater {
141+ model: previewData.infoHints
142+
143+ delegate: Grid {
144+ columns: 2
145+ width: parent.width
146+ spacing: units.gu(1)
147+
148+ Label {
149+ visible: directedLabel.visible
150+ fontSize: "small"
151+ opacity: 0.9
152+ color: "white"
153+ horizontalAlignment: Text.AlignLeft
154+ width: infoItem.width / 2
155+ text: modelData.displayName
156+ style: Text.Raised
157+ styleColor: "black"
158+ }
159+ Label {
160+ id: directedLabel
161+ visible: modelData.value != ""
162+ fontSize: "small"
163+ opacity: 0.6
164+ color: "white"
165+ horizontalAlignment: Text.AlignRight
166+ width: infoItem.width / 2
167+ text: modelData.value ? modelData.value : ""
168+ style: Text.Raised
169+ styleColor: "black"
170+ wrapMode: Text.WordWrap
171+ }
172+ }
173+ }
174+ }
128175 }
129176}