on xenial help sign in
Merged with trunk.
commite74d03a846c0abc2883250cfce2bdeb33cd36d64 authorLeo Arias <leo.arias@canonical.com> dateTue 28 Jan 2014, 08:42 (13 years ago) parentecd66c2be2d485
12 files changed+244−57
data/unity8.conf+1 debian/control+1 po/fr.po+29−29 po/it.po+7−7 po/ru.po+7−6 po/zh_HK.po+157 qml/Components/ResponsiveGridView.qml+1−1 qml/Dash/Card.qml+1 qml/Dash/CardHeader.qml+5−1 tests/qmltests/Components/tst_ResponsiveGridView.qml+1−1 tests/qmltests/Dash/tst_Card.qml+21−4 tests/qmltests/Dash/tst_CardHeader.qml+13−8
data/unity8.conf+1
@@ -24,6 +24,7 @@ pre-start script
2424 # Point all future jobs in this session to our Mir socket instead of
2525 # unity-system-compositor's socket.
2626 initctl set-env --global MIR_SOCKET=$MIR_SERVER_FILE
27+ gdbus call --session --dest org.freedesktop.DBus --object-path /org/freedesktop/DBus --method org.freedesktop.DBus.UpdateActivationEnvironment "@a{ss} {'MIR_SOCKET': '$MIR_SERVER_FILE'}"
2728 fi
2829end script
2930
debian/control+1
@@ -72,6 +72,7 @@ Package: unity8
7272Architecture: any
7373Provides: indicator-renderer,
7474Depends: gsettings-desktop-schemas,
75+ libglib2.0-bin,
7576 qmenumodel-qml (>= 0.2.7),
7677 qtdeclarative5-dee-plugin,
7778 qtdeclarative5-gsettings1.0,
po/fr.po+29−29
@@ -8,23 +8,23 @@ msgstr ""
88"Project-Id-Version: unity\n"
99"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
1010"POT-Creation-Date: 2013-11-29 09:21+0100\n"
11−"PO-Revision-Date: 2013-06-27 03:21+0000\n"
12−"Last-Translator: Michał Sawicz <michal.sawicz@canonical.com>\n"
11+"PO-Revision-Date: 2014-01-28 00:34+0000\n"
12+"Last-Translator: Pierre <Unknown>\n"
1313"Language-Team: French <fr@li.org>\n"
1414"MIME-Version: 1.0\n"
1515"Content-Type: text/plain; charset=UTF-8\n"
1616"Content-Transfer-Encoding: 8bit\n"
1717"Plural-Forms: nplurals=2; plural=n > 1;\n"
18−"X-Launchpad-Export-Date: 2013-12-29 06:04+0000\n"
19−"X-Generator: Launchpad (build 16877)\n"
18+"X-Launchpad-Export-Date: 2014-01-28 07:06+0000\n"
19+"X-Generator: Launchpad (build 16914)\n"
2020
2121#: Components/EdgeDemoOverlay.qml:151
2222msgid "Skip intro"
23−msgstr ""
23+msgstr "Passer l'intro"
2424
2525#: Components/EdgeDemo.qml:112
2626msgid "Right edge"
27−msgstr ""
27+msgstr "Bord droit"
2828
2929#: Components/EdgeDemo.qml:113
3030msgid "Try swiping from the right edge to unlock the phone"
@@ -32,7 +32,7 @@ msgstr ""
3232
3333#: Components/EdgeDemo.qml:144
3434msgid "Top edge"
35−msgstr ""
35+msgstr "Bord supérieur"
3636
3737#: Components/EdgeDemo.qml:145
3838msgid "Try swiping from the top edge to access the indicators"
@@ -40,7 +40,7 @@ msgstr ""
4040
4141#: Components/EdgeDemo.qml:170
4242msgid "Close"
43−msgstr ""
43+msgstr "Fermer"
4444
4545#: Components/EdgeDemo.qml:171
4646msgid "Swipe up again to close the settings screen"
@@ -48,7 +48,7 @@ msgstr ""
4848
4949#: Components/EdgeDemo.qml:198
5050msgid "Left edge"
51−msgstr ""
51+msgstr "Bord gauche"
5252
5353#: Components/EdgeDemo.qml:199
5454msgid "Swipe from the left to reveal the launcher for quick access to apps"
@@ -66,70 +66,70 @@ msgstr ""
6666
6767#: Components/PageHeader.qml:364
6868msgid "Recent searches"
69−msgstr ""
69+msgstr "Recherches récentes"
7070
7171#: Dash/Apps/AppPreview.qml:135
7272msgid "Rate this"
73−msgstr ""
73+msgstr "Evaluez ceci"
7474
7575#. TRANSLATORS: Number of persons who rated this app/video/whatever
7676#: Dash/Previews/Header.qml:93
7777#, qt-format
7878msgid "(%1)"
79−msgstr ""
79+msgstr "(%1)"
8080
8181#. TRANSLATORS: Number of persons who wrote reviews for this app/video/whatever
8282#: Dash/Previews/Header.qml:105
8383#, qt-format
8484msgid "%1 review"
8585msgid_plural "%1 reviews"
86−msgstr[0] ""
87−msgstr[1] ""
86+msgstr[0] "%1 avis"
87+msgstr[1] "%1 avis"
8888
8989#: Dash/Previews/Reviews.qml:74
9090msgid "Add a review"
91−msgstr ""
91+msgstr "Ajouter un avis"
9292
9393#: Dash/Previews/Reviews.qml:86
9494msgid "Review"
95−msgstr ""
95+msgstr "Avis"
9696
9797#: Dash/Previews/Reviews.qml:121
9898msgid "Send"
99−msgstr ""
99+msgstr "Envoyer"
100100
101101#: Dash/Previews/Reviews.qml:139
102102msgid "Comments:"
103−msgstr ""
103+msgstr "Commentaires :"
104104
105105#: Greeter/Lockscreen.qml:149
106106msgid "Emergency Call"
107−msgstr ""
107+msgstr "Appel d'urgence"
108108
109109#: Greeter/PassphraseLockscreen.qml:59
110110#, qt-format
111111msgid "Hello %1"
112−msgstr ""
112+msgstr "Bonjour %1"
113113
114114#: Greeter/PassphraseLockscreen.qml:59
115115msgid "Hello"
116−msgstr ""
116+msgstr "Bonjour"
117117
118118#: Hud/HudParametrizedActionsPage.qml:132
119119msgid "Confirm"
120−msgstr ""
120+msgstr "Confirmez"
121121
122122#: Hud/Hud.qml:61 Hud/Hud.qml:99 Hud/Hud.qml:372
123123msgid "Type or say a command"
124−msgstr ""
124+msgstr "Rédigez ou dictez une commande"
125125
126126#: Hud/Hud.qml:84
127127msgid "Loading. Please Wait..."
128−msgstr ""
128+msgstr "Chargement. Veuillez patienter…"
129129
130130#: Hud/Hud.qml:89
131131msgid "Speak Now..."
132−msgstr ""
132+msgstr "Parlez maintenant…"
133133
134134#: Hud/Hud.qml:94
135135msgid "Speaking..."
@@ -137,16 +137,16 @@ msgstr ""
137137
138138#: Notifications/NotificationMenuItemFactory.qml:89
139139msgid "Show password"
140−msgstr ""
140+msgstr "Afficher le mot de passe"
141141
142142#: Panel/SearchIndicator.qml:27
143143msgid "Search"
144−msgstr ""
144+msgstr "Rechercher"
145145
146146#: plugins/Unity/Launcher/launcheritem.cpp:43
147147#: plugins/Unity/Launcher/launcheritem.cpp:73
148148msgid "Lock to Launcher"
149−msgstr ""
149+msgstr "Conserver dans le lanceur"
150150
151151#: plugins/Unity/Launcher/launcheritem.cpp:73
152152msgid "Unlock from Launcher"
@@ -155,4 +155,4 @@ msgstr ""
155155#: Shell.qml:439
156156#, qt-format
157157msgid "Please enter %1"
158−msgstr ""
158+msgstr "Veuillez saisir %1"
po/it.po+7−7
@@ -8,15 +8,15 @@ msgstr ""
88"Project-Id-Version: unity\n"
99"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
1010"POT-Creation-Date: 2013-11-29 09:21+0100\n"
11−"PO-Revision-Date: 2013-10-07 09:34+0000\n"
12−"Last-Translator: Claudio Arseni <claudio.arseni@gmail.com>\n"
11+"PO-Revision-Date: 2014-01-22 09:15+0000\n"
12+"Last-Translator: Domenico <domenico.verde125@live.it>\n"
1313"Language-Team: Italian <it@li.org>\n"
1414"MIME-Version: 1.0\n"
1515"Content-Type: text/plain; charset=UTF-8\n"
1616"Content-Transfer-Encoding: 8bit\n"
1717"Plural-Forms: nplurals=2; plural=n != 1;\n"
18−"X-Launchpad-Export-Date: 2013-12-29 06:04+0000\n"
19−"X-Generator: Launchpad (build 16877)\n"
18+"X-Launchpad-Export-Date: 2014-01-23 06:00+0000\n"
19+"X-Generator: Launchpad (build 16901)\n"
2020
2121#: Components/EdgeDemoOverlay.qml:151
2222msgid "Skip intro"
@@ -144,7 +144,7 @@ msgstr "Sto parlando..."
144144
145145#: Notifications/NotificationMenuItemFactory.qml:89
146146msgid "Show password"
147−msgstr ""
147+msgstr "Mostra password"
148148
149149#: Panel/SearchIndicator.qml:27
150150msgid "Search"
@@ -153,11 +153,11 @@ msgstr "Cerca"
153153#: plugins/Unity/Launcher/launcheritem.cpp:43
154154#: plugins/Unity/Launcher/launcheritem.cpp:73
155155msgid "Lock to Launcher"
156−msgstr ""
156+msgstr "Blocca nel Launcher"
157157
158158#: plugins/Unity/Launcher/launcheritem.cpp:73
159159msgid "Unlock from Launcher"
160−msgstr ""
160+msgstr "Sblocca dal Launcher"
161161
162162#: Shell.qml:439
163163#, qt-format
po/ru.po+7−6
@@ -8,16 +8,16 @@ msgstr ""
88"Project-Id-Version: unity\n"
99"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
1010"POT-Creation-Date: 2013-11-29 09:21+0100\n"
11−"PO-Revision-Date: 2014-01-14 19:17+0000\n"
12−"Last-Translator: alex <sos987@gmail.com>\n"
11+"PO-Revision-Date: 2014-01-26 15:56+0000\n"
12+"Last-Translator: Zonov Roman <Unknown>\n"
1313"Language-Team: Russian <ru@li.org>\n"
1414"MIME-Version: 1.0\n"
1515"Content-Type: text/plain; charset=UTF-8\n"
1616"Content-Transfer-Encoding: 8bit\n"
1717"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && "
1818"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
19−"X-Launchpad-Export-Date: 2014-01-15 06:35+0000\n"
20−"X-Generator: Launchpad (build 16890)\n"
19+"X-Launchpad-Export-Date: 2014-01-27 05:48+0000\n"
20+"X-Generator: Launchpad (build 16914)\n"
2121
2222#: Components/EdgeDemoOverlay.qml:151
2323msgid "Skip intro"
@@ -91,8 +91,9 @@ msgstr "(%1)"
9191#, qt-format
9292msgid "%1 review"
9393msgid_plural "%1 reviews"
94−msgstr[0] "%1 отзыва"
95−msgstr[1] "%1 отзывов"
94+msgstr[0] "%1 отзыв"
95+msgstr[1] "%1 отзыва"
96+msgstr[2] "%1 отзывов"
9697
9798#: Dash/Previews/Reviews.qml:74
9899msgid "Add a review"
po/zh_HK.ponew file+157
@@ -0,0 +1,157 @@
1+# Chinese (Hong Kong) translation for unity8
2+# Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014
3+# This file is distributed under the same license as the unity8 package.
4+# FIRST AUTHOR <EMAIL@ADDRESS>, 2014.
5+#
6+msgid ""
7+msgstr ""
8+"Project-Id-Version: unity8\n"
9+"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10+"POT-Creation-Date: 2013-11-29 09:21+0100\n"
11+"PO-Revision-Date: 2014-01-25 13:32+0000\n"
12+"Last-Translator: Daniel Cheung <daniel.2345@hotmail.com>\n"
13+"Language-Team: Chinese (Hong Kong) <zh_HK@li.org>\n"
14+"MIME-Version: 1.0\n"
15+"Content-Type: text/plain; charset=UTF-8\n"
16+"Content-Transfer-Encoding: 8bit\n"
17+"Plural-Forms: nplurals=1; plural=0;\n"
18+"X-Launchpad-Export-Date: 2014-01-26 05:18+0000\n"
19+"X-Generator: Launchpad (build 16914)\n"
20+
21+#: Components/EdgeDemoOverlay.qml:151
22+msgid "Skip intro"
23+msgstr "跳過介紹"
24+
25+#: Components/EdgeDemo.qml:112
26+msgid "Right edge"
27+msgstr "右邊緣"
28+
29+#: Components/EdgeDemo.qml:113
30+msgid "Try swiping from the right edge to unlock the phone"
31+msgstr "試從右邊緣輕掃解鎖手機"
32+
33+#: Components/EdgeDemo.qml:144
34+msgid "Top edge"
35+msgstr "頂部邊緣"
36+
37+#: Components/EdgeDemo.qml:145
38+msgid "Try swiping from the top edge to access the indicators"
39+msgstr "試從頂部邊緣輕掃存取指示器"
40+
41+#: Components/EdgeDemo.qml:170
42+msgid "Close"
43+msgstr "關閉"
44+
45+#: Components/EdgeDemo.qml:171
46+msgid "Swipe up again to close the settings screen"
47+msgstr "再向上掃一次以關閉設定畫面"
48+
49+#: Components/EdgeDemo.qml:198
50+msgid "Left edge"
51+msgstr "左邊緣"
52+
53+#: Components/EdgeDemo.qml:199
54+msgid "Swipe from the left to reveal the launcher for quick access to apps"
55+msgstr "從左邊緣輕掃以顯示啟動器快速訪問應用"
56+
57+#: Components/EdgeDemo.qml:226
58+msgid "Well done"
59+msgstr "做得好"
60+
61+#: Components/EdgeDemo.qml:227
62+msgid ""
63+"You have now mastered the edge gestures and can start using the "
64+"phone<br><br>Tap anywhere to start"
65+msgstr "現在你已經掌握了邊緣手勢,可以開始使用手機<br><br>點擊任意位置以開始"
66+
67+#: Components/PageHeader.qml:364
68+msgid "Recent searches"
69+msgstr "最近的搜尋"
70+
71+#: Dash/Apps/AppPreview.qml:135
72+msgid "Rate this"
73+msgstr "評價"
74+
75+#. TRANSLATORS: Number of persons who rated this app/video/whatever
76+#: Dash/Previews/Header.qml:93
77+#, qt-format
78+msgid "(%1)"
79+msgstr "(%1)"
80+
81+#. TRANSLATORS: Number of persons who wrote reviews for this app/video/whatever
82+#: Dash/Previews/Header.qml:105
83+#, qt-format
84+msgid "%1 review"
85+msgid_plural "%1 reviews"
86+msgstr[0] "%1 評論"
87+
88+#: Dash/Previews/Reviews.qml:74
89+msgid "Add a review"
90+msgstr "新增評論"
91+
92+#: Dash/Previews/Reviews.qml:86
93+msgid "Review"
94+msgstr "評論"
95+
96+#: Dash/Previews/Reviews.qml:121
97+msgid "Send"
98+msgstr "傳送"
99+
100+#: Dash/Previews/Reviews.qml:139
101+msgid "Comments:"
102+msgstr "評論:"
103+
104+#: Greeter/Lockscreen.qml:149
105+msgid "Emergency Call"
106+msgstr "緊急電話"
107+
108+#: Greeter/PassphraseLockscreen.qml:59
109+#, qt-format
110+msgid "Hello %1"
111+msgstr "您好 %1"
112+
113+#: Greeter/PassphraseLockscreen.qml:59
114+msgid "Hello"
115+msgstr "您好"
116+
117+#: Hud/HudParametrizedActionsPage.qml:132
118+msgid "Confirm"
119+msgstr "確認"
120+
121+#: Hud/Hud.qml:61 Hud/Hud.qml:99 Hud/Hud.qml:372
122+msgid "Type or say a command"
123+msgstr "輸入或說出指令"
124+
125+#: Hud/Hud.qml:84
126+msgid "Loading. Please Wait..."
127+msgstr "正載入。請稍候..."
128+
129+#: Hud/Hud.qml:89
130+msgid "Speak Now..."
131+msgstr "馬上講..."
132+
133+#: Hud/Hud.qml:94
134+msgid "Speaking..."
135+msgstr "正在講..."
136+
137+#: Notifications/NotificationMenuItemFactory.qml:89
138+msgid "Show password"
139+msgstr "顯示密碼"
140+
141+#: Panel/SearchIndicator.qml:27
142+msgid "Search"
143+msgstr "搜尋"
144+
145+#: plugins/Unity/Launcher/launcheritem.cpp:43
146+#: plugins/Unity/Launcher/launcheritem.cpp:73
147+msgid "Lock to Launcher"
148+msgstr "鎖定至啟動器"
149+
150+#: plugins/Unity/Launcher/launcheritem.cpp:73
151+msgid "Unlock from Launcher"
152+msgstr "從啟動器解除鎖定"
153+
154+#: Shell.qml:439
155+#, qt-format
156+msgid "Please enter %1"
157+msgstr "請輸入 %1"
qml/Components/ResponsiveGridView.qml+1−1
@@ -72,7 +72,7 @@ Item {
7272
7373 function columnsForSpacing(spacing) {
7474 // minimum margin is half of the spacing
75− return Math.max(1, Math.floor((parent.width - spacing/2) / (delegateWidth + spacing)));
75+ return Math.max(1, Math.floor(parent.width / (delegateWidth + spacing)));
7676 }
7777
7878 property real allocatableHorizontalSpace: parent.width - columns * delegateWidth
qml/Dash/Card.qml+1
@@ -79,5 +79,6 @@ Item {
7979 maximumLineCount: 5
8080 elide: Text.ElideRight
8181 text: cardData && cardData["summary"] || ""
82+ height: text ? implicitHeight : 0
8283 }
8384}
qml/Dash/CardHeader.qml+5−1
@@ -56,9 +56,9 @@ Item {
5656
5757 Label {
5858 id: titleLabel
59+ objectName: "titleLabel"
5960 anchors { left: parent.left; right: parent.right }
6061 elide: Text.ElideRight
61− objectName: "titleLabel"
6262 font.weight: Font.DemiBold
6363 wrapMode: Text.Wrap
6464 maximumLineCount: 2
@@ -66,6 +66,7 @@ Item {
6666
6767 Label {
6868 id: subtitleLabel
69+ objectName: "subtitleLabel"
6970 anchors { left: parent.left; right: parent.right }
7071 elide: Text.ElideRight
7172 visible: titleLabel.text && text
@@ -90,6 +91,7 @@ Item {
9091 elide: Text.ElideRight
9192 font.weight: Font.DemiBold
9293 color: Theme.palette.selected.foreground
94+ visible: text
9395 }
9496
9597 Label {
@@ -98,6 +100,7 @@ Item {
98100 width: parent.labelWidth
99101 elide: Text.ElideRight
100102 horizontalAlignment: parent.labels === 3 ? Text.AlignHCenter : Text.AlignRight
103+ visible: text
101104 }
102105
103106 Label {
@@ -105,6 +108,7 @@ Item {
105108 width: parent.labelWidth
106109 elide: Text.ElideRight
107110 horizontalAlignment: Text.AlignRight
111+ visible: text
108112 }
109113 }
110114 }
tests/qmltests/Components/tst_ResponsiveGridView.qml+1−1
@@ -152,7 +152,7 @@ Item {
152152 var data = new Array()
153153
154154 data.push({selectedIndex: 0, minHSpacing:0, columnCount: 13})
155− data.push({selectedIndex: 1, minHSpacing:units.gu(2), columnCount: 9})
155+ data.push({selectedIndex: 1, minHSpacing:units.gu(2), columnCount: 10})
156156 data.push({selectedIndex: 2, minHSpacing:units.gu(8), columnCount: 5})
157157 data.push({selectedIndex: 3, minHSpacing:units.gu(25), columnCount: 2})
158158
tests/qmltests/Dash/tst_Card.qml+21−4
@@ -106,6 +106,10 @@ Rectangle {
106106 "layout": { "template": { "card-layout": "horizontal" },
107107 "components": JSON.parse(fullMapping) }
108108 },
109+ {
110+ "name": "Art, header - vertical",
111+ "layout": { "components": Helpers.update(JSON.parse(root.fullMapping), { "summary": undefined }) }
112+ },
109113 ]
110114
111115 Card {
@@ -189,7 +193,10 @@ Rectangle {
189193 property Item summary: findChild(card, "summaryLabel")
190194
191195 function initTestCase() {
192− verify(testCase.header !== undefined, "Couldn't find header object.");
196+ verify(typeof testCase.header === "object", "Couldn't find header object.");
197+ verify(typeof testCase.art === "object", "Couldn't find art object.");
198+ verify(typeof testCase.artImage === "object", "Couldn't find artImage object.");
199+ verify(typeof testCase.summary === "object", "Couldn't find summary object.");
193200 }
194201
195202 function cleanup() {
@@ -237,6 +244,9 @@ Rectangle {
237244 { tag: "Large", width: units.gu(38), size: "large", index: 0 },
238245 { tag: "Wide", width: units.gu(18.5), aspect: 0.5, index: 0 },
239246 { tag: "Horizontal", width: units.gu(38), index: 5 },
247+ // Make sure card ends with header when there's no summary
248+ { tag: "NoSummary", height: function() { return header.y + header.height }, index: 6 },
249+ { tag: "HorizontalNoSummary", height: function() { return header.height }, card_layout: "horizontal", index: 6 },
240250 ]
241251 }
242252
@@ -248,6 +258,11 @@ Rectangle {
248258 card.templateChanged();
249259 }
250260
261+ if (data.hasOwnProperty("card_layout")) {
262+ card.template['card-layout'] = data.card_layout;
263+ card.templateChanged();
264+ }
265+
251266 if (data.hasOwnProperty("aspect")) {
252267 card.components['art']['aspect-ratio'] = data.aspect;
253268 card.componentsChanged();
@@ -257,7 +272,9 @@ Rectangle {
257272 tryCompare(card, "width", data.width);
258273 }
259274
260− if (data.hasOwnProperty("height")) {
275+ if (typeof data.height === "function") {
276+ tryCompareFunction(function() { return card.height === data.height() }, true);
277+ } else if (data.hasOwnProperty("height")) {
261278 tryCompare(card, "height", data.height);
262279 }
263280 }
@@ -308,7 +325,7 @@ Rectangle {
308325 function test_art_layout_data() {
309326 return [
310327 { tag: "Vertical", left: function() { return 0 }, index: 0},
311− { tag: "Horizontal", left: function() { return art.width }, index: 5 }
328+ { tag: "Horizontal", left: function() { return art.width }, index: 5 },
312329 ];
313330 }
314331
@@ -323,7 +340,7 @@ Rectangle {
323340 { tag: "Vertical", top: function() { return art.y + art.height },
324341 left: function() { return art.x }, index: 0 },
325342 { tag: "Horizontal", top: function() { return art.y },
326− left: function() { return art.x + art.width }, index: 5 }
343+ left: function() { return art.x + art.width }, index: 5 },
327344 ]
328345 }
329346
tests/qmltests/Dash/tst_CardHeader.qml+13−8
@@ -52,11 +52,11 @@ Rectangle {
5252 property Item column: findChild(cardHeader, "column")
5353
5454 function initTestCase() {
55− verify(testCase.mascot !== undefined, "Couldn't find mascot object.");
56− verify(testCase.titleLabel !== undefined, "Couldn't find titleLabel object.");
57− verify(testCase.subtitleLabel !== undefined, "Couldn't find subtitleLabel object.");
58− verify(testCase.prices !== undefined, "Couldn't find prices object.");
59− verify(testCase.oldPriceLabel !== undefined, "Couldn't find oldPriceLabel object.");
55+ verify(typeof testCase.mascot === "object", "Couldn't find mascot object.");
56+ verify(typeof testCase.titleLabel === "object", "Couldn't find titleLabel object.");
57+ verify(typeof testCase.subtitleLabel === "object", "Couldn't find subtitleLabel object.");
58+ verify(typeof testCase.prices === "object", "Couldn't find prices object.");
59+ verify(typeof testCase.oldPriceLabel === "object", "Couldn't find oldPriceLabel object.");
6060 }
6161
6262 function cleanup() {
@@ -86,7 +86,7 @@ Rectangle {
8686 { tag: "Empty", visible: false },
8787 { tag: "Title only", title: "Foo", visible: true },
8888 { tag: "Subtitle only", subtitle: "Bar", visible: false },
89− { tag: "Both", title: "Foo", subtitle: "Bar", visible: true }
89+ { tag: "Both", title: "Foo", subtitle: "Bar", visible: true },
9090 ]
9191 }
9292
@@ -104,7 +104,7 @@ Rectangle {
104104 { tag: "Main and Alt", main: "$1.25", alt: "€1.00", visible: true },
105105 { tag: "Main and Old", main: "$1.25", old: "$2.00", visible: true, oldAlign: Text.AlignRight },
106106 { tag: "Alt and Old", alt: "€1.00", old: "$2.00", visible: false },
107− { tag: "All", main: "$1.25", alt: "€1.00", old: "$2.00", visible: true, oldAlign: Text.AlignHCenter }
107+ { tag: "All", main: "$1.25", alt: "€1.00", old: "$2.00", visible: true, oldAlign: Text.AlignHCenter },
108108 ]
109109 }
110110
@@ -121,7 +121,8 @@ Rectangle {
121121 function test_dimensions_data() {
122122 return [
123123 { tag: "Column width", object: column, width: cardHeader.width - testCase.outerRow.spacing * 2 },
124− { tag: "Column width", object: column, width: cardHeader.width - mascot.width - testCase.outerRow.spacing * 3, mascot: "artwork/avatar.png" }
124+ { tag: "Column width", object: column, width: cardHeader.width - mascot.width - testCase.outerRow.spacing * 3, mascot: "artwork/avatar.png" },
125+ { tag: "Header height", object: cardHeader, height: function() { return subtitleLabel.y + subtitleLabel.height + outerRow.spacing * 2 } },
125126 ]
126127 }
127128
@@ -133,6 +134,10 @@ Rectangle {
133134 if (data.hasOwnProperty("width")) {
134135 tryCompare(data.object, "width", data.width);
135136 }
137+
138+ if (data.hasOwnProperty("height")) {
139+ tryCompareFunction(function() { return data.object.height === data.height() }, true);
140+ }
136141 }
137142 }
138143}