on xenial help sign in
merge trunk
3d09fe2Michael Zanetti
@@ -158,6 +158,10 @@ To run the tests for a single component/class under gdb (so you can catch SEGFAU
158
158
159$ make gdbtestComponentName
159$ make gdbtestComponentName
160
160
161+To run a single test function of a single component/class:
162+
163+$ make testComponentName FUNCTION="TestCaseName::functionName"
164+
161To run a test application that allow you to manually test or to simply try out
165To run a test application that allow you to manually test or to simply try out
162a given component:
166a given component:
163
167
debian/changelog+45
@@ -1,3 +1,48 @@
1+unity8 (8.10+15.10.20150616.1-0ubuntu1) wily; urgency=medium
2+
3+ [ Albert Astals Cid ]
4+ * Bind running to the proper object.visible
5+ * Do not use template in generated card creator code
6+ * Fix regression introduced by the concierge change
7+ * Take into account the extra margin on top when calculating the
8+ display margin
9+ * workaround oxide 1.7 issue (LP: #1459142)
10+
11+ [ CI Train Bot ]
12+ * New rebuild forced.
13+
14+ [ Federico Gimenez ]
15+ * On the autopilot helpers, swipe if the item to open from the dash is
16+ not visible. unity8-autopilot dependencies now require ubuntu-ui-
17+ toolkit-autopilot (>= 1.2.1485+15.04.20150417.1-0ubuntu1)
18+
19+ [ Florian Boucault ]
20+ * Notifications: shaped icon was stretching the icon instead of
21+ respecting its aspect ratio and filling the whole shape. (LP:
22+ #1450229)
23+
24+ [ Josh Arenson ]
25+ * Implement bare-bones shellMode=greeter and shellMode=shell
26+
27+ [ Leo Arias ]
28+ * On the autopilot helpers, swipe if the item to open from the dash is
29+ not visible. unity8-autopilot dependencies now require ubuntu-ui-
30+ toolkit-autopilot (>= 1.2.1485+15.04.20150417.1-0ubuntu1)
31+
32+ [ Leonardo Arias Fonseca ]
33+ * On the autopilot helpers, swipe if the item to open from the dash is
34+ not visible. unity8-autopilot dependencies now require ubuntu-ui-
35+ toolkit-autopilot (>= 1.2.1485+15.04.20150417.1-0ubuntu1)
36+
37+ [ Michael Zanetti ]
38+ * add info on how to run a single function in make test
39+
40+ [ Richard Huddie ]
41+ * Slow down the speed of autopilot helpers used to swipe to a
42+ different scope to improve the reliability. (LP: #1461059, #1457047)
43+
44+ -- CI Train Bot <ci-train-bot@canonical.com> Tue, 16 Jun 2015 15:12:59 +0000
45+
1unity8 (8.10+15.10.20150612-0ubuntu2) wily; urgency=medium
46unity8 (8.10+15.10.20150612-0ubuntu2) wily; urgency=medium
2
47
3 * No-change rebuild against Qt 5.4.2.
48 * No-change rebuild against Qt 5.4.2.
debian/control+1−1
@@ -153,7 +153,7 @@ Depends: autopilot-qt5 (>= 1.4),
153 python3-fixtures,
153 python3-fixtures,
154 python3-gi,
154 python3-gi,
155 qttestability-autopilot (>= 1.4),
155 qttestability-autopilot (>= 1.4),
156− ubuntu-ui-toolkit-autopilot,
156+ ubuntu-ui-toolkit-autopilot (>= 1.2.1485+15.04.20150417.1-0ubuntu1),
157 unity-scope-click,
157 unity-scope-click,
158 unity8 (= ${source:Version}),
158 unity8 (= ${source:Version}),
159 unity8-fake-env (= ${source:Version}),
159 unity8-fake-env (= ${source:Version}),
plugins/Dash/CardCreator.js+24−10
@@ -16,6 +16,9 @@
16
16
17.pragma library
17.pragma library
18
18
19+// %1 is the template["card-background"] string
20+// %2 is the template["card-background"]["elements"][0]
21+// %3 is the template["card-background"]["elements"][1]
19var kBackgroundLoaderCode = 'Loader {\n\
22var kBackgroundLoaderCode = 'Loader {\n\
20 id: backgroundLoader; \n\
23 id: backgroundLoader; \n\
21 objectName: "backgroundLoader"; \n\
24 objectName: "backgroundLoader"; \n\
@@ -34,18 +37,14 @@ var kBackgroundLoaderCode = 'Loader {\n\
34 objectName: "backgroundImage"; \n\
37 objectName: "backgroundImage"; \n\
35 source: { \n\
38 source: { \n\
36 if (cardData && typeof cardData["background"] === "string") return cardData["background"]; \n\
39 if (cardData && typeof cardData["background"] === "string") return cardData["background"]; \n\
37− else if (template && typeof template["card-background"] === "string") return template["card-background"]; \n\
40+ else return "%1"; \n\
38− else return ""; \n\
39 } \n\
41 } \n\
40 } \n\
42 } \n\
41 function getColor(index) { \n\
43 function getColor(index) { \n\
42 if (cardData && typeof cardData["background"] === "object" \n\
44 if (cardData && typeof cardData["background"] === "object" \n\
43 && (cardData["background"]["type"] === "color" || cardData["background"]["type"] === "gradient")) { \n\
45 && (cardData["background"]["type"] === "color" || cardData["background"]["type"] === "gradient")) { \n\
44 return cardData["background"]["elements"][index]; \n\
46 return cardData["background"]["elements"][index]; \n\
45− } else if (template && typeof template["card-background"] === "object" \n\
47+ } else return index === 0 ? %2 : %3; \n\
46− && (template["card-background"]["type"] === "color" || template["card-background"]["type"] === "gradient")) { \n\
47− return template["card-background"]["elements"][index]; \n\
48− } else return undefined; \n\
49 } \n\
48 } \n\
50 } \n\
49 } \n\
51 }\n';
50 }\n';
@@ -70,6 +69,7 @@ var kArtShapeHolderCode = 'Item { \n\
70 property bool doShapeItem: components["art"]["conciergeMode"] !== true; \n\
69 property bool doShapeItem: components["art"]["conciergeMode"] !== true; \n\
71 visible: image.status == Image.Ready; \n\
70 visible: image.status == Image.Ready; \n\
72 readonly property alias image: artImage.image; \n\
71 readonly property alias image: artImage.image; \n\
72+ property alias borderSource: artShapeShape.borderSource; \n\
73 ShaderEffectSource { \n\
73 ShaderEffectSource { \n\
74 id: artShapeSource; \n\
74 id: artShapeSource; \n\
75 sourceItem: artImage; \n\
75 sourceItem: artImage; \n\
@@ -79,6 +79,7 @@ var kArtShapeHolderCode = 'Item { \n\
79 hideSource: doShapeItem; \n\
79 hideSource: doShapeItem; \n\
80 } \n\
80 } \n\
81 Shape { \n\
81 Shape { \n\
82+ id: artShapeShape; \n\
82 image: artShapeSource; \n\
83 image: artShapeSource; \n\
83 anchors.fill: parent; \n\
84 anchors.fill: parent; \n\
84 visible: doShapeItem; \n\
85 visible: doShapeItem; \n\
@@ -315,9 +316,11 @@ var kSummaryLabelCode = 'Label { \n\
315
316
316function cardString(template, components) {
317function cardString(template, components) {
317 var code;
318 var code;
319+
320+ var templateInteractive = (template == null ? true : (template["non-interactive"] !== undefined ? !template["non-interactive"] : true)) ? "true" : "false";
321+
318 code = 'AbstractButton { \n\
322 code = 'AbstractButton { \n\
319 id: root; \n\
323 id: root; \n\
320− property var template; \n\
321 property var components; \n\
324 property var components; \n\
322 property var cardData; \n\
325 property var cardData; \n\
323 property var artShapeBorderSource: undefined; \n\
326 property var artShapeBorderSource: undefined; \n\
@@ -330,8 +333,8 @@ function cardString(template, components) {
330 property bool asynchronous: true; \n\
333 property bool asynchronous: true; \n\
331 property bool showHeader: true; \n\
334 property bool showHeader: true; \n\
332 implicitWidth: childrenRect.width; \n\
335 implicitWidth: childrenRect.width; \n\
333− enabled: root.template == null ? true : (root.template["non-interactive"] !== undefined ? !root.template["non-interactive"] : true); \n\
336+ enabled: %1; \n\
334− \n';
337+ \n'.arg(templateInteractive);
335
338
336 var hasArt = components["art"] && components["art"]["field"] || false;
339 var hasArt = components["art"] && components["art"]["field"] || false;
337 var hasSummary = components["summary"] || false;
340 var hasSummary = components["summary"] || false;
@@ -348,7 +351,18 @@ function cardString(template, components) {
348 var hasAttributes = hasTitle && components["attributes"]["field"] || false;
351 var hasAttributes = hasTitle && components["attributes"]["field"] || false;
349
352
350 if (hasBackground) {
353 if (hasBackground) {
354+ var templateCardBackground = (template && typeof template["card-background"] === "string") ? template["card-background"] : "";
355+ var backgroundElements0;
356+ var backgroundElements1;
357+ if (template && typeof template["card-background"] === "object" && (template["card-background"]["type"] === "color" || template["card-background"]["type"] === "gradient")) {
358+ if (template["card-background"]["elements"][0] !== undefined) {
359+ backgroundElements0 = '"%1"'.arg(template["card-background"]["elements"][0]);
360+ }
361+ if (template["card-background"]["elements"][1] !== undefined) {
362+ backgroundElements1 = '"%1"'.arg(template["card-background"]["elements"][1]);
363+ }
364+ }
351− code += kBackgroundLoaderCode;
365+ code += kBackgroundLoaderCode.arg(templateCardBackground).arg(backgroundElements0).arg(backgroundElements1);
352 }
366 }
353
367
354 if (hasArt) {
368 if (hasArt) {
po/de.po+6−6
@@ -8,15 +8,15 @@ msgstr ""
8"Project-Id-Version: unity\n"
8"Project-Id-Version: unity\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10"POT-Creation-Date: 2015-04-14 16:13+0200\n"
10"POT-Creation-Date: 2015-04-14 16:13+0200\n"
11−"PO-Revision-Date: 2015-05-14 15:49+0000\n"
11+"PO-Revision-Date: 2015-06-17 14:05+0000\n"
12−"Last-Translator: Tobias Bannert <Unknown>\n"
12+"Last-Translator: JkB <Unknown>\n"
13"Language-Team: German <de@li.org>\n"
13"Language-Team: German <de@li.org>\n"
14"MIME-Version: 1.0\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
16"Content-Transfer-Encoding: 8bit\n"
17"Plural-Forms: nplurals=2; plural=n != 1;\n"
17"Plural-Forms: nplurals=2; plural=n != 1;\n"
18−"X-Launchpad-Export-Date: 2015-05-15 05:31+0000\n"
18+"X-Launchpad-Export-Date: 2015-06-19 05:01+0000\n"
19−"X-Generator: Launchpad (build 17493)\n"
19+"X-Generator: Launchpad (build 17570)\n"
20
20
21#: plugins/LightDM/Greeter.cpp:112
21#: plugins/LightDM/Greeter.cpp:112
22msgid "Password: "
22msgid "Password: "
@@ -117,7 +117,7 @@ msgstr "Ja"
117#: qml/Components/Dialogs.qml:152
117#: qml/Components/Dialogs.qml:152
118msgctxt "Title: Power off/Restart dialog"
118msgctxt "Title: Power off/Restart dialog"
119msgid "Power"
119msgid "Power"
120−msgstr "Leistung"
120+msgstr "Ausschalten"
121
121
122#: qml/Components/Dialogs.qml:153
122#: qml/Components/Dialogs.qml:153
123msgid ""
123msgid ""
@@ -276,7 +276,7 @@ msgstr "%1 eingeben"
276
276
277#: qml/Greeter/NarrowView.qml:116 qml/Wizard/Pages/passwd-set.qml:60
277#: qml/Greeter/NarrowView.qml:116 qml/Wizard/Pages/passwd-set.qml:60
278msgid "Enter passphrase"
278msgid "Enter passphrase"
279−msgstr "Passwort eingeben"
279+msgstr "Passphrase eingeben"
280
280
281#: qml/Greeter/NarrowView.qml:117
281#: qml/Greeter/NarrowView.qml:117
282msgid "Enter passcode"
282msgid "Enter passcode"
po/el.po+11−11
@@ -8,15 +8,15 @@ msgstr ""
8"Project-Id-Version: unity\n"
8"Project-Id-Version: unity\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10"POT-Creation-Date: 2015-04-14 16:13+0200\n"
10"POT-Creation-Date: 2015-04-14 16:13+0200\n"
11−"PO-Revision-Date: 2015-04-22 09:03+0000\n"
11+"PO-Revision-Date: 2015-06-18 19:05+0000\n"
12"Last-Translator: Simos Xenitellis <Unknown>\n"
12"Last-Translator: Simos Xenitellis <Unknown>\n"
13"Language-Team: Greek <el@li.org>\n"
13"Language-Team: Greek <el@li.org>\n"
14"MIME-Version: 1.0\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
16"Content-Transfer-Encoding: 8bit\n"
17"Plural-Forms: nplurals=2; plural=n != 1;\n"
17"Plural-Forms: nplurals=2; plural=n != 1;\n"
18−"X-Launchpad-Export-Date: 2015-04-23 06:48+0000\n"
18+"X-Launchpad-Export-Date: 2015-06-19 05:01+0000\n"
19−"X-Generator: Launchpad (build 17430)\n"
19+"X-Generator: Launchpad (build 17570)\n"
20
20
21#: plugins/LightDM/Greeter.cpp:112
21#: plugins/LightDM/Greeter.cpp:112
22msgid "Password: "
22msgid "Password: "
@@ -117,7 +117,7 @@ msgstr "Ναι"
117#: qml/Components/Dialogs.qml:152
117#: qml/Components/Dialogs.qml:152
118msgctxt "Title: Power off/Restart dialog"
118msgctxt "Title: Power off/Restart dialog"
119msgid "Power"
119msgid "Power"
120−msgstr ""
120+msgstr "Τερματισμός"
121
121
122#: qml/Components/Dialogs.qml:153
122#: qml/Components/Dialogs.qml:153
123msgid ""
123msgid ""
@@ -165,17 +165,17 @@ msgstr "Αναζήτηση"
165#: qml/Dash/PageHeader.qml:269
165#: qml/Dash/PageHeader.qml:269
166msgctxt "Button: Open the Ubuntu Store"
166msgctxt "Button: Open the Ubuntu Store"
167msgid "Store"
167msgid "Store"
168−msgstr ""
168+msgstr "Κατάστημα"
169
169
170#: qml/Dash/PageHeader.qml:276
170#: qml/Dash/PageHeader.qml:276
171msgctxt "Button: Start a search in the current dash scope"
171msgctxt "Button: Start a search in the current dash scope"
172msgid "Search"
172msgid "Search"
173−msgstr ""
173+msgstr "Αναζήτηση"
174
174
175#: qml/Dash/PageHeader.qml:286
175#: qml/Dash/PageHeader.qml:286
176msgctxt "Button: Show the current dash scope settings"
176msgctxt "Button: Show the current dash scope settings"
177msgid "Settings"
177msgid "Settings"
178−msgstr ""
178+msgstr "Ρυθμίσεις"
179
179
180#: qml/Dash/PageHeader.qml:293
180#: qml/Dash/PageHeader.qml:293
181msgid "Remove from Favorites"
181msgid "Remove from Favorites"
@@ -378,7 +378,7 @@ msgstr "Πατήστε εδώ για συνέχεια."
378
378
379#: qml/Tutorial/TutorialContent.qml:81
379#: qml/Tutorial/TutorialContent.qml:81
380msgid "Click here to finish."
380msgid "Click here to finish."
381−msgstr ""
381+msgstr "Πατήστε εδώ για τέλος."
382
382
383#: qml/Tutorial/TutorialLeftFinish.qml:24
383#: qml/Tutorial/TutorialLeftFinish.qml:24
384msgid "These are the shortcuts to favorite apps"
384msgid "These are the shortcuts to favorite apps"
@@ -510,12 +510,12 @@ msgstr "Επιτρέψετε το τηλέφωνο να εντοπίσει τη
510
510
511#: qml/Wizard/Pages/50-location.qml:69
511#: qml/Wizard/Pages/50-location.qml:69
512msgid "Using GPS only (less accurate)"
512msgid "Using GPS only (less accurate)"
513−msgstr "Χρήση μόνο GPS (λιγότερο ακριβή)"
513+msgstr "Χρήση μόνο GPS (λιγότερο ακριβής)"
514
514
515#: qml/Wizard/Pages/50-location.qml:86
515#: qml/Wizard/Pages/50-location.qml:86
516msgid "Using GPS, anonymized Wi-Fi and cellular network info (recommended)"
516msgid "Using GPS, anonymized Wi-Fi and cellular network info (recommended)"
517msgstr ""
517msgstr ""
518−"Χρήση GPS, ανωνυνοποιημένα δίκτυα Wi-Fi και πληροφορίες δικτύων κινητής "
518+"Χρήση GPS, ανωνυμοποιημένων δικτύων Wi-Fi και πληροφορίες δικτύων κινητής "
519"τηλεφωνίας (συνιστάται)"
519"τηλεφωνίας (συνιστάται)"
520
520
521#. TRANSLATORS: HERE is a trademark for Nokia's location service, you probably shouldn't translate it
521#. TRANSLATORS: HERE is a trademark for Nokia's location service, you probably shouldn't translate it
@@ -546,7 +546,7 @@ msgid ""
546"partners, the makers of the operating system."
546"partners, the makers of the operating system."
547msgstr ""
547msgstr ""
548"Το τηλέφωνό σας είναι ρυθμισμένο να στέλνει αυτόματα αναφορές σφαλμάτων στην "
548"Το τηλέφωνό σας είναι ρυθμισμένο να στέλνει αυτόματα αναφορές σφαλμάτων στην "
549−"Canonical και τους συνεργάτες της, τους δημιουργούς τους λειτουργικού "
549+"Canonical και τους συνεργάτες της, τους δημιουργούς του λειτουργικού "
550"συστήματος."
550"συστήματος."
551
551
552#: qml/Wizard/Pages/60-reporting.qml:43
552#: qml/Wizard/Pages/60-reporting.qml:43
po/hu.po+4−4
@@ -8,15 +8,15 @@ msgstr ""
8"Project-Id-Version: unity\n"
8"Project-Id-Version: unity\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10"POT-Creation-Date: 2015-04-14 16:13+0200\n"
10"POT-Creation-Date: 2015-04-14 16:13+0200\n"
11−"PO-Revision-Date: 2015-05-04 18:02+0000\n"
11+"PO-Revision-Date: 2015-06-19 09:54+0000\n"
12"Last-Translator: Richard Somlói <ricsipontaz@gmail.com>\n"
12"Last-Translator: Richard Somlói <ricsipontaz@gmail.com>\n"
13"Language-Team: Hungarian <hu@li.org>\n"
13"Language-Team: Hungarian <hu@li.org>\n"
14"MIME-Version: 1.0\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
16"Content-Transfer-Encoding: 8bit\n"
17"Plural-Forms: nplurals=2; plural=n != 1;\n"
17"Plural-Forms: nplurals=2; plural=n != 1;\n"
18−"X-Launchpad-Export-Date: 2015-05-05 05:47+0000\n"
18+"X-Launchpad-Export-Date: 2015-06-20 05:33+0000\n"
19−"X-Generator: Launchpad (build 17474)\n"
19+"X-Generator: Launchpad (build 17572)\n"
20
20
21#: plugins/LightDM/Greeter.cpp:112
21#: plugins/LightDM/Greeter.cpp:112
22msgid "Password: "
22msgid "Password: "
@@ -113,7 +113,7 @@ msgstr "Igen"
113#: qml/Components/Dialogs.qml:152
113#: qml/Components/Dialogs.qml:152
114msgctxt "Title: Power off/Restart dialog"
114msgctxt "Title: Power off/Restart dialog"
115msgid "Power"
115msgid "Power"
116−msgstr "Főkapcsoló"
116+msgstr "Menü"
117
117
118#: qml/Components/Dialogs.qml:153
118#: qml/Components/Dialogs.qml:153
119msgid ""
119msgid ""
po/it.po+4−4
@@ -8,15 +8,15 @@ msgstr ""
8"Project-Id-Version: unity\n"
8"Project-Id-Version: unity\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10"POT-Creation-Date: 2015-04-14 16:13+0200\n"
10"POT-Creation-Date: 2015-04-14 16:13+0200\n"
11−"PO-Revision-Date: 2015-03-21 12:42+0000\n"
11+"PO-Revision-Date: 2015-06-17 09:56+0000\n"
12"Last-Translator: Claudio Arseni <claudio.arseni@gmail.com>\n"
12"Last-Translator: Claudio Arseni <claudio.arseni@gmail.com>\n"
13"Language-Team: Italian <it@li.org>\n"
13"Language-Team: Italian <it@li.org>\n"
14"MIME-Version: 1.0\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
16"Content-Transfer-Encoding: 8bit\n"
17"Plural-Forms: nplurals=2; plural=n != 1;\n"
17"Plural-Forms: nplurals=2; plural=n != 1;\n"
18−"X-Launchpad-Export-Date: 2015-04-23 06:48+0000\n"
18+"X-Launchpad-Export-Date: 2015-06-19 05:01+0000\n"
19−"X-Generator: Launchpad (build 17430)\n"
19+"X-Generator: Launchpad (build 17570)\n"
20
20
21#: plugins/LightDM/Greeter.cpp:112
21#: plugins/LightDM/Greeter.cpp:112
22msgid "Password: "
22msgid "Password: "
@@ -375,7 +375,7 @@ msgstr "Toccare qui per continuare."
375
375
376#: qml/Tutorial/TutorialContent.qml:81
376#: qml/Tutorial/TutorialContent.qml:81
377msgid "Click here to finish."
377msgid "Click here to finish."
378−msgstr ""
378+msgstr "Fare clic qui per terminare."
379
379
380#: qml/Tutorial/TutorialLeftFinish.qml:24
380#: qml/Tutorial/TutorialLeftFinish.qml:24
381msgid "These are the shortcuts to favorite apps"
381msgid "These are the shortcuts to favorite apps"
qml/Components/ResponsiveVerticalJournal.qml+7−2
@@ -39,6 +39,8 @@ import Dash 0.1
39 +-----+
39 +-----+
40*/
40*/
41Item {
41Item {
42+ id: root
43+
42 property real minimumColumnSpacing: units.gu(1)
44 property real minimumColumnSpacing: units.gu(1)
43
45
44 property alias columnWidth: verticalJournalView.columnWidth
46 property alias columnWidth: verticalJournalView.columnWidth
@@ -46,8 +48,8 @@ Item {
46 property alias model: verticalJournalView.model
48 property alias model: verticalJournalView.model
47 property alias delegate: verticalJournalView.delegate
49 property alias delegate: verticalJournalView.delegate
48 property alias cacheBuffer: verticalJournalView.cacheBuffer
50 property alias cacheBuffer: verticalJournalView.cacheBuffer
49− property alias displayMarginBeginning: verticalJournalView.displayMarginBeginning
51+ property real displayMarginBeginning: 0
50− property alias displayMarginEnd: verticalJournalView.displayMarginEnd
52+ property real displayMarginEnd: 0
51
53
52 implicitHeight: verticalJournalView.implicitHeight + rowSpacing
54 implicitHeight: verticalJournalView.implicitHeight + rowSpacing
53 clip: height < implicitHeight
55 clip: height < implicitHeight
@@ -63,6 +65,9 @@ Item {
63 bottomMargin: rowSpacing / 2
65 bottomMargin: rowSpacing / 2
64 }
66 }
65
67
68+ displayMarginBeginning: -Math.max(-root.displayMarginBeginning - anchors.topMargin, 0)
69+ displayMarginEnd:-Math.max(-root.displayMarginEnd - anchors.topMargin, 0)
70+
66 function px2gu(pixels) {
71 function px2gu(pixels) {
67 return Math.floor(pixels / units.gu(1))
72 return Math.floor(pixels / units.gu(1))
68 }
73 }
qml/Dash/CardCarousel.qml−1
@@ -61,7 +61,6 @@ DashRenderer {
61 item.fixedHeaderHeight = Qt.binding(function() { return carousel.headerHeight; });
61 item.fixedHeaderHeight = Qt.binding(function() { return carousel.headerHeight; });
62 item.height = Qt.binding(function() { return cardTool.cardHeight; });
62 item.height = Qt.binding(function() { return cardTool.cardHeight; });
63 item.cardData = Qt.binding(function() { return model; });
63 item.cardData = Qt.binding(function() { return model; });
64− item.template = Qt.binding(function() { return cardTool.template; });
65 item.components = Qt.binding(function() { return cardTool.components; });
64 item.components = Qt.binding(function() { return cardTool.components; });
66 item.fontScale = Qt.binding(function() { return carousel.fontScale; });
65 item.fontScale = Qt.binding(function() { return carousel.fontScale; });
67 item.showHeader = Qt.binding(function() { return loader.explicitlyScaled; });
66 item.showHeader = Qt.binding(function() { return loader.explicitlyScaled; });
qml/Dash/CardGrid.qml−1
@@ -66,7 +66,6 @@ DashRenderer {
66 item.fixedHeaderHeight = Qt.binding(function() { return cardTool.headerHeight; });
66 item.fixedHeaderHeight = Qt.binding(function() { return cardTool.headerHeight; });
67 item.fixedArtShapeSize = Qt.binding(function() { return cardTool.artShapeSize; });
67 item.fixedArtShapeSize = Qt.binding(function() { return cardTool.artShapeSize; });
68 item.cardData = Qt.binding(function() { return model; });
68 item.cardData = Qt.binding(function() { return model; });
69− item.template = Qt.binding(function() { return cardTool.template; });
70 item.components = Qt.binding(function() { return cardTool.components; });
69 item.components = Qt.binding(function() { return cardTool.components; });
71 item.titleAlignment = Qt.binding(function() { return cardTool.titleAlignment; });
70 item.titleAlignment = Qt.binding(function() { return cardTool.titleAlignment; });
72 item.scopeStyle = root.scopeStyle;
71 item.scopeStyle = root.scopeStyle;
qml/Dash/CardHorizontalList.qml−1
@@ -53,7 +53,6 @@ DashRenderer {
53 item.fixedArtShapeSize = Qt.binding(function() { return cardTool.artShapeSize; });
53 item.fixedArtShapeSize = Qt.binding(function() { return cardTool.artShapeSize; });
54 item.fixedHeaderHeight = Qt.binding(function() { return cardTool.headerHeight; });
54 item.fixedHeaderHeight = Qt.binding(function() { return cardTool.headerHeight; });
55 item.cardData = Qt.binding(function() { return model; });
55 item.cardData = Qt.binding(function() { return model; });
56− item.template = Qt.binding(function() { return cardTool.template; });
57 item.components = Qt.binding(function() { return cardTool.components; });
56 item.components = Qt.binding(function() { return cardTool.components; });
58 item.titleAlignment = Qt.binding(function() { return cardTool.titleAlignment; });
57 item.titleAlignment = Qt.binding(function() { return cardTool.titleAlignment; });
59 item.scopeStyle = root.scopeStyle;
58 item.scopeStyle = root.scopeStyle;
qml/Dash/CardTool.qml+16−15
@@ -198,8 +198,8 @@ Item {
198
198
199 Loader {
199 Loader {
200 id: cardLoader
200 id: cardLoader
201− property var fields: ["art", "mascot", "title", "subtitle", "summary", "attributes"]
201+ readonly property var fields: ["art", "mascot", "title", "subtitle", "summary", "attributes"]
202− property var maxData: {
202+ readonly property var maxData: {
203 "art": Qt.resolvedUrl("graphics/pixel.png"),
203 "art": Qt.resolvedUrl("graphics/pixel.png"),
204 "mascot": Qt.resolvedUrl("graphics/pixel.png"),
204 "mascot": Qt.resolvedUrl("graphics/pixel.png"),
205 "title": "—\n—",
205 "title": "—\n—",
@@ -211,26 +211,27 @@ Item {
211 onLoaded: {
211 onLoaded: {
212 item.objectName = "cardToolCard";
212 item.objectName = "cardToolCard";
213 item.asynchronous = false;
213 item.asynchronous = false;
214− item.template = Qt.binding(function() { return cardTool.template; });
215 item.components = Qt.binding(function() { return cardTool.components; });
214 item.components = Qt.binding(function() { return cardTool.components; });
216 item.width = Qt.binding(function() { return cardTool.cardWidth || item.implicitWidth; });
215 item.width = Qt.binding(function() { return cardTool.cardWidth || item.implicitWidth; });
217 item.height = Qt.binding(function() { return cardTool.cardHeight || item.implicitHeight; });
216 item.height = Qt.binding(function() { return cardTool.cardHeight || item.implicitHeight; });
218 }
217 }
219 Connections {
218 Connections {
220− target: cardLoader.item
219+ target: cardTool
220+ onTemplateChanged: cardLoader.updateCardData();
221− onComponentsChanged: {
221+ onComponentsChanged: cardLoader.updateCardData();
222+ }
223+ function updateCardData() {
222− var data = {};
224+ var data = {};
223− for (var k in cardLoader.fields) {
225+ for (var k in fields) {
224− var component = cardLoader.item.components[cardLoader.fields[k]];
226+ var component = cardTool.components[fields[k]];
225− var key = cardLoader.fields[k];
227+ var key = fields[k];
226− if ((typeof component === "string" && component.length > 0) ||
228+ if ((typeof component === "string" && component.length > 0) ||
227− (typeof component === "object" && component !== null
229+ (typeof component === "object" && component !== null
228− && typeof component["field"] === "string" && component["field"].length > 0)) {
230+ && typeof component["field"] === "string" && component["field"].length > 0)) {
229− data[key] = cardLoader.maxData[key];
231+ data[key] = maxData[key];
230− }
231 }
232 }
232− cardLoader.item.cardData = data;
233 }
233 }
234+ item.cardData = data;
234 }
235 }
235 }
236 }
236}
237}
qml/Dash/CardVerticalJournal.qml−1
@@ -72,7 +72,6 @@ DashRenderer {
72 item.fixedArtShapeSize = Qt.binding(function() { return cardTool.artShapeSize; });
72 item.fixedArtShapeSize = Qt.binding(function() { return cardTool.artShapeSize; });
73 item.fixedHeaderHeight = Qt.binding(function() { return cardTool.headerHeight; });
73 item.fixedHeaderHeight = Qt.binding(function() { return cardTool.headerHeight; });
74 item.cardData = Qt.binding(function() { return model; });
74 item.cardData = Qt.binding(function() { return model; });
75− item.template = Qt.binding(function() { return cardTool.template; });
76 item.components = Qt.binding(function() { return cardTool.components; });
75 item.components = Qt.binding(function() { return cardTool.components; });
77 item.titleAlignment = Qt.binding(function() { return cardTool.titleAlignment; });
76 item.titleAlignment = Qt.binding(function() { return cardTool.titleAlignment; });
78 item.scopeStyle = root.scopeStyle;
77 item.scopeStyle = root.scopeStyle;
qml/Dash/GenericScopeView.qml+1−1
@@ -425,7 +425,7 @@ FocusScope {
425 // to the next, we set the visible range to the viewport so
425 // to the next, we set the visible range to the viewport so
426 // items are not culled (invisible) but still use no cacheBuffer
426 // items are not culled (invisible) but still use no cacheBuffer
427 // (it will be set once the scope is the current one)
427 // (it will be set once the scope is the current one)
428− var displayMarginBeginning = baseItem.y;
428+ var displayMarginBeginning = baseItem.y + rendererLoader.anchors.topMargin;
429 displayMarginBeginning = -Math.max(-displayMarginBeginning, 0);
429 displayMarginBeginning = -Math.max(-displayMarginBeginning, 0);
430 displayMarginBeginning = -Math.min(-displayMarginBeginning, baseItem.height);
430 displayMarginBeginning = -Math.min(-displayMarginBeginning, baseItem.height);
431 displayMarginBeginning = Math.round(displayMarginBeginning);
431 displayMarginBeginning = Math.round(displayMarginBeginning);
qml/Greeter/ShimGreeter.qmlnew file+45
@@ -0,0 +1,45 @@
1+/*
2+ * Copyright (C) 2015 Canonical, Ltd.
3+ *
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
7+ *
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
12+ *
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
15+ */
16+
17+import QtQuick 2.3
18+
19+/*
20+ * This is a shim greeter that is only used to provide a shell,
21+ * running without a greeter, the requisite information
22+ *
23+ */
24+
25+/* FIXME: this shuld be fine as a QtObject, but bug lp:1447391
26+ * dictates wrapping as an item instead
27+ */
28+Item {
29+ id: shimGreeter
30+
31+ readonly property bool active: false
32+ readonly property bool hasLockedApp: lockedApp !== ""
33+ readonly property bool locked: false
34+ readonly property bool shown: false
35+ readonly property bool waiting: false
36+
37+ property string lockedApp: ""
38+
39+ // Since ShimGreeter is never active, these can just return
40+ property var forceShow: (function() { return; })
41+ property var notifyAboutToFocusApp: (function(appId) { return; })
42+ property var notifyAppFocused: (function(appId) { return; })
43+ property var notifyShowingDashFromDrag: (function(appId) { return false; })
44+
45+}
qml/Notifications/ShapedIcon.qml+4−3
@@ -14,8 +14,8 @@
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
15 */
16
16
17−import QtQuick 2.0
17+import QtQuick 2.3
18−import Ubuntu.Components 0.1
18+import Ubuntu.Components 1.2
19
19
20Item {
20Item {
21 property string fileSource
21 property string fileSource
@@ -25,7 +25,8 @@ Item {
25 objectName: "shapedIcon"
25 objectName: "shapedIcon"
26 anchors.fill: parent
26 anchors.fill: parent
27 visible: shaped
27 visible: shaped
28− image: realImage
28+ source: realImage
29+ sourceFillMode: UbuntuShape.PreserveAspectCrop
29 }
30 }
30
31
31 Image {
32 Image {
qml/Shell.qml+47−34
@@ -111,6 +111,8 @@ Item {
111 // This is _only_ used to expose the property to autopilot tests
111 // This is _only_ used to expose the property to autopilot tests
112 readonly property string testShellMode: shellMode
112 readonly property string testShellMode: shellMode
113
113
114+ readonly property alias greeter: greeterLoader.item
115+
114 function activateApplication(appId) {
116 function activateApplication(appId) {
115 if (ApplicationManager.findApplication(appId)) {
117 if (ApplicationManager.findApplication(appId)) {
116 ApplicationManager.requestFocusApplication(appId);
118 ApplicationManager.requestFocusApplication(appId);
@@ -262,7 +264,9 @@ Item {
262 ? "phone"
264 ? "phone"
263 : shell.usageScenario
265 : shell.usageScenario
264 source: {
266 source: {
267+ if(shellMode === "greeter") {
268+ return "Stages/ShimStage.qml"
265− if (applicationsDisplayLoader.usageScenario === "phone") {
269+ } else if (applicationsDisplayLoader.usageScenario === "phone") {
266 return "Stages/PhoneStage.qml";
270 return "Stages/PhoneStage.qml";
267 } else if (applicationsDisplayLoader.usageScenario === "tablet") {
271 } else if (applicationsDisplayLoader.usageScenario === "tablet") {
268 return "Stages/TabletStage.qml";
272 return "Stages/TabletStage.qml";
@@ -414,50 +418,59 @@ Item {
414 }
418 }
415 }
419 }
416
420
417− Greeter {
421+ Loader {
418− id: greeter
422+ id: greeterLoader
419− objectName: "greeter"
420−
421− hides: [launcher, panel.indicators]
422− tabletMode: shell.usageScenario !== "phone"
423− launcherOffset: launcher.progress
424− forcedUnlock: tutorial.running
425− background: shell.background
426−
427 anchors.fill: parent
423 anchors.fill: parent
428 anchors.topMargin: panel.panelHeight
424 anchors.topMargin: panel.panelHeight
425+ sourceComponent: shellMode != "shell" ? integratedGreeter :
426+ Qt.createComponent(Qt.resolvedUrl("Greeter/ShimGreeter.qml"));
427+ onLoaded: {
428+ item.objectName = "greeter"
429+ }
430+ }
429
431
430− // avoid overlapping with Launcher's edge drag area
432+ Component {
431− // FIXME: Fix TouchRegistry & friends and remove this workaround
433+ id: integratedGreeter
432− // Issue involves launcher's DDA getting disabled on a long
434+ Greeter {
433− // left-edge drag
434− dragHandleLeftMargin: launcher.available ? launcher.dragAreaWidth + 1 : 0
435
435
436− onSessionStarted: {
436+ hides: [launcher, panel.indicators]
437− launcher.hide();
437+ tabletMode: shell.sideStageEnabled
438− }
438+ launcherOffset: launcher.progress
439+ forcedUnlock: tutorial.running
440+ background: shell.background
439
441
442+ // avoid overlapping with Launcher's edge drag area
443+ // FIXME: Fix TouchRegistry & friends and remove this workaround
444+ // Issue involves launcher's DDA getting disabled on a long
445+ // left-edge drag
446+ dragHandleLeftMargin: launcher.available ? launcher.dragAreaWidth + 1 : 0
447+
448+ onSessionStarted: {
449+ launcher.hide();
450+ }
451+
440− onTease: {
452+ onTease: {
441− if (!tutorial.running) {
453+ if (!tutorial.running) {
442− launcher.tease();
454+ launcher.tease();
455+ }
443 }
456 }
444− }
445
457
446− onEmergencyCall: startLockedApp("dialer-app")
458+ onEmergencyCall: startLockedApp("dialer-app")
447
459
448− Timer {
460+ Binding {
449− // See powerConnection for why this is useful
461+ target: ApplicationManager
450− id: showGreeterDelayed
462+ property: "suspended"
451− interval: 1
452− onTriggered: {
453− greeter.forceShow();
463+ value: greeter.shown
454 }
464 }
455 }
465 }
466+ }
456
467
457− Binding {
468+ Timer {
458− target: ApplicationManager
469+ // See powerConnection for why this is useful
459− property: "suspended"
470+ id: showGreeterDelayed
471+ interval: 1
472+ onTriggered: {
460− value: greeter.shown
473+ greeter.forceShow();
461 }
474 }
462 }
475 }
463
476
qml/Stages/ShimStage.qmlnew file+44
@@ -0,0 +1,44 @@
1+/*
2+ * Copyright (C) 2015 Canonical, Ltd.
3+ *
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
7+ *
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
12+ *
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
15+ */
16+
17+import QtQuick 2.3
18+import Ubuntu.Components 0.1
19+
20+Rectangle {
21+ id: shimStage
22+
23+ anchors.fill: parent
24+ color: UbuntuColors.lightAubergine
25+
26+ Text {
27+ id: greeterModeText
28+
29+ anchors.horizontalCenter: parent.horizontalCenter
30+ anchors.top: parent.top
31+ anchors.topMargin: units.gu(10)
32+ font.bold: true
33+ horizontalAlignment: Text.AlignHCenter
34+ text: "Shell is in \"greeter\" mode"
35+ }
36+
37+ Text {
38+ anchors.centerIn: parent
39+ color: UbuntuColors.orange
40+ font.pointSize: units.gu(8)
41+ horizontalAlignment: Text.AlignHCenter
42+ text: "Shim \nStage"
43+ }
44+}
tests/autopilot/unity8/shell/emulators/dash.py+17−10
@@ -130,7 +130,7 @@ class Dash(ubuntuuitoolkit.UbuntuUIToolkitCustomProxyObjectBase):
130 x, y, width, height = dash_content.globalRect
130 x, y, width, height = dash_content.globalRect
131 # Make the drag range be a multiple of the drag "rate" value.
131 # Make the drag range be a multiple of the drag "rate" value.
132 # Workarounds https://bugs.launchpad.net/mir/+bug/1399690
132 # Workarounds https://bugs.launchpad.net/mir/+bug/1399690
133− rate = 10
133+ rate = 5
134 divisions = 5
134 divisions = 5
135 jump = (width / divisions) // rate * rate
135 jump = (width / divisions) // rate * rate
136 start_x = x + jump
136 start_x = x + jump
@@ -146,7 +146,7 @@ class Dash(ubuntuuitoolkit.UbuntuUIToolkitCustomProxyObjectBase):
146 x, y, width, height = dash_content.globalRect
146 x, y, width, height = dash_content.globalRect
147 # Make the drag range be a multiple of the drag "rate" value.
147 # Make the drag range be a multiple of the drag "rate" value.
148 # Workarounds https://bugs.launchpad.net/mir/+bug/1399690
148 # Workarounds https://bugs.launchpad.net/mir/+bug/1399690
149− rate = 10
149+ rate = 5
150 divisions = 5
150 divisions = 5
151 jump = (width / divisions) // rate * rate
151 jump = (width / divisions) // rate * rate
152 start_x = x + jump * (divisions - 1)
152 start_x = x + jump * (divisions - 1)
@@ -185,14 +185,15 @@ class Dash(ubuntuuitoolkit.UbuntuUIToolkitCustomProxyObjectBase):
185
185
186
186
187class ListViewWithPageHeader(ubuntuuitoolkit.QQuickFlickable):
187class ListViewWithPageHeader(ubuntuuitoolkit.QQuickFlickable):
188− pass
188+
189+ margin_to_swipe_from_bottom = ubuntuuitoolkit.units.gu(4)
189
190
190
191
191class GenericScopeView(ubuntuuitoolkit.UbuntuUIToolkitCustomProxyObjectBase):
192class GenericScopeView(ubuntuuitoolkit.UbuntuUIToolkitCustomProxyObjectBase):
192 """Autopilot emulator for generic scopes."""
193 """Autopilot emulator for generic scopes."""
193
194
194 @autopilot_logging.log_action(logger.info)
195 @autopilot_logging.log_action(logger.info)
195− def open_preview(self, category, app_name):
196+ def open_preview(self, category, app_name, press_duration=0.10):
196 """Open the preview of an application.
197 """Open the preview of an application.
197
198
198 :parameter category: The name of the category where the application is.
199 :parameter category: The name of the category where the application is.
@@ -203,16 +204,19 @@ class GenericScopeView(ubuntuuitoolkit.UbuntuUIToolkitCustomProxyObjectBase):
203 # FIXME some categories need a long press in order to see the preview.
204 # FIXME some categories need a long press in order to see the preview.
204 # Some categories do not show previews, like recent apps.
205 # Some categories do not show previews, like recent apps.
205 # --elopio - 2014-1-14
206 # --elopio - 2014-1-14
206− self.click_scope_item(category, app_name)
207+ self.click_scope_item(category, app_name, press_duration)
207 preview_list = self.wait_select_single(
208 preview_list = self.wait_select_single(
208 'QQuickLoader', objectName='subPageLoader')
209 'QQuickLoader', objectName='subPageLoader')
209 preview_list.subPageShown.wait_for(True)
210 preview_list.subPageShown.wait_for(True)
210 preview_list.x.wait_for(0)
211 preview_list.x.wait_for(0)
212+ self.get_root_instance().select_single(
213+ objectName='processingIndicator').visible.wait_for(False)
211 return preview_list.select_single(
214 return preview_list.select_single(
212− Preview, objectName='preview{}'.format(preview_list.currentIndex))
215+ Preview, objectName='preview{}'.format(
216+ preview_list.initialIndex))
213
217
214 @autopilot_logging.log_action(logger.debug)
218 @autopilot_logging.log_action(logger.debug)
215− def click_scope_item(self, category, title):
219+ def click_scope_item(self, category, title, press_duration=0.10):
216 """Click an item from the scope.
220 """Click an item from the scope.
217
221
218 :parameter category: The name of the category where the item is.
222 :parameter category: The name of the category where the item is.
@@ -220,9 +224,12 @@ class GenericScopeView(ubuntuuitoolkit.UbuntuUIToolkitCustomProxyObjectBase):
220
224
221 """
225 """
222 category_element = self._get_category_element(category)
226 category_element = self._get_category_element(category)
223− icon = category_element.wait_select_single('AbstractButton',
227+ icon = category_element.wait_select_single(
224− title=title)
228+ 'AbstractButton', title=title)
229+ list_view = self.select_single(
230+ ListViewWithPageHeader, objectName='categoryListView')
231+ list_view.swipe_child_into_view(icon)
225− self.pointing_device.click_object(icon)
232+ self.pointing_device.click_object(icon, press_duration=press_duration)
226
233
227 def _get_category_element(self, category):
234 def _get_category_element(self, category):
228 try:
235 try:
tests/autopilot/unity8/shell/tests/test_emulators.py+6
@@ -120,6 +120,12 @@ class GenericScopeViewEmulatorTestCase(tests.DashBaseTestCase):
120 self.assertIsInstance(preview, dash_emulators.Preview)
120 self.assertIsInstance(preview, dash_emulators.Preview)
121 self.assertTrue(preview.isCurrent)
121 self.assertTrue(preview.isCurrent)
122
122
123+ def test_open_preview_of_non_visible_item(self):
124+ """Open an item that requires swiping to make it visible."""
125+ preview = self.generic_scope.open_preview('2', 'Title.2.0')
126+ self.assertIsInstance(preview, dash_emulators.Preview)
127+ self.assertTrue(preview.isCurrent)
128+
123
129
124class DashAppsEmulatorTestCase(tests.DashBaseTestCase):
130class DashAppsEmulatorTestCase(tests.DashBaseTestCase):
125
131
tests/plugins/Dash/cardcreator/1.res+3−2
@@ -1,6 +1,5 @@
1AbstractButton {
1AbstractButton {
2 id: root;
2 id: root;
3− property var template;
4 property var components;
3 property var components;
5 property var cardData;
4 property var cardData;
6 property var artShapeBorderSource: undefined;
5 property var artShapeBorderSource: undefined;
@@ -13,7 +12,7 @@ AbstractButton {
13 property bool asynchronous: true;
12 property bool asynchronous: true;
14 property bool showHeader: true;
13 property bool showHeader: true;
15 implicitWidth: childrenRect.width;
14 implicitWidth: childrenRect.width;
16− enabled: root.template == null ? true : (root.template["non-interactive"] !== undefined ? !root.template["non-interactive"] : true);
15+ enabled: true;
17
16
18onArtShapeBorderSourceChanged: { if (artShapeBorderSource !== undefined && artShapeLoader.item) artShapeLoader.item.borderSource = artShapeBorderSource; }
17onArtShapeBorderSourceChanged: { if (artShapeBorderSource !== undefined && artShapeLoader.item) artShapeLoader.item.borderSource = artShapeBorderSource; }
19readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1);
18readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1);
@@ -34,6 +33,7 @@ Item {
34 property bool doShapeItem: components["art"]["conciergeMode"] !== true;
33 property bool doShapeItem: components["art"]["conciergeMode"] !== true;
35 visible: image.status == Image.Ready;
34 visible: image.status == Image.Ready;
36 readonly property alias image: artImage.image;
35 readonly property alias image: artImage.image;
36+ property alias borderSource: artShapeShape.borderSource;
37 ShaderEffectSource {
37 ShaderEffectSource {
38 id: artShapeSource;
38 id: artShapeSource;
39 sourceItem: artImage;
39 sourceItem: artImage;
@@ -43,6 +43,7 @@ Item {
43 hideSource: doShapeItem;
43 hideSource: doShapeItem;
44 }
44 }
45 Shape {
45 Shape {
46+ id: artShapeShape;
46 image: artShapeSource;
47 image: artShapeSource;
47 anchors.fill: parent;
48 anchors.fill: parent;
48 visible: doShapeItem;
49 visible: doShapeItem;
tests/plugins/Dash/cardcreator/2.res+3−8
@@ -1,6 +1,5 @@
1AbstractButton {
1AbstractButton {
2 id: root;
2 id: root;
3− property var template;
4 property var components;
3 property var components;
5 property var cardData;
4 property var cardData;
6 property var artShapeBorderSource: undefined;
5 property var artShapeBorderSource: undefined;
@@ -13,7 +12,7 @@ AbstractButton {
13 property bool asynchronous: true;
12 property bool asynchronous: true;
14 property bool showHeader: true;
13 property bool showHeader: true;
15 implicitWidth: childrenRect.width;
14 implicitWidth: childrenRect.width;
16− enabled: root.template == null ? true : (root.template["non-interactive"] !== undefined ? !root.template["non-interactive"] : true);
15+ enabled: true;
17
16
18Loader {
17Loader {
19 id: backgroundLoader;
18 id: backgroundLoader;
@@ -33,18 +32,14 @@ Loader {
33 objectName: "backgroundImage";
32 objectName: "backgroundImage";
34 source: {
33 source: {
35 if (cardData && typeof cardData["background"] === "string") return cardData["background"];
34 if (cardData && typeof cardData["background"] === "string") return cardData["background"];
36− else if (template && typeof template["card-background"] === "string") return template["card-background"];
35+ else return "";
37− else return "";
38 }
36 }
39 }
37 }
40 function getColor(index) {
38 function getColor(index) {
41 if (cardData && typeof cardData["background"] === "object"
39 if (cardData && typeof cardData["background"] === "object"
42 && (cardData["background"]["type"] === "color" || cardData["background"]["type"] === "gradient")) {
40 && (cardData["background"]["type"] === "color" || cardData["background"]["type"] === "gradient")) {
43 return cardData["background"]["elements"][index];
41 return cardData["background"]["elements"][index];
44− } else if (template && typeof template["card-background"] === "object"
42+ } else return index === 0 ? "#E9E9E9" : undefined;
45− && (template["card-background"]["type"] === "color" || template["card-background"]["type"] === "gradient")) {
46− return template["card-background"]["elements"][index];
47− } else return undefined;
48 }
43 }
49 }
44 }
50 }
45 }
tests/plugins/Dash/cardcreator/3.res+3−2
@@ -1,6 +1,5 @@
1AbstractButton {
1AbstractButton {
2 id: root;
2 id: root;
3− property var template;
4 property var components;
3 property var components;
5 property var cardData;
4 property var cardData;
6 property var artShapeBorderSource: undefined;
5 property var artShapeBorderSource: undefined;
@@ -13,7 +12,7 @@ AbstractButton {
13 property bool asynchronous: true;
12 property bool asynchronous: true;
14 property bool showHeader: true;
13 property bool showHeader: true;
15 implicitWidth: childrenRect.width;
14 implicitWidth: childrenRect.width;
16− enabled: root.template == null ? true : (root.template["non-interactive"] !== undefined ? !root.template["non-interactive"] : true);
15+ enabled: true;
17
16
18onArtShapeBorderSourceChanged: { if (artShapeBorderSource !== undefined && artShapeLoader.item) artShapeLoader.item.borderSource = artShapeBorderSource; }
17onArtShapeBorderSourceChanged: { if (artShapeBorderSource !== undefined && artShapeLoader.item) artShapeLoader.item.borderSource = artShapeBorderSource; }
19readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1);
18readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1);
@@ -34,6 +33,7 @@ Item {
34 property bool doShapeItem: components["art"]["conciergeMode"] !== true;
33 property bool doShapeItem: components["art"]["conciergeMode"] !== true;
35 visible: image.status == Image.Ready;
34 visible: image.status == Image.Ready;
36 readonly property alias image: artImage.image;
35 readonly property alias image: artImage.image;
36+ property alias borderSource: artShapeShape.borderSource;
37 ShaderEffectSource {
37 ShaderEffectSource {
38 id: artShapeSource;
38 id: artShapeSource;
39 sourceItem: artImage;
39 sourceItem: artImage;
@@ -43,6 +43,7 @@ Item {
43 hideSource: doShapeItem;
43 hideSource: doShapeItem;
44 }
44 }
45 Shape {
45 Shape {
46+ id: artShapeShape;
46 image: artShapeSource;
47 image: artShapeSource;
47 anchors.fill: parent;
48 anchors.fill: parent;
48 visible: doShapeItem;
49 visible: doShapeItem;
tests/plugins/Dash/cardcreator/4.res+1−2
@@ -1,6 +1,5 @@
1AbstractButton {
1AbstractButton {
2 id: root;
2 id: root;
3− property var template;
4 property var components;
3 property var components;
5 property var cardData;
4 property var cardData;
6 property var artShapeBorderSource: undefined;
5 property var artShapeBorderSource: undefined;
@@ -13,7 +12,7 @@ AbstractButton {
13 property bool asynchronous: true;
12 property bool asynchronous: true;
14 property bool showHeader: true;
13 property bool showHeader: true;
15 implicitWidth: childrenRect.width;
14 implicitWidth: childrenRect.width;
16− enabled: root.template == null ? true : (root.template["non-interactive"] !== undefined ? !root.template["non-interactive"] : true);
15+ enabled: true;
17
16
18readonly property size artShapeSize: Qt.size(-1, -1);
17readonly property size artShapeSize: Qt.size(-1, -1);
19readonly property int headerHeight: row.height;
18readonly property int headerHeight: row.height;
tests/plugins/Dash/cardcreator/5.res+3−2
@@ -1,6 +1,5 @@
1AbstractButton {
1AbstractButton {
2 id: root;
2 id: root;
3− property var template;
4 property var components;
3 property var components;
5 property var cardData;
4 property var cardData;
6 property var artShapeBorderSource: undefined;
5 property var artShapeBorderSource: undefined;
@@ -13,7 +12,7 @@ AbstractButton {
13 property bool asynchronous: true;
12 property bool asynchronous: true;
14 property bool showHeader: true;
13 property bool showHeader: true;
15 implicitWidth: childrenRect.width;
14 implicitWidth: childrenRect.width;
16− enabled: root.template == null ? true : (root.template["non-interactive"] !== undefined ? !root.template["non-interactive"] : true);
15+ enabled: false;
17
16
18onArtShapeBorderSourceChanged: { if (artShapeBorderSource !== undefined && artShapeLoader.item) artShapeLoader.item.borderSource = artShapeBorderSource; }
17onArtShapeBorderSourceChanged: { if (artShapeBorderSource !== undefined && artShapeLoader.item) artShapeLoader.item.borderSource = artShapeBorderSource; }
19readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1);
18readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1);
@@ -34,6 +33,7 @@ Item {
34 property bool doShapeItem: components["art"]["conciergeMode"] !== true;
33 property bool doShapeItem: components["art"]["conciergeMode"] !== true;
35 visible: image.status == Image.Ready;
34 visible: image.status == Image.Ready;
36 readonly property alias image: artImage.image;
35 readonly property alias image: artImage.image;
36+ property alias borderSource: artShapeShape.borderSource;
37 ShaderEffectSource {
37 ShaderEffectSource {
38 id: artShapeSource;
38 id: artShapeSource;
39 sourceItem: artImage;
39 sourceItem: artImage;
@@ -43,6 +43,7 @@ Item {
43 hideSource: doShapeItem;
43 hideSource: doShapeItem;
44 }
44 }
45 Shape {
45 Shape {
46+ id: artShapeShape;
46 image: artShapeSource;
47 image: artShapeSource;
47 anchors.fill: parent;
48 anchors.fill: parent;
48 visible: doShapeItem;
49 visible: doShapeItem;
tests/plugins/Dash/cardcreator/5.tst+1−1
@@ -1,3 +1,3 @@
1−template: {"card-layout":"vertical","card-size":"medium","category-layout":"carousel","collapsed-rows":2,"overlay":true}
1+template: {"non-interactive":true,"card-layout":"vertical","card-size":"medium","category-layout":"carousel","collapsed-rows":2,"overlay":true}
2components: {"art":{"aspect-ratio":1,"field":"art"},"subtitle":{"field":"artist"},"title":{"field":"title"},"attributes":{}}
2components: {"art":{"aspect-ratio":1,"field":"art"},"subtitle":{"field":"artist"},"title":{"field":"title"},"attributes":{}}
3result: 5.res
3result: 5.res
tests/plugins/Dash/cardcreator/6.res+3−8
@@ -1,6 +1,5 @@
1AbstractButton {
1AbstractButton {
2 id: root;
2 id: root;
3− property var template;
4 property var components;
3 property var components;
5 property var cardData;
4 property var cardData;
6 property var artShapeBorderSource: undefined;
5 property var artShapeBorderSource: undefined;
@@ -13,7 +12,7 @@ AbstractButton {
13 property bool asynchronous: true;
12 property bool asynchronous: true;
14 property bool showHeader: true;
13 property bool showHeader: true;
15 implicitWidth: childrenRect.width;
14 implicitWidth: childrenRect.width;
16− enabled: root.template == null ? true : (root.template["non-interactive"] !== undefined ? !root.template["non-interactive"] : true);
15+ enabled: true;
17
16
18Loader {
17Loader {
19 id: backgroundLoader;
18 id: backgroundLoader;
@@ -33,18 +32,14 @@ Loader {
33 objectName: "backgroundImage";
32 objectName: "backgroundImage";
34 source: {
33 source: {
35 if (cardData && typeof cardData["background"] === "string") return cardData["background"];
34 if (cardData && typeof cardData["background"] === "string") return cardData["background"];
36− else if (template && typeof template["card-background"] === "string") return template["card-background"];
35+ else return "http://assets.ubuntu.com/sites/ubuntu/latest/u/img/logos/logo-ubuntu-grey.png";
37− else return "";
38 }
36 }
39 }
37 }
40 function getColor(index) {
38 function getColor(index) {
41 if (cardData && typeof cardData["background"] === "object"
39 if (cardData && typeof cardData["background"] === "object"
42 && (cardData["background"]["type"] === "color" || cardData["background"]["type"] === "gradient")) {
40 && (cardData["background"]["type"] === "color" || cardData["background"]["type"] === "gradient")) {
43 return cardData["background"]["elements"][index];
41 return cardData["background"]["elements"][index];
44− } else if (template && typeof template["card-background"] === "object"
42+ } else return index === 0 ? undefined : undefined;
45− && (template["card-background"]["type"] === "color" || template["card-background"]["type"] === "gradient")) {
46− return template["card-background"]["elements"][index];
47− } else return undefined;
48 }
43 }
49 }
44 }
50 }
45 }
tests/plugins/Dash/cardcreator/6.tst+1−1
@@ -1,3 +1,3 @@
1−template: {"card-background":{"elements":["#E9E9E9"],"type":"color"},"card-layout":"vertical","card-size":"medium","category-layout":"grid","collapsed-rows":2}
1+template: {"card-background":"http://assets.ubuntu.com/sites/ubuntu/latest/u/img/logos/logo-ubuntu-grey.png","card-layout":"vertical","card-size":"medium","category-layout":"grid","collapsed-rows":2}
2components: {"art":{"aspect-ratio":1},"background":{"field":"background"},"subtitle":{"field":"author"},"title":{"field":"title"},"emblem":{"field":"source"},"attributes":{}}
2components: {"art":{"aspect-ratio":1},"background":{"field":"background"},"subtitle":{"field":"author"},"title":{"field":"title"},"emblem":{"field":"source"},"attributes":{}}
3result: 6.res
3result: 6.res
tests/plugins/Dash/cardcreator/7.res+3−8
@@ -1,6 +1,5 @@
1AbstractButton {
1AbstractButton {
2 id: root;
2 id: root;
3− property var template;
4 property var components;
3 property var components;
5 property var cardData;
4 property var cardData;
6 property var artShapeBorderSource: undefined;
5 property var artShapeBorderSource: undefined;
@@ -13,7 +12,7 @@ AbstractButton {
13 property bool asynchronous: true;
12 property bool asynchronous: true;
14 property bool showHeader: true;
13 property bool showHeader: true;
15 implicitWidth: childrenRect.width;
14 implicitWidth: childrenRect.width;
16− enabled: root.template == null ? true : (root.template["non-interactive"] !== undefined ? !root.template["non-interactive"] : true);
15+ enabled: true;
17
16
18Loader {
17Loader {
19 id: backgroundLoader;
18 id: backgroundLoader;
@@ -33,18 +32,14 @@ Loader {
33 objectName: "backgroundImage";
32 objectName: "backgroundImage";
34 source: {
33 source: {
35 if (cardData && typeof cardData["background"] === "string") return cardData["background"];
34 if (cardData && typeof cardData["background"] === "string") return cardData["background"];
36− else if (template && typeof template["card-background"] === "string") return template["card-background"];
35+ else return "";
37− else return "";
38 }
36 }
39 }
37 }
40 function getColor(index) {
38 function getColor(index) {
41 if (cardData && typeof cardData["background"] === "object"
39 if (cardData && typeof cardData["background"] === "object"
42 && (cardData["background"]["type"] === "color" || cardData["background"]["type"] === "gradient")) {
40 && (cardData["background"]["type"] === "color" || cardData["background"]["type"] === "gradient")) {
43 return cardData["background"]["elements"][index];
41 return cardData["background"]["elements"][index];
44− } else if (template && typeof template["card-background"] === "object"
42+ } else return index === 0 ? "#E9E9E9" : "#E9AAE9";
45− && (template["card-background"]["type"] === "color" || template["card-background"]["type"] === "gradient")) {
46− return template["card-background"]["elements"][index];
47− } else return undefined;
48 }
43 }
49 }
44 }
50 }
45 }
tests/plugins/Dash/cardcreator/7.tst+1−1
@@ -1,3 +1,3 @@
1−template: {"card-background":{"elements":["#E9E9E9"],"type":"color"},"card-layout":"vertical","card-size":"medium","category-layout":"grid","collapsed-rows":2}
1+template: {"card-background":{"elements":["#E9E9E9","#E9AAE9"],"type":"color"},"card-layout":"vertical","card-size":"medium","category-layout":"grid","collapsed-rows":2}
2components: {"art":{"aspect-ratio":1},"background":{"field":"background"},"mascot":{"field":"icon"},"subtitle":{"field":"author"},"title":{"field":"title"},"attributes":{"field":"attributes","max-count":2}}
2components: {"art":{"aspect-ratio":1},"background":{"field":"background"},"mascot":{"field":"icon"},"subtitle":{"field":"author"},"title":{"field":"title"},"attributes":{"field":"attributes","max-count":2}}
3result: 7.res
3result: 7.res
tests/qmltests/CMakeLists.txt+1−1
@@ -94,4 +94,4 @@ add_qml_test(Stages TabletStage)
94add_qml_test(Stages WindowMoveResizeArea)
94add_qml_test(Stages WindowMoveResizeArea)
95add_qml_test(Stages Splash)
95add_qml_test(Stages Splash)
96add_qml_test(Tutorial Tutorial)
96add_qml_test(Tutorial Tutorial)
97−add_qml_test(Wizard Wizard)
97+add_qml_test(Wizard Wizard ENVIRONMENT "OXIDE_NO_SANDBOX=1")
tests/qmltests/Dash/tst_Card.qml−1
@@ -124,7 +124,6 @@ Rectangle {
124 sourceComponent: cardTool.cardComponent
124 sourceComponent: cardTool.cardComponent
125 clip: true
125 clip: true
126 onLoaded: {
126 onLoaded: {
127− item.template = Qt.binding(function() { return cardTool.template; });
128 item.components = Qt.binding(function() { return cardTool.components; });
127 item.components = Qt.binding(function() { return cardTool.components; });
129 item.cardData = Qt.binding(function() { return Helpers.mapData(dataArea.text, cardTool.components, dataError); });
128 item.cardData = Qt.binding(function() { return Helpers.mapData(dataArea.text, cardTool.components, dataError); });
130 item.width = Qt.binding(function() { return cardTool.cardWidth || item.implicitWidth; });
129 item.width = Qt.binding(function() { return cardTool.cardWidth || item.implicitWidth; });
tests/qmltests/Dash/tst_GenericScopeView.qml+30−7
@@ -302,6 +302,7 @@ Item {
302 }
302 }
303
303
304 function closePreview() {
304 function closePreview() {
305+ tryCompare(testCase.subPageLoader, "x", 0);
305 var closePreviewMouseArea = findChild(subPageLoader.item, "pageHeader");
306 var closePreviewMouseArea = findChild(subPageLoader.item, "pageHeader");
306 mouseClick(closePreviewMouseArea, units.gu(2), units.gu(2));
307 mouseClick(closePreviewMouseArea, units.gu(2), units.gu(2));
307
308
@@ -616,27 +617,49 @@ Item {
616 waitForRendering(category0);
617 waitForRendering(category0);
617
618
618 var cardTool = findChild(category0, "cardTool");
619 var cardTool = findChild(category0, "cardTool");
619− var cardGrid = category0.item;
620−
621 cardTool.template["non-interactive"] = true;
620 cardTool.template["non-interactive"] = true;
621+ cardTool.templateChanged();
622+
623+ var category0 = findChild(categoryListView, "dashCategory0");
624+ waitForRendering(category0);
625+
626+ var cardGrid = category0.item;
622 compare(cardGrid.cardTool.template["non-interactive"], true);
627 compare(cardGrid.cardTool.template["non-interactive"], true);
623
628
624 var item0 = findChild(cardGrid, "delegate0");
629 var item0 = findChild(cardGrid, "delegate0");
625 waitForRendering(item0);
630 waitForRendering(item0);
626− item0.template = cardTool.template;
627− compare(item0.template["non-interactive"], true);
628 compare(item0.enabled, false);
631 compare(item0.enabled, false);
629 var touchdown = findChild(item0, "touchdown");
632 var touchdown = findChild(item0, "touchdown");
630
633
631 compare(touchdown.visible, false);
634 compare(touchdown.visible, false);
632− mouseClick(item0);
635+ mousePress(item0);
633 compare(touchdown.visible, false);
636 compare(touchdown.visible, false);
637+ mouseRelease(item0);
634
638
635 cardTool.template["non-interactive"] = false;
639 cardTool.template["non-interactive"] = false;
640+ cardTool.templateChanged();
636 compare(cardGrid.cardTool.template["non-interactive"], false);
641 compare(cardGrid.cardTool.template["non-interactive"], false);
637− item0.template = cardTool.template;
642+
638− compare(item0.template["non-interactive"], false);
643+ waitForRendering(category0);
644+ item0 = findChild(cardGrid, "delegate0");
639 compare(item0.enabled, true);
645 compare(item0.enabled, true);
646+ var touchdown = findChild(item0, "touchdown");
647+
648+ compare(touchdown.visible, false);
649+ mousePress(item0);
650+ compare(touchdown.visible, true);
651+ mouseRelease(item0);
652+ compare(touchdown.visible, false);
653+ closePreview();
654+ }
655+
656+ function test_carousel_borderSource() {
657+ var category = scrollToCategory("dashCategory1");
658+ var tile = findChild(category, "carouselDelegate0");
659+ tryCompareFunction(function() { return findChild(tile, "artShapeLoader") !== null; }, true);
660+ var artShapeLoader = findChild(tile, "artShapeLoader");
661+ var shape = findChildsByType(artShapeLoader, "UCUbuntuShape");
662+ compare(shape.borderSource, undefined);
640 }
663 }
641 }
664 }
642 }
665 }
tests/qmltests/Tutorial/tst_Tutorial.qml+1
@@ -73,6 +73,7 @@ Item {
73 sourceComponent: Component {
73 sourceComponent: Component {
74 Shell {
74 Shell {
75 property string indicatorProfile: "phone"
75 property string indicatorProfile: "phone"
76+ property string shellMode: "full-greeter" /* default */
76
77
77 Component.onDestruction: {
78 Component.onDestruction: {
78 shellLoader.itemDestroyed = true;
79 shellLoader.itemDestroyed = true;
tests/qmltests/tst_Shell.qml+2
@@ -81,6 +81,8 @@ Rectangle {
81 property bool itemDestroyed: false
81 property bool itemDestroyed: false
82 sourceComponent: Component {
82 sourceComponent: Component {
83 Shell {
83 Shell {
84+ property string shellMode: "full-greeter" /* default */
85+
84 usageScenario: "phone"
86 usageScenario: "phone"
85 orientation: Qt.PortraitOrientation
87 orientation: Qt.PortraitOrientation
86 primaryOrientation: Qt.PortraitOrientation
88 primaryOrientation: Qt.PortraitOrientation
tests/qmltests/tst_ShellWithPin.qml+2
@@ -69,6 +69,8 @@ Item {
69 property bool itemDestroyed: false
69 property bool itemDestroyed: false
70 sourceComponent: Component {
70 sourceComponent: Component {
71 Shell {
71 Shell {
72+ property string shellMode: "full-greeter" /* default */
73+
72 Component.onDestruction: {
74 Component.onDestruction: {
73 shellLoader.itemDestroyed = true
75 shellLoader.itemDestroyed = true
74 }
76 }
tests/utils/modules/Unity/Test/UnityTestCase.qml+2−1
@@ -26,6 +26,7 @@ TestCase {
26 // This is needed for waitForRendering calls to return
26 // This is needed for waitForRendering calls to return
27 // if the watched element already got rendered
27 // if the watched element already got rendered
28 Rectangle {
28 Rectangle {
29+ id: rotatingRectangle
29 width: units.gu(1)
30 width: units.gu(1)
30 height: width
31 height: width
31 parent: testCase.parent
32 parent: testCase.parent
@@ -35,7 +36,7 @@ TestCase {
35 visible: testCase.running
36 visible: testCase.running
36
37
37 RotationAnimation on rotation {
38 RotationAnimation on rotation {
38− running: parent.visible
39+ running: rotatingRectangle.visible
39 from: 0
40 from: 0
40 to: 360
41 to: 360
41 loops: Animation.Infinite
42 loops: Animation.Infinite