on xenial help sign in
merge trunk
d7ec031Michael Zanetti
CMakeLists.txt+7−7
@@ -49,13 +49,13 @@ add_custom_target(cppcheck COMMAND cppcheck --enable=all -q --error-exitcode=2
49 ${CMAKE_SOURCE_DIR}/src ${CMAKE_SOURCE_DIR}/tests)
49 ${CMAKE_SOURCE_DIR}/src ${CMAKE_SOURCE_DIR}/tests)
50
50
51include(FindPkgConfig)
51include(FindPkgConfig)
52−find_package(Qt5Core 5.2 REQUIRED)
52+find_package(Qt5Core 5.4 REQUIRED)
53−find_package(Qt5Qml 5.2 REQUIRED)
53+find_package(Qt5Qml 5.4 REQUIRED)
54−find_package(Qt5Quick 5.2 REQUIRED)
54+find_package(Qt5Quick 5.4 REQUIRED)
55−find_package(Qt5Gui 5.2 REQUIRED)
55+find_package(Qt5Gui 5.4 REQUIRED)
56−find_package(Qt5DBus 5.2 REQUIRED)
56+find_package(Qt5DBus 5.4 REQUIRED)
57−find_package(Qt5Concurrent 5.2 REQUIRED)
57+find_package(Qt5Concurrent 5.4 REQUIRED)
58−find_package(Qt5Sql 5.2 REQUIRED)
58+find_package(Qt5Sql 5.4 REQUIRED)
59
59
60pkg_check_modules(APPLICATION_API REQUIRED unity-shell-application=10)
60pkg_check_modules(APPLICATION_API REQUIRED unity-shell-application=10)
61
61
debian/changelog+58
@@ -1,3 +1,61 @@
1+unity8 (8.11+16.04.20151104-0ubuntu1) xenial; urgency=medium
2+
3+ [ Albert Astals Cid ]
4+ * Add an Item that proxies for old and new audio roles (LP: #1493851)
5+ * CroppedImageMinimumSourceSize: Fix 'Binding loop detected for
6+ property "imageAspectRatio"'
7+ * Make the scope settings list scroll to text visible area (LP:
8+ #1499084)
9+ * Move to importing QtQuick 2.4 & friends
10+ * Use SDK 1.3 across all files (LP: #1503498, #1508363, #1449628)
11+
12+ [ Andrea Cimitan ]
13+ * Add sharing widget to zoomable image and video playback
14+ * Make zoomable and video playback widgets edge to edge
15+ * Updated all 1.3 UbuntuShape to use new APIs where possible
16+ * Use SDK 1.3 across all files (LP: #1503498, #1508363, #1449628)
17+
18+ [ CI Train Bot ]
19+ * Resync trunk.
20+
21+ [ Christopher Lee ]
22+ * Quick spelling fix in process control output.
23+
24+ [ Daniel d'Andrada ]
25+ * Enable support for overriding application orientations based on
26+ device type (LP: #1478637)
27+ * Use SDK 1.3 across all files (LP: #1503498, #1508363, #1449628)
28+ * Use SDK 1.3 across all files (LP: #1503498, #1508363, #1449628)
29+
30+ [ Josh Arenson ]
31+ * Enable support for overriding application orientations based on
32+ device type (LP: #1478637)
33+
34+ [ Michael Terry ]
35+ * Avoid showing the shutdown dialog when turning on the screen if your
36+ device is under heavy load. (LP: #1508563)
37+ * Handle lifecycle policy exceptions ourselves, instead of letting
38+ qtmir do it for us and allow non-Touch apps to opt-out of the Touch
39+ lifecycle.
40+
41+ [ Michael Zanetti ]
42+ * Fixes for the panel buttons (LP: #1510360, #1504269, #1431566,
43+ #1443319)
44+ * Use SDK 1.3 across all files (LP: #1503498, #1508363, #1449628)
45+
46+ [ Michał Sawicz ]
47+ * Add missing copyright to Cursor.qml
48+ * Enable support for overriding application orientations based on
49+ device type (LP: #1478637)
50+ * Support server->client visibility change to stop rendering
51+ (lp:#1475678) (LP: #1475678)
52+
53+ [ Nick Dedekind ]
54+ * Support server->client visibility change to stop rendering
55+ (lp:#1475678) (LP: #1475678)
56+
57+ -- Michał Sawicz <michal.sawicz@canonical.com> Wed, 04 Nov 2015 14:58:41 +0000
58+
1unity8 (8.11+15.10.20151021-0ubuntu1) wily; urgency=medium
59unity8 (8.11+15.10.20151021-0ubuntu1) wily; urgency=medium
2
60
3 [ Albert Astals Cid ]
61 [ Albert Astals Cid ]
debian/control+7−6
@@ -29,7 +29,7 @@ Build-Depends: cmake,
29 libqt5xmlpatterns5-dev,
29 libqt5xmlpatterns5-dev,
30 libsystemsettings-dev,
30 libsystemsettings-dev,
31 libudev-dev,
31 libudev-dev,
32− libunity-api-dev (>= 7.101),
32+ libunity-api-dev (>= 7.102),
33 libusermetricsoutput1-dev,
33 libusermetricsoutput1-dev,
34 libxcb1-dev,
34 libxcb1-dev,
35 pkg-config,
35 pkg-config,
@@ -42,15 +42,16 @@ Build-Depends: cmake,
42 qml-module-qtsysteminfo,
42 qml-module-qtsysteminfo,
43 qml-module-qttest,
43 qml-module-qttest,
44 qt5-default,
44 qt5-default,
45− qtbase5-dev (>= 5.2.1),
45+ qtbase5-dev (>= 5.4),
46 qtbase5-dev-tools,
46 qtbase5-dev-tools,
47− qtbase5-private-dev (>= 5.2.1),
47+ qtbase5-private-dev (>= 5.4),
48− qtdeclarative5-dev (>= 5.2.1),
48+ qtdeclarative5-dev (>= 5.4),
49 qtdeclarative5-dev-tools,
49 qtdeclarative5-dev-tools,
50− qtdeclarative5-private-dev (>= 5.2.1),
50+ qtdeclarative5-private-dev (>= 5.4),
51 qtdeclarative5-qtmultimedia-plugin,
51 qtdeclarative5-qtmultimedia-plugin,
52+ qtdeclarative5-ubuntu-content1,
52 qtdeclarative5-ubuntu-settings-components (>= 0.6),
53 qtdeclarative5-ubuntu-settings-components (>= 0.6),
53− qtdeclarative5-ubuntu-ui-toolkit-plugin (>= 1.3.1627) | qtdeclarative5-ubuntu-ui-toolkit-plugin-gles (>= 1.3.1627),
54+ qtdeclarative5-ubuntu-ui-toolkit-plugin (>= 1.3.1676) | qtdeclarative5-ubuntu-ui-toolkit-plugin-gles (>= 1.3.1676),
54 qtdeclarative5-ubuntu-web-plugin,
55 qtdeclarative5-ubuntu-web-plugin,
55 ttf-ubuntu-font-family,
56 ttf-ubuntu-font-family,
56Standards-Version: 3.9.4
57Standards-Version: 3.9.4
plugins/Dash/CardAttributes.qml+3−3
@@ -14,9 +14,9 @@
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.2
17+import QtQuick 2.4
18import QtQuick.Layouts 1.1
18import QtQuick.Layouts 1.1
19−import Ubuntu.Components 1.1
19+import Ubuntu.Components 1.3
20
20
21GridLayout {
21GridLayout {
22 id: grid
22 id: grid
@@ -27,7 +27,7 @@ GridLayout {
27 columns: 2 + repeater.count % 2
27 columns: 2 + repeater.count % 2
28 rowSpacing: units.gu(.5)
28 rowSpacing: units.gu(.5)
29 property alias model: repeater.model
29 property alias model: repeater.model
30− property color color: Theme.palette.normal.baseText
30+ property color color: theme.palette.normal.baseText
31 property real fontScale: 1.0
31 property real fontScale: 1.0
32
32
33 Repeater {
33 Repeater {
plugins/Dash/CardCreator.js+26−52
@@ -28,11 +28,12 @@ var kBackgroundLoaderCode = 'Loader {\n\
28 sourceComponent: UbuntuShape { \n\
28 sourceComponent: UbuntuShape { \n\
29 objectName: "background"; \n\
29 objectName: "background"; \n\
30 radius: "medium"; \n\
30 radius: "medium"; \n\
31− color: getColor(0) || "white"; \n\
31+ backgroundColor: getColor(0) || "white"; \n\
32− gradientColor: getColor(1) || color; \n\
32+ secondaryBackgroundColor: getColor(1) || backgroundColor; \n\
33+ backgroundMode: UbuntuShape.VerticalGradient; \n\
33 anchors.fill: parent; \n\
34 anchors.fill: parent; \n\
34− image: backgroundImage.source ? backgroundImage : null; \n\
35+ source: backgroundImage.source ? backgroundImage : null; \n\
35− property real luminance: Style.luminance(color); \n\
36+ property real luminance: Style.luminance(backgroundColor); \n\
36 property Image backgroundImage: Image { \n\
37 property Image backgroundImage: Image { \n\
37 objectName: "backgroundImage"; \n\
38 objectName: "backgroundImage"; \n\
38 source: { \n\
39 source: { \n\
@@ -52,7 +53,7 @@ var kBackgroundLoaderCode = 'Loader {\n\
52// %1 is used as anchors of artShapeHolder
53// %1 is used as anchors of artShapeHolder
53// %2 is used as image width
54// %2 is used as image width
54// %3 is used as image height
55// %3 is used as image height
55−var kArtShapeHolderCode = 'Item { \n\
56+var kArtShapeHolderCode = 'Item { \n\
56 id: artShapeHolder; \n\
57 id: artShapeHolder; \n\
57 height: root.fixedArtShapeSize.height > 0 ? root.fixedArtShapeSize.height : artShapeLoader.height; \n\
58 height: root.fixedArtShapeSize.height > 0 ? root.fixedArtShapeSize.height : artShapeLoader.height; \n\
58 width: root.fixedArtShapeSize.width > 0 ? root.fixedArtShapeSize.width : artShapeLoader.width; \n\
59 width: root.fixedArtShapeSize.width > 0 ? root.fixedArtShapeSize.width : artShapeLoader.width; \n\
@@ -66,10 +67,9 @@ var kArtShapeHolderCode = 'Item { \n\
66 sourceComponent: Item { \n\
67 sourceComponent: Item { \n\
67 id: artShape; \n\
68 id: artShape; \n\
68 objectName: "artShape"; \n\
69 objectName: "artShape"; \n\
69− property bool doShapeItem: components["art"]["conciergeMode"] !== true; \n\
70+ readonly property bool doShapeItem: components["art"]["conciergeMode"] !== true; \n\
70 visible: image.status == Image.Ready; \n\
71 visible: image.status == Image.Ready; \n\
71 readonly property alias image: artImage; \n\
72 readonly property alias image: artImage; \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\
@@ -78,16 +78,17 @@ var kArtShapeHolderCode = 'Item { \n\
78 height: 1; \n\
78 height: 1; \n\
79 hideSource: doShapeItem; \n\
79 hideSource: doShapeItem; \n\
80 } \n\
80 } \n\
81− Shape { \n\
81+ UbuntuShape { \n\
82 id: artShapeShape; \n\
82 id: artShapeShape; \n\
83− image: artShapeSource; \n\
83+ source: artShapeSource; \n\
84 anchors.fill: parent; \n\
84 anchors.fill: parent; \n\
85 visible: doShapeItem; \n\
85 visible: doShapeItem; \n\
86 radius: "medium"; \n\
86 radius: "medium"; \n\
87+ aspect: root.artShapeStyle === "inset" ? UbuntuShape.Inset : UbuntuShape.Flat; \n\
87 } \n\
88 } \n\
88 readonly property real fixedArtShapeSizeAspect: (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) ? root.fixedArtShapeSize.width / root.fixedArtShapeSize.height : -1; \n\
89 readonly property real fixedArtShapeSizeAspect: (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) ? root.fixedArtShapeSize.width / root.fixedArtShapeSize.height : -1; \n\
89 readonly property real aspect: fixedArtShapeSizeAspect > 0 ? fixedArtShapeSizeAspect : components !== undefined ? components["art"]["aspect-ratio"] : 1; \n\
90 readonly property real aspect: fixedArtShapeSizeAspect > 0 ? fixedArtShapeSizeAspect : components !== undefined ? components["art"]["aspect-ratio"] : 1; \n\
90− Component.onCompleted: { updateWidthHeightBindings(); if (artShapeBorderSource !== undefined) borderSource = artShapeBorderSource; } \n\
91+ Component.onCompleted: { updateWidthHeightBindings(); } \n\
91 Connections { target: root; onFixedArtShapeSizeChanged: updateWidthHeightBindings(); } \n\
92 Connections { target: root; onFixedArtShapeSizeChanged: updateWidthHeightBindings(); } \n\
92 function updateWidthHeightBindings() { \n\
93 function updateWidthHeightBindings() { \n\
93 if (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) { \n\
94 if (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) { \n\
@@ -112,44 +113,18 @@ var kArtShapeHolderCode = 'Item { \n\
112
113
113var kOverlayLoaderCode = 'Loader { \n\
114var kOverlayLoaderCode = 'Loader { \n\
114 id: overlayLoader; \n\
115 id: overlayLoader; \n\
115− anchors { \n\
116+ readonly property real overlayHeight: (fixedHeaderHeight > 0 ? fixedHeaderHeight : headerHeight) + units.gu(2); \n\
116− left: artShapeHolder.left; \n\
117− right: artShapeHolder.right; \n\
117+ anchors.fill: artShapeHolder; \n\
118− bottom: artShapeHolder.bottom; \n\
119− } \n\
120 active: artShapeLoader.active && artShapeLoader.item && artShapeLoader.item.image.status === Image.Ready || false; \n\
118 active: artShapeLoader.active && artShapeLoader.item && artShapeLoader.item.image.status === Image.Ready || false; \n\
121 asynchronous: root.asynchronous; \n\
119 asynchronous: root.asynchronous; \n\
122 visible: showHeader && status == Loader.Ready; \n\
120 visible: showHeader && status == Loader.Ready; \n\
123− sourceComponent: ShaderEffect { \n\
121+ sourceComponent: UbuntuShapeOverlay { \n\
124 id: overlay; \n\
122 id: overlay; \n\
125− height: (fixedHeaderHeight > 0 ? fixedHeaderHeight : headerHeight) + units.gu(2); \n\
126 property real luminance: Style.luminance(overlayColor); \n\
123 property real luminance: Style.luminance(overlayColor); \n\
124+ aspect: UbuntuShape.Flat; \n\
125+ radius: "medium"; \n\
127− property color overlayColor: cardData && cardData["overlayColor"] || "#99000000"; \n\
126+ overlayColor: cardData && cardData["overlayColor"] || "#99000000"; \n\
128− property var source: ShaderEffectSource { \n\
127+ overlayRect: Qt.rect(0, 1 - overlayLoader.overlayHeight / height, 1, 1); \n\
129− id: shaderSource; \n\
130− sourceItem: artShapeLoader.item; \n\
131− onVisibleChanged: if (visible) scheduleUpdate(); \n\
132− live: false; \n\
133− sourceRect: Qt.rect(0, artShapeLoader.height - overlay.height, artShapeLoader.width, overlay.height); \n\
134− } \n\
135− vertexShader: " \n\
136− uniform highp mat4 qt_Matrix; \n\
137− attribute highp vec4 qt_Vertex; \n\
138− attribute highp vec2 qt_MultiTexCoord0; \n\
139− varying highp vec2 coord; \n\
140− void main() { \n\
141− coord = qt_MultiTexCoord0; \n\
142− gl_Position = qt_Matrix * qt_Vertex; \n\
143− }"; \n\
144− fragmentShader: " \n\
145− varying highp vec2 coord; \n\
146− uniform sampler2D source; \n\
147− uniform lowp float qt_Opacity; \n\
148− uniform highp vec4 overlayColor; \n\
149− void main() { \n\
150− lowp vec4 tex = texture2D(source, coord); \n\
151− gl_FragColor = vec4(overlayColor.r, overlayColor.g, overlayColor.b, 1) * qt_Opacity * overlayColor.a * tex.a; \n\
152− }"; \n\
153 } \n\
128 } \n\
154 }\n';
129 }\n';
155
130
@@ -325,7 +300,7 @@ function cardString(template, components) {
325 id: root; \n\
300 id: root; \n\
326 property var components; \n\
301 property var components; \n\
327 property var cardData; \n\
302 property var cardData; \n\
328− property var artShapeBorderSource: undefined; \n\
303+ property string artShapeStyle: "inset"; \n\
329 property real fontScale: 1.0; \n\
304 property real fontScale: 1.0; \n\
330 property var scopeStyle: null; \n\
305 property var scopeStyle: null; \n\
331 property int titleAlignment: Text.AlignLeft; \n\
306 property int titleAlignment: Text.AlignLeft; \n\
@@ -368,7 +343,6 @@ function cardString(template, components) {
368 }
343 }
369
344
370 if (hasArt) {
345 if (hasArt) {
371− code += 'onArtShapeBorderSourceChanged: { if (artShapeBorderSource !== undefined && artShapeLoader.item) artShapeLoader.item.borderSource = artShapeBorderSource; } \n';
372 code += 'readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1);\n';
346 code += 'readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1);\n';
373
347
374 var widthCode, heightCode;
348 var widthCode, heightCode;
@@ -480,20 +454,20 @@ function cardString(template, components) {
480 }
454 }
481 }
455 }
482
456
483− var summaryColorWithBackground = 'backgroundLoader.active && backgroundLoader.item && root.scopeStyle ? root.scopeStyle.getTextColor(backgroundLoader.item.luminance) : (backgroundLoader.item && backgroundLoader.item.luminance > 0.7 ? Theme.palette.normal.baseText : "white")';
457+ var summaryColorWithBackground = 'backgroundLoader.active && backgroundLoader.item && root.scopeStyle ? root.scopeStyle.getTextColor(backgroundLoader.item.luminance) : (backgroundLoader.item && backgroundLoader.item.luminance > 0.7 ? theme.palette.normal.baseText : "white")';
484
458
485 var hasTitleContainer = hasTitle && (hasEmblem || (hasMascot && (hasSubtitle || hasAttributes)));
459 var hasTitleContainer = hasTitle && (hasEmblem || (hasMascot && (hasSubtitle || hasAttributes)));
486 var titleSubtitleCode = '';
460 var titleSubtitleCode = '';
487 if (hasTitle) {
461 if (hasTitle) {
488 var titleColor;
462 var titleColor;
489 if (headerAsOverlay) {
463 if (headerAsOverlay) {
490− titleColor = 'root.scopeStyle && overlayLoader.item ? root.scopeStyle.getTextColor(overlayLoader.item.luminance) : (overlayLoader.item && overlayLoader.item.luminance > 0.7 ? Theme.palette.normal.baseText : "white")';
464+ titleColor = 'root.scopeStyle && overlayLoader.item ? root.scopeStyle.getTextColor(overlayLoader.item.luminance) : (overlayLoader.item && overlayLoader.item.luminance > 0.7 ? theme.palette.normal.baseText : "white")';
491 } else if (hasSummary) {
465 } else if (hasSummary) {
492 titleColor = 'summary.color';
466 titleColor = 'summary.color';
493 } else if (hasBackground) {
467 } else if (hasBackground) {
494 titleColor = summaryColorWithBackground;
468 titleColor = summaryColorWithBackground;
495 } else {
469 } else {
496− titleColor = 'root.scopeStyle ? root.scopeStyle.foreground : Theme.palette.normal.baseText';
470+ titleColor = 'root.scopeStyle ? root.scopeStyle.foreground : theme.palette.normal.baseText';
497 }
471 }
498
472
499 var titleAnchors;
473 var titleAnchors;
@@ -555,7 +529,7 @@ function cardString(template, components) {
555 titleAnchors += 'left: parent.left; \n\
529 titleAnchors += 'left: parent.left; \n\
556 leftMargin: units.gu(1); \n\
530 leftMargin: units.gu(1); \n\
557 top: overlayLoader.top; \n\
531 top: overlayLoader.top; \n\
558− topMargin: units.gu(1);\n';
532+ topMargin: units.gu(1) + overlayLoader.height - overlayLoader.overlayHeight; \n';
559 } else {
533 } else {
560 // Using anchors to the mascot/parent
534 // Using anchors to the mascot/parent
561 titleAnchors = titleRightAnchor;
535 titleAnchors = titleRightAnchor;
@@ -649,7 +623,7 @@ function cardString(template, components) {
649 if (hasBackground) {
623 if (hasBackground) {
650 summaryColor = summaryColorWithBackground;
624 summaryColor = summaryColorWithBackground;
651 } else {
625 } else {
652− summaryColor = 'root.scopeStyle ? root.scopeStyle.foreground : Theme.palette.normal.baseText';
626+ summaryColor = 'root.scopeStyle ? root.scopeStyle.foreground : theme.palette.normal.baseText';
653 }
627 }
654
628
655 var summaryTopMargin = (hasMascot || hasSubtitle || hasAttributes ? 'anchors.margins' : '0');
629 var summaryTopMargin = (hasMascot || hasSubtitle || hasAttributes ? 'anchors.margins' : '0');
@@ -697,8 +671,8 @@ function cardString(template, components) {
697}
671}
698
672
699function createCardComponent(parent, template, components) {
673function createCardComponent(parent, template, components) {
700− var imports = 'import QtQuick 2.2; \n\
674+ var imports = 'import QtQuick 2.4; \n\
701− import Ubuntu.Components 1.1; \n\
675+ import Ubuntu.Components 1.3; \n\
702 import Ubuntu.Settings.Components 0.1; \n\
676 import Ubuntu.Settings.Components 0.1; \n\
703 import Dash 0.1;\n\
677 import Dash 0.1;\n\
704 import Utils 0.1;\n';
678 import Utils 0.1;\n';
plugins/Dash/CardCreatorCache.qml+1−1
@@ -15,7 +15,7 @@
15 */
15 */
16
16
17pragma Singleton
17pragma Singleton
18−import QtQuick 2.2
18+import QtQuick 2.4
19import "CardCreator.js" as CardCreator
19import "CardCreator.js" as CardCreator
20
20
21QtObject {
21QtObject {
plugins/Dash/CroppedImageMinimumSourceSize.qml+16−5
@@ -1,5 +1,5 @@
1/*
1/*
2− * Copyright (C) 2014 Canonical, Ltd.
2+ * Copyright (C) 2014, 2015 Canonical, Ltd.
3 *
3 *
4 * This program is free software; you can redistribute it and/or modify
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
5 * it under the terms of the GNU General Public License as published by
@@ -14,14 +14,25 @@
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.3
17+import QtQuick 2.4
18
18
19Image {
19Image {
20 id: root
20 id: root
21
21
22 fillMode: Image.PreserveAspectCrop
22 fillMode: Image.PreserveAspectCrop
23
23
24− readonly property real itemAspectRatio: width / height
24+ property bool useHeight: false
25+ function updateUseHeight()
26+ {
27+ // Do not turn into a binding since otherwise the qml
28+ // engine complains about binding loops
25− readonly property real imageAspectRatio: implicitWidth / implicitHeight
29+ useHeight = (implicitWidth / implicitHeight) > (width / height);
30+ }
31+
32+ onHeightChanged: updateUseHeight();
33+ onWidthChanged: updateUseHeight();
34+ onImplicitHeightChanged: updateUseHeight();
35+ onImplicitWidthChanged: updateUseHeight();
36+
26− sourceSize: (imageAspectRatio > itemAspectRatio) ? Qt.size(0, height) : Qt.size(width, 0)
37+ sourceSize: useHeight ? Qt.size(0, height) : Qt.size(width, 0)
27}
38}
plugins/Dash/ScopeStyle.qml+2−2
@@ -14,9 +14,9 @@
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.2
17+import QtQuick 2.4
18import Utils 0.1
18import Utils 0.1
19−import Ubuntu.Components 1.1
19+import Ubuntu.Components 1.3
20
20
21/*! \brief Helper for processing scope customization options.
21/*! \brief Helper for processing scope customization options.
22
22
plugins/Dash/abstractdashview.h−4
@@ -109,11 +109,7 @@ private:
109 virtual void doRelayout() = 0;
109 virtual void doRelayout() = 0;
110 virtual void updateItemCulling(qreal visibleFromY, qreal visibleToY) = 0;
110 virtual void updateItemCulling(qreal visibleFromY, qreal visibleToY) = 0;
111 virtual void calculateImplicitHeight() = 0;
111 virtual void calculateImplicitHeight() = 0;
112−#if (QT_VERSION < QT_VERSION_CHECK(5, 4, 0))
113− virtual void processModelRemoves(const QVector<QQmlChangeSet::Remove> &removes) = 0;
114−#else
115 virtual void processModelRemoves(const QVector<QQmlChangeSet::Change> &removes) = 0;
112 virtual void processModelRemoves(const QVector<QQmlChangeSet::Change> &removes) = 0;
116−#endif
117
113
118 QQmlDelegateModel *m_delegateModel;
114 QQmlDelegateModel *m_delegateModel;
119
115
plugins/Dash/horizontaljournal.cpp−4
@@ -182,11 +182,7 @@ void HorizontalJournal::calculateImplicitHeight()
182 }
182 }
183}
183}
184
184
185−#if (QT_VERSION < QT_VERSION_CHECK(5, 4, 0))
186−void HorizontalJournal::processModelRemoves(const QVector<QQmlChangeSet::Remove> &removes)
187−#else
188void HorizontalJournal::processModelRemoves(const QVector<QQmlChangeSet::Change> &removes)
185void HorizontalJournal::processModelRemoves(const QVector<QQmlChangeSet::Change> &removes)
189−#endif
190{
186{
191 Q_FOREACH(const QQmlChangeSet::Change &remove, removes) {
187 Q_FOREACH(const QQmlChangeSet::Change &remove, removes) {
192 for (int i = remove.count - 1; i >= 0; --i) {
188 for (int i = remove.count - 1; i >= 0; --i) {
plugins/Dash/horizontaljournal.h−4
@@ -52,11 +52,7 @@ private:
52 void calculateImplicitHeight() override;
52 void calculateImplicitHeight() override;
53 void doRelayout() override;
53 void doRelayout() override;
54 void updateItemCulling(qreal visibleFromY, qreal visibleToY) override;
54 void updateItemCulling(qreal visibleFromY, qreal visibleToY) override;
55−#if (QT_VERSION < QT_VERSION_CHECK(5, 4, 0))
56− void processModelRemoves(const QVector<QQmlChangeSet::Remove> &removes) override;
57−#else
58 void processModelRemoves(const QVector<QQmlChangeSet::Change> &removes) override;
55 void processModelRemoves(const QVector<QQmlChangeSet::Change> &removes) override;
59−#endif
60
56
61 int m_firstVisibleIndex;
57 int m_firstVisibleIndex;
62 QList<QQuickItem*> m_visibleItems;
58 QList<QQuickItem*> m_visibleItems;
plugins/Dash/organicgrid.cpp−4
@@ -235,11 +235,7 @@ void OrganicGrid::calculateImplicitHeight()
235 }
235 }
236}
236}
237
237
238−#if (QT_VERSION < QT_VERSION_CHECK(5, 4, 0))
239−void OrganicGrid::processModelRemoves(const QVector<QQmlChangeSet::Remove> &removes)
240−#else
241void OrganicGrid::processModelRemoves(const QVector<QQmlChangeSet::Change> &removes)
238void OrganicGrid::processModelRemoves(const QVector<QQmlChangeSet::Change> &removes)
242−#endif
243{
239{
244 Q_FOREACH(const QQmlChangeSet::Change &remove, removes) {
240 Q_FOREACH(const QQmlChangeSet::Change &remove, removes) {
245 for (int i = remove.count - 1; i >= 0; --i) {
241 for (int i = remove.count - 1; i >= 0; --i) {
plugins/Dash/organicgrid.h−4
@@ -79,11 +79,7 @@ private:
79 void doRelayout() override;
79 void doRelayout() override;
80 void updateItemCulling(qreal visibleFromY, qreal visibleToY) override;
80 void updateItemCulling(qreal visibleFromY, qreal visibleToY) override;
81 void calculateImplicitHeight() override;
81 void calculateImplicitHeight() override;
82−#if (QT_VERSION < QT_VERSION_CHECK(5, 4, 0))
83− void processModelRemoves(const QVector<QQmlChangeSet::Remove> &removes) override;
84−#else
85 void processModelRemoves(const QVector<QQmlChangeSet::Change> &removes) override;
82 void processModelRemoves(const QVector<QQmlChangeSet::Change> &removes) override;
86−#endif
87
83
88 QSizeF m_smallDelegateSize;
84 QSizeF m_smallDelegateSize;
89 QSizeF m_bigDelegateSize;
85 QSizeF m_bigDelegateSize;
plugins/Dash/verticaljournal.cpp−4
@@ -237,11 +237,7 @@ void VerticalJournal::updateItemCulling(qreal visibleFromY, qreal visibleToY)
237 }
237 }
238}
238}
239
239
240−#if (QT_VERSION < QT_VERSION_CHECK(5, 4, 0))
241−void VerticalJournal::processModelRemoves(const QVector<QQmlChangeSet::Remove> &removes)
242−#else
243void VerticalJournal::processModelRemoves(const QVector<QQmlChangeSet::Change> &removes)
240void VerticalJournal::processModelRemoves(const QVector<QQmlChangeSet::Change> &removes)
244−#endif
245{
241{
246 Q_FOREACH(const QQmlChangeSet::Change &remove, removes) {
242 Q_FOREACH(const QQmlChangeSet::Change &remove, removes) {
247 for (int i = remove.count - 1; i >= 0; --i) {
243 for (int i = remove.count - 1; i >= 0; --i) {
plugins/Dash/verticaljournal.h−4
@@ -90,11 +90,7 @@ private:
90 void calculateImplicitHeight() override;
90 void calculateImplicitHeight() override;
91 void doRelayout() override;
91 void doRelayout() override;
92 void updateItemCulling(qreal visibleFromY, qreal visibleToY) override;
92 void updateItemCulling(qreal visibleFromY, qreal visibleToY) override;
93−#if (QT_VERSION < QT_VERSION_CHECK(5, 4, 0))
94− void processModelRemoves(const QVector<QQmlChangeSet::Remove> &removes) override;
95−#else
96 void processModelRemoves(const QVector<QQmlChangeSet::Change> &removes) override;
93 void processModelRemoves(const QVector<QQmlChangeSet::Change> &removes) override;
97−#endif
98
94
99 QVector<QList<ViewItem>> m_columnVisibleItems;
95 QVector<QList<ViewItem>> m_columnVisibleItems;
100 QHash<int, int> m_indexColumnMap;
96 QHash<int, int> m_indexColumnMap;
plugins/Utils/windowkeysfilter.cpp+15−1
@@ -21,7 +21,8 @@
21#include <QQuickWindow>
21#include <QQuickWindow>
22
22
23WindowKeysFilter::WindowKeysFilter(QQuickItem *parent)
23WindowKeysFilter::WindowKeysFilter(QQuickItem *parent)
24− : QQuickItem(parent)
24+ : QQuickItem(parent),
25+ m_currentEventTimestamp(0)
25{
26{
26 connect(this, &QQuickItem::windowChanged,
27 connect(this, &QQuickItem::windowChanged,
27 this, &WindowKeysFilter::setupFilterOnWindow);
28 this, &WindowKeysFilter::setupFilterOnWindow);
@@ -36,7 +37,15 @@ bool WindowKeysFilter::eventFilter(QObject *watched, QEvent *event)
36 if (event->type() == QEvent::KeyPress || event->type() == QEvent::KeyRelease) {
37 if (event->type() == QEvent::KeyPress || event->type() == QEvent::KeyRelease) {
37 // Let QML see this event and decide if it does not want it
38 // Let QML see this event and decide if it does not want it
38 event->accept();
39 event->accept();
40+
41+ m_currentEventTimestamp = static_cast<QInputEvent*>(event)->timestamp();
42+ Q_EMIT currentEventTimestampChanged();
43+
39 QCoreApplication::sendEvent(this, event);
44 QCoreApplication::sendEvent(this, event);
45+
46+ m_currentEventTimestamp = 0;
47+ Q_EMIT currentEventTimestampChanged();
48+
40 return event->isAccepted();
49 return event->isAccepted();
41 } else {
50 } else {
42 // Not interested
51 // Not interested
@@ -56,3 +65,8 @@ void WindowKeysFilter::setupFilterOnWindow(QQuickWindow *window)
56 m_filteredWindow = window;
65 m_filteredWindow = window;
57 }
66 }
58}
67}
68+
69+ulong WindowKeysFilter::currentEventTimestamp() const
70+{
71+ return m_currentEventTimestamp;
72+}
plugins/Utils/windowkeysfilter.h+7
@@ -36,16 +36,23 @@
36class WindowKeysFilter : public QQuickItem
36class WindowKeysFilter : public QQuickItem
37{
37{
38 Q_OBJECT
38 Q_OBJECT
39+ Q_PROPERTY(ulong currentEventTimestamp READ currentEventTimestamp NOTIFY currentEventTimestampChanged)
39public:
40public:
40 WindowKeysFilter(QQuickItem *parent = 0);
41 WindowKeysFilter(QQuickItem *parent = 0);
41
42
42 bool eventFilter(QObject *watched, QEvent *event) override;
43 bool eventFilter(QObject *watched, QEvent *event) override;
43
44
45+ ulong currentEventTimestamp() const;
46+
47+Q_SIGNALS:
48+ void currentEventTimestampChanged();
49+
44private Q_SLOTS:
50private Q_SLOTS:
45 void setupFilterOnWindow(QQuickWindow *window);
51 void setupFilterOnWindow(QQuickWindow *window);
46
52
47private:
53private:
48 QPointer<QQuickWindow> m_filteredWindow;
54 QPointer<QQuickWindow> m_filteredWindow;
55+ ulong m_currentEventTimestamp;
49};
56};
50
57
51#endif // UNITY_WINDOWKEYSFILTER_H
58#endif // UNITY_WINDOWKEYSFILTER_H
po/ug.po+2−2
@@ -15,8 +15,8 @@ msgstr ""
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=1; plural=0;\n"
17"Plural-Forms: nplurals=1; plural=0;\n"
18−"X-Launchpad-Export-Date: 2015-10-26 05:24+0000\n"
18+"X-Launchpad-Export-Date: 2015-10-28 05:39+0000\n"
19−"X-Generator: Launchpad (build 17812)\n"
19+"X-Generator: Launchpad (build 17833)\n"
20
20
21#: plugins/IntegratedLightDM/Greeter.cpp:112
21#: plugins/IntegratedLightDM/Greeter.cpp:112
22msgid "Password: "
22msgid "Password: "
po/unity8.pot+53−49
@@ -8,7 +8,7 @@ msgid ""
8msgstr ""
8msgstr ""
9"Project-Id-Version: unity8\n"
9"Project-Id-Version: unity8\n"
10"Report-Msgid-Bugs-To: \n"
10"Report-Msgid-Bugs-To: \n"
11−"POT-Creation-Date: 2015-09-16 00:49+0200\n"
11+"POT-Creation-Date: 2015-10-19 14:34+0100\n"
12"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
12"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14"Language-Team: LANGUAGE <LL@li.org>\n"
14"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -69,8 +69,8 @@ msgstr ""
69#. Translators, please edit/rearrange these strftime(3) tokens to suit your locale!
69#. Translators, please edit/rearrange these strftime(3) tokens to suit your locale!
70#. This format string is used for showing, on a 12-hour clock, times that happened before a week from now.
70#. This format string is used for showing, on a 12-hour clock, times that happened before a week from now.
71#. (\u2003 is a unicode em space which is slightly wider than a normal space.)
71#. (\u2003 is a unicode em space which is slightly wider than a normal space.)
72−#. en_US example: "%a %d %b\u2003%l:%M %p" --> "Fri Oct 31 1:00 PM"
72+#. en_US example: "%a %b %d\u2003%l:%M %p" --> "Fri Oct 31 1:00 PM"
73−#. en_GB example: "%a %b %d\u2003%l:%M %p" --> "Fri 31 Oct 1:00 PM"
73+#. en_GB example: "%a %d %b\u2003%l:%M %p" --> "Fri 31 Oct 1:00 PM"
74#: plugins/Utils/relativetimeformatter.cpp:190
74#: plugins/Utils/relativetimeformatter.cpp:190
75msgid "%a %d %b %l:%M %p"
75msgid "%a %d %b %l:%M %p"
76msgstr ""
76msgstr ""
@@ -109,8 +109,8 @@ msgstr ""
109#. Translators, please edit/rearrange these strftime(3) tokens to suit your locale!
109#. Translators, please edit/rearrange these strftime(3) tokens to suit your locale!
110#. This format string is used for showing, on a 24-hour clock, times that happened before a week from now.
110#. This format string is used for showing, on a 24-hour clock, times that happened before a week from now.
111#. (\u2003 is a unicode em space which is slightly wider than a normal space.)
111#. (\u2003 is a unicode em space which is slightly wider than a normal space.)
112−#. en_US example: "%a %d %b\u2003%H:%M" --> "Fri Oct 31 13:00"
112+#. en_US example: "%a %b %d\u2003%H:%M" --> "Fri Oct 31 13:00"
113−#. en_GB example: "%a %b %d\u2003%H:%M" --> "Fri 31 Oct 13:00"
113+#. en_GB example: "%a %d %b\u2003%H:%M" --> "Fri 31 Oct 13:00"
114#: plugins/Utils/relativetimeformatter.cpp:234
114#: plugins/Utils/relativetimeformatter.cpp:234
115msgid "%a %d %b %H:%M"
115msgid "%a %d %b %H:%M"
116msgstr ""
116msgstr ""
@@ -286,6 +286,10 @@ msgstr ""
286msgid "Add a review"
286msgid "Add a review"
287msgstr ""
287msgstr ""
288
288
289+#: qml/Dash/Previews/PreviewSharing.qml:51
290+msgid "Preview Share Item"
291+msgstr ""
292+
289#: qml/Dash/PullToRefreshScopeStyle.qml:55
293#: qml/Dash/PullToRefreshScopeStyle.qml:55
290msgid "Pull to refresh…"
294msgid "Pull to refresh…"
291msgstr ""
295msgstr ""
@@ -389,62 +393,62 @@ msgstr ""
389msgid "Conference"
393msgid "Conference"
390msgstr ""
394msgstr ""
391
395
392−#: qml/Panel/Indicators/MenuItemFactory.qml:718
396+#: qml/Panel/Indicators/MenuItemFactory.qml:727
393msgid "Nothing is playing"
397msgid "Nothing is playing"
394msgstr ""
398msgstr ""
395
399
396−#: qml/Panel/Indicators/MenuItemFactory.qml:847
400+#: qml/Panel/Indicators/MenuItemFactory.qml:856
397#, qt-format
401#, qt-format
398msgid "%1 hour"
402msgid "%1 hour"
399msgid_plural "%1 hours"
403msgid_plural "%1 hours"
400msgstr[0] ""
404msgstr[0] ""
401msgstr[1] ""
405msgstr[1] ""
402
406
403−#: qml/Panel/Indicators/MenuItemFactory.qml:851
407+#: qml/Panel/Indicators/MenuItemFactory.qml:860
404#, qt-format
408#, qt-format
405msgid "%1 minute"
409msgid "%1 minute"
406msgid_plural "%1 minutes"
410msgid_plural "%1 minutes"
407msgstr[0] ""
411msgstr[0] ""
408msgstr[1] ""
412msgstr[1] ""
409
413
410−#: qml/Panel/Indicators/MenuItemFactory.qml:856
414+#: qml/Panel/Indicators/MenuItemFactory.qml:865
411#, qt-format
415#, qt-format
412msgid "%1 second"
416msgid "%1 second"
413msgid_plural "%1 seconds"
417msgid_plural "%1 seconds"
414msgstr[0] ""
418msgstr[0] ""
415msgstr[1] ""
419msgstr[1] ""
416
420
417−#: qml/Panel/Indicators/MenuItemFactory.qml:859
421+#: qml/Panel/Indicators/MenuItemFactory.qml:868
418msgid "0 seconds"
422msgid "0 seconds"
419msgstr ""
423msgstr ""
420
424
421#. Translators: String like "1 hour, 2 minutes, 3 seconds remaining"
425#. Translators: String like "1 hour, 2 minutes, 3 seconds remaining"
422−#: qml/Panel/Indicators/MenuItemFactory.qml:861
426+#: qml/Panel/Indicators/MenuItemFactory.qml:870
423#, qt-format
427#, qt-format
424msgid "%1 remaining"
428msgid "%1 remaining"
425msgstr ""
429msgstr ""
426
430
427−#: qml/Panel/Indicators/MenuItemFactory.qml:867
431+#: qml/Panel/Indicators/MenuItemFactory.qml:876
428msgid "In queue…"
432msgid "In queue…"
429msgstr ""
433msgstr ""
430
434
431−#: qml/Panel/Indicators/MenuItemFactory.qml:871
435+#: qml/Panel/Indicators/MenuItemFactory.qml:880
432msgid "Downloading"
436msgid "Downloading"
433msgstr ""
437msgstr ""
434
438
435−#: qml/Panel/Indicators/MenuItemFactory.qml:873
439+#: qml/Panel/Indicators/MenuItemFactory.qml:882
436msgid "Paused, tap to resume"
440msgid "Paused, tap to resume"
437msgstr ""
441msgstr ""
438
442
439−#: qml/Panel/Indicators/MenuItemFactory.qml:875
443+#: qml/Panel/Indicators/MenuItemFactory.qml:884
440msgid "Canceled"
444msgid "Canceled"
441msgstr ""
445msgstr ""
442
446
443−#: qml/Panel/Indicators/MenuItemFactory.qml:877
447+#: qml/Panel/Indicators/MenuItemFactory.qml:886
444msgid "Finished"
448msgid "Finished"
445msgstr ""
449msgstr ""
446
450
447−#: qml/Panel/Indicators/MenuItemFactory.qml:879
451+#: qml/Panel/Indicators/MenuItemFactory.qml:888
448msgid "Failed, tap to retry"
452msgid "Failed, tap to retry"
449msgstr ""
453msgstr ""
450
454
@@ -523,38 +527,6 @@ msgctxt "Button: Go back one page in the Wizard"
523msgid "Back"
527msgid "Back"
524msgstr ""
528msgstr ""
525
529
526−#: qml/Wizard/Pages/here-terms.qml:27
527−msgid "Terms & Conditions"
528−msgstr ""
529−
530−#: qml/Wizard/Pages/passwd-confirm.qml:49
531−msgid "Confirm passphrase"
532−msgstr ""
533−
534−#: qml/Wizard/Pages/passwd-confirm.qml:50
535−msgid "Confirm passcode"
536−msgstr ""
537−
538−#: qml/Wizard/Pages/passwd-confirm.qml:53
539−#: qml/Wizard/Pages/passwd-confirm.qml:54
540−msgid "Please try again."
541−msgstr ""
542−
543−#: qml/Wizard/Pages/passwd-confirm.qml:82 qml/Wizard/Pages/passwd-set.qml:90
544−#: qml/Wizard/Pages/10-welcome.qml:88 qml/Wizard/Pages/30-passwd-type.qml:128
545−#: qml/Wizard/Pages/40-wifi.qml:215 qml/Wizard/Pages/50-location.qml:131
546−#: qml/Wizard/Pages/60-reporting.qml:50
547−msgid "Continue"
548−msgstr ""
549−
550−#: qml/Wizard/Pages/passwd-set.qml:61
551−msgid "Choose your passcode"
552−msgstr ""
553−
554−#: qml/Wizard/Pages/passwd-set.qml:68
555−msgid "Passphrase must be 4 characters long"
556−msgstr ""
557−
558#: qml/Wizard/Pages/10-welcome.qml:27
530#: qml/Wizard/Pages/10-welcome.qml:27
559msgid "Hi!"
531msgid "Hi!"
560msgstr ""
532msgstr ""
@@ -567,6 +539,13 @@ msgstr ""
567msgid "Let’s get started."
539msgid "Let’s get started."
568msgstr ""
540msgstr ""
569
541
542+#: qml/Wizard/Pages/10-welcome.qml:88 qml/Wizard/Pages/30-passwd-type.qml:128
543+#: qml/Wizard/Pages/40-wifi.qml:215 qml/Wizard/Pages/50-location.qml:131
544+#: qml/Wizard/Pages/60-reporting.qml:50 qml/Wizard/Pages/passwd-confirm.qml:82
545+#: qml/Wizard/Pages/passwd-set.qml:90
546+msgid "Continue"
547+msgstr ""
548+
570#: qml/Wizard/Pages/20-sim.qml:25
549#: qml/Wizard/Pages/20-sim.qml:25
571msgid "Add a SIM card and restart your device"
550msgid "Add a SIM card and restart your device"
572msgstr ""
551msgstr ""
@@ -692,6 +671,31 @@ msgstr ""
692msgid "Finish"
671msgid "Finish"
693msgstr ""
672msgstr ""
694
673
674+#: qml/Wizard/Pages/here-terms.qml:27
675+msgid "Terms & Conditions"
676+msgstr ""
677+
678+#: qml/Wizard/Pages/passwd-confirm.qml:49
679+msgid "Confirm passphrase"
680+msgstr ""
681+
682+#: qml/Wizard/Pages/passwd-confirm.qml:50
683+msgid "Confirm passcode"
684+msgstr ""
685+
686+#: qml/Wizard/Pages/passwd-confirm.qml:53
687+#: qml/Wizard/Pages/passwd-confirm.qml:54
688+msgid "Please try again."
689+msgstr ""
690+
691+#: qml/Wizard/Pages/passwd-set.qml:61
692+msgid "Choose your passcode"
693+msgstr ""
694+
695+#: qml/Wizard/Pages/passwd-set.qml:68
696+msgid "Passphrase must be 4 characters long"
697+msgstr ""
698+
695#. Translators: This is the arrow for "Back" buttons
699#. Translators: This is the arrow for "Back" buttons
696#: qml/Wizard/StackButton.qml:39
700#: qml/Wizard/StackButton.qml:39
697#, qt-format
701#, qt-format
po/wo.ponew file+800
@@ -0,0 +1,800 @@
1+# Wolof translation for unity8
2+# Copyright (c) 2015 Rosetta Contributors and Canonical Ltd 2015
3+# This file is distributed under the same license as the unity8 package.
4+# FIRST AUTHOR <EMAIL@ADDRESS>, 2015.
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: 2015-09-16 00:49+0200\n"
11+"PO-Revision-Date: 2015-10-29 11:16+0000\n"
12+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13+"Language-Team: Wolof <wo@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=2; plural=n > 1;\n"
18+"X-Launchpad-Export-Date: 2015-10-30 05:32+0000\n"
19+"X-Generator: Launchpad (build 17838)\n"
20+
21+#: plugins/IntegratedLightDM/Greeter.cpp:112
22+msgid "Password: "
23+msgstr "Baatu-jàll "
24+
25+#: plugins/Unity/Launcher/launcheritem.cpp:47
26+#: plugins/Unity/Launcher/launcheritem.cpp:106
27+msgid "Pin shortcut"
28+msgstr "Kepp"
29+
30+#: plugins/Unity/Launcher/launcheritem.cpp:52
31+msgid "Quit"
32+msgstr "Génn"
33+
34+#: plugins/Unity/Launcher/launcheritem.cpp:106
35+msgid "Unpin shortcut"
36+msgstr "Dindi"
37+
38+#. Translators, please edit/rearrange these strftime(3) tokens to suit your locale!
39+#. This format string is used for showing, on a 12-hour clock, times that happen yesterday.
40+#. (\u2003 is a unicode em space which is slightly wider than a normal space.)
41+#. en_US example: "Yesterday\u2003%l:%M %p" --> "Yesterday 1:00 PM"
42+#: plugins/Utils/relativetimeformatter.cpp:157
43+msgid "Yesterday %l:%M %p"
44+msgstr "Démb %l:%M %p"
45+
46+#. Translators, please edit/rearrange these strftime(3) tokens to suit your locale!
47+#. This format string is used for showing, on a 12-hour clock, times that happened today.
48+#. en_US example: "%l:%M %p" --> "1:00 PM"
49+#: plugins/Utils/relativetimeformatter.cpp:164
50+msgid "%l:%M %p"
51+msgstr "%l:%M %p"
52+
53+#. Translators, please edit/rearrange these strftime(3) tokens to suit your locale!
54+#. This format string is used for showing, on a 12-hour clock, events/appointments that happen tomorrow.
55+#. (\u2003 is a unicode em space which is slightly wider than a normal space.)
56+#. en_US example: "Tomorrow\u2003%l:%M %p" --> "Tomorrow 1:00 PM"
57+#: plugins/Utils/relativetimeformatter.cpp:172
58+msgid "Tomorrow %l:%M %p"
59+msgstr "Suba ci %l:%M %p"
60+
61+#. Translators, please edit/rearrange these strftime(3) tokens to suit your locale!
62+#. This format string is used for showing, on a 12-hour clock, times that happened in the last week.
63+#. (\u2003 is a unicode em space which is slightly wider than a normal space.)
64+#. en_US example: "%a\u2003%l:%M %p" --> "Fri 1:00 PM"
65+#: plugins/Utils/relativetimeformatter.cpp:181
66+msgid "%a %l:%M %p"
67+msgstr "%a ci %l:%M %p"
68+
69+#. Translators, please edit/rearrange these strftime(3) tokens to suit your locale!
70+#. This format string is used for showing, on a 12-hour clock, times that happened before a week from now.
71+#. (\u2003 is a unicode em space which is slightly wider than a normal space.)
72+#. en_US example: "%a %d %b\u2003%l:%M %p" --> "Fri Oct 31 1:00 PM"
73+#. en_GB example: "%a %b %d\u2003%l:%M %p" --> "Fri 31 Oct 1:00 PM"
74+#: plugins/Utils/relativetimeformatter.cpp:190
75+msgid "%a %d %b %l:%M %p"
76+msgstr "%a %b %d ci %l:%M %p"
77+
78+#. Translators, please edit/rearrange these strftime(3) tokens to suit your locale!
79+#. This format string is used for showing, on a 24-hour clock, times that happen yesterday.
80+#. (\u2003 is a unicode em space which is slightly wider than a normal space.)
81+#. en_US example: "Yesterday\u2003%l:%M %p" --> "Yesterday 13:00"
82+#: plugins/Utils/relativetimeformatter.cpp:201
83+msgid "Yesterday %H:%M"
84+msgstr "Démb %H:%M"
85+
86+#. Translators, please edit/rearrange these strftime(3) tokens to suit your locale!
87+#. This format string is used for showing, on a 24-hour clock, times that happened today.
88+#. en_US example: "%H:%M" --> "13:00"
89+#: plugins/Utils/relativetimeformatter.cpp:208
90+msgid "%H:%M"
91+msgstr "%H:%M"
92+
93+#. Translators, please edit/rearrange these strftime(3) tokens to suit your locale!
94+#. This format string is used for showing, on a 24-hour clock, events/appointments that happen tomorrow.
95+#. (\u2003 is a unicode em space which is slightly wider than a normal space.)
96+#. en_US example: "Tomorrow\u2003%l:%M %p" --> "Tomorrow 13:00"
97+#: plugins/Utils/relativetimeformatter.cpp:216
98+msgid "Tomorrow %H:%M"
99+msgstr "Suba ci %H:%M"
100+
101+#. Translators, please edit/rearrange these strftime(3) tokens to suit your locale!
102+#. This format string is used for showing, on a 24-hour clock, times that happened in the last week.
103+#. (\u2003 is a unicode em space which is slightly wider than a normal space.)
104+#. en_US example: "%a\u2003%H:%M" --> "Fri 13:00"
105+#: plugins/Utils/relativetimeformatter.cpp:225
106+msgid "%a %H:%M"
107+msgstr "%a ci %H:%M"
108+
109+#. Translators, please edit/rearrange these strftime(3) tokens to suit your locale!
110+#. This format string is used for showing, on a 24-hour clock, times that happened before a week from now.
111+#. (\u2003 is a unicode em space which is slightly wider than a normal space.)
112+#. en_US example: "%a %d %b\u2003%H:%M" --> "Fri Oct 31 13:00"
113+#. en_GB example: "%a %b %d\u2003%H:%M" --> "Fri 31 Oct 13:00"
114+#: plugins/Utils/relativetimeformatter.cpp:234
115+msgid "%a %d %b %H:%M"
116+msgstr "%a %b %d ci %H:%M"
117+
118+#: qml/Components/DelayedLockscreen.qml:49
119+msgid "Device Locked"
120+msgstr "Téye nañ jumtukaay"
121+
122+#: qml/Components/DelayedLockscreen.qml:64
123+msgid "You have been locked out due to too many failed passphrase attempts."
124+msgstr "Téye nañ la ndax danga duggal ay yoon kàddu-jàll bu baaxul."
125+
126+#: qml/Components/DelayedLockscreen.qml:65
127+msgid "You have been locked out due to too many failed passcode attempts."
128+msgstr "Téye nañ la ndax danga duggal ay yoon kàddu-jàll bu baaxul."
129+
130+#: qml/Components/DelayedLockscreen.qml:74
131+#, qt-format
132+msgid "Please wait %1 minute and then try again…"
133+msgid_plural "Please wait %1 minutes and then try again…"
134+msgstr[0] "Dila ñaan nga xaar %1 simili te jéemaat..."
135+msgstr[1] "Dila ñaan nga xaar %1 simili te jéemaat..."
136+
137+#: qml/Components/Dialogs.qml:115
138+msgctxt "Title: Lock/Log out dialog"
139+msgid "Log out"
140+msgstr "Génn"
141+
142+#: qml/Components/Dialogs.qml:116
143+msgid "Are you sure you want to log out?"
144+msgstr "Wóor na ne danga bëgg a génn?"
145+
146+#: qml/Components/Dialogs.qml:118
147+msgctxt "Button: Lock the system"
148+msgid "Lock"
149+msgstr "Tëj"
150+
151+#: qml/Components/Dialogs.qml:125
152+msgctxt "Button: Log out from the system"
153+msgid "Log Out"
154+msgstr "Génn"
155+
156+#: qml/Components/Dialogs.qml:132 qml/Components/Dialogs.qml:165
157+#: qml/Components/Dialogs.qml:224
158+msgid "Cancel"
159+msgstr "Neenal"
160+
161+#: qml/Components/Dialogs.qml:144
162+msgctxt "Title: Reboot/Shut down dialog"
163+msgid "Shut down"
164+msgstr "Fay"
165+
166+#: qml/Components/Dialogs.qml:145
167+msgid "Are you sure you want to shut down?"
168+msgstr "Wóor na ne danga bëgg a fay?"
169+
170+#: qml/Components/Dialogs.qml:147
171+msgctxt "Button: Reboot the system"
172+msgid "Reboot"
173+msgstr "Fay-taalaat"
174+
175+#: qml/Components/Dialogs.qml:156
176+msgctxt "Button: Shut down the system"
177+msgid "Shut down"
178+msgstr "Fay"
179+
180+#: qml/Components/Dialogs.qml:178
181+msgctxt "Title: Reboot dialog"
182+msgid "Reboot"
183+msgstr "Fay-taalaat"
184+
185+#: qml/Components/Dialogs.qml:179
186+msgid "Are you sure you want to reboot?"
187+msgstr "Wóor na ne danga bëgg a fay-taalaat?"
188+
189+#: qml/Components/Dialogs.qml:181
190+msgid "No"
191+msgstr "Déet"
192+
193+#: qml/Components/Dialogs.qml:188
194+msgid "Yes"
195+msgstr "Waaw"
196+
197+#: qml/Components/Dialogs.qml:203
198+msgctxt "Title: Power off/Restart dialog"
199+msgid "Power"
200+msgstr "Fay"
201+
202+#: qml/Components/Dialogs.qml:204
203+msgid ""
204+"Are you sure you would like\n"
205+"to power off?"
206+msgstr "Wóor na ne danga bëgg a fay?"
207+
208+#: qml/Components/Dialogs.qml:206
209+msgctxt "Button: Power off the system"
210+msgid "Power off"
211+msgstr "Fay"
212+
213+#: qml/Components/Dialogs.qml:215
214+msgctxt "Button: Restart the system"
215+msgid "Restart"
216+msgstr "Fay-taalaat"
217+
218+#: qml/Components/Lockscreen.qml:245
219+msgid "Return to Call"
220+msgstr "Dellu ci woote bi"
221+
222+#: qml/Components/Lockscreen.qml:245
223+msgid "Emergency Call"
224+msgstr "Wooteb wallu"
225+
226+#: qml/Components/Lockscreen.qml:277
227+msgid "OK"
228+msgstr "OK"
229+
230+#: qml/Dash/GenericScopeView.qml:569 qml/Dash/GenericScopeView.qml:727
231+msgid "See less"
232+msgstr "Gis lu néew"
233+
234+#: qml/Dash/GenericScopeView.qml:569
235+msgid "See all"
236+msgstr "Gis lépp"
237+
238+#: qml/Dash/GenericScopeView.qml:631
239+msgctxt "Label: Hint for dash search line edit"
240+msgid "Search"
241+msgstr "Seet"
242+
243+#: qml/Dash/PageHeader.qml:269
244+msgctxt "Button: Open the Ubuntu Store"
245+msgid "Store"
246+msgstr "Ja"
247+
248+#: qml/Dash/PageHeader.qml:276
249+msgctxt "Button: Start a search in the current dash scope"
250+msgid "Search"
251+msgstr "Seet"
252+
253+#: qml/Dash/PageHeader.qml:286
254+msgctxt "Button: Show the current dash scope settings"
255+msgid "Settings"
256+msgstr "Jekkal"
257+
258+#: qml/Dash/PageHeader.qml:293
259+msgid "Remove from Favorites"
260+msgstr "Dindee ci Tànneef yi"
261+
262+#: qml/Dash/PageHeader.qml:293
263+msgid "Add to Favorites"
264+msgstr "Yokk ci Tànneef yi"
265+
266+#: qml/Dash/Previews/PreviewActionCombo.qml:35
267+msgid "More..."
268+msgstr "Leneen..."
269+
270+#: qml/Dash/Previews/PreviewActionCombo.qml:35
271+msgid "Less..."
272+msgstr "Wàññi..."
273+
274+#: qml/Dash/Previews/PreviewCommentInput.qml:68
275+#: qml/Dash/Previews/PreviewRatingInput.qml:174
276+#: qml/Panel/Indicators/MessageMenuItemFactory.qml:148
277+#: qml/Panel/Indicators/MessageMenuItemFactory.qml:205
278+msgid "Send"
279+msgstr "Yónnee"
280+
281+#: qml/Dash/Previews/PreviewRatingInput.qml:84
282+msgid "Rate this"
283+msgstr "Xayma ko"
284+
285+#: qml/Dash/Previews/PreviewRatingInput.qml:129
286+msgid "Add a review"
287+msgstr "Yokk sa xalaat"
288+
289+#: qml/Dash/PullToRefreshScopeStyle.qml:55
290+msgid "Pull to refresh…"
291+msgstr "Xëcc ngir yeesal..."
292+
293+#: qml/Dash/PullToRefreshScopeStyle.qml:60
294+msgid "Release to refresh…"
295+msgstr "Bàyyi ngir yeesal..."
296+
297+#: qml/Dash/ScopeSettings/ScopeSettingBoolean.qml:43
298+msgid "Enable location data"
299+msgstr "Doxal njoxey barab"
300+
301+#: qml/Dash/ScopesList.qml:67
302+msgid "Manage"
303+msgstr "Yor"
304+
305+#: qml/Dash/ScopesList.qml:113
306+msgid "Home"
307+msgstr "Njëlbeen"
308+
309+#: qml/Dash/ScopesList.qml:114
310+msgid "Also installed"
311+msgstr "Yiñ samp tamit"
312+
313+#: qml/Greeter/CoverPage.qml:107
314+msgid "Unlock"
315+msgstr "Ubbi"
316+
317+#: qml/Greeter/LoginList.qml:236
318+msgid "Retry"
319+msgstr "Jéemaat"
320+
321+#: qml/Greeter/LoginList.qml:237
322+msgid "Tap to unlock"
323+msgstr "Bësal ngir ubbi"
324+
325+#: qml/Greeter/NarrowView.qml:54 qml/Wizard/Pages/passwd-confirm.qml:53
326+msgid "Sorry, incorrect passphrase."
327+msgstr "Jéggalu, kàddu-jàll gi baaxul."
328+
329+#: qml/Greeter/NarrowView.qml:55 qml/Wizard/Pages/passwd-confirm.qml:54
330+msgid "Sorry, incorrect passcode."
331+msgstr "Jéggalu, baatu-jàll bi baaxul"
332+
333+#: qml/Greeter/NarrowView.qml:56
334+msgid "This will be your last attempt."
335+msgstr "Bii mooy sa jéem bu mujj."
336+
337+#: qml/Greeter/NarrowView.qml:58
338+msgid ""
339+"If passphrase is entered incorrectly, your phone will conduct a factory "
340+"reset and all personal data will be deleted."
341+msgstr ""
342+"Su kàddu-jàll gi dugg baaxul, sa wootekaay di nañ ko delloo nimu meloon ci "
343+"defaram te sa bépp njoxe di nañ ko far."
344+
345+#: qml/Greeter/NarrowView.qml:59
346+msgid ""
347+"If passcode is entered incorrectly, your phone will conduct a factory reset "
348+"and all personal data will be deleted."
349+msgstr ""
350+"Su baatu-jàll bi dugg baaxul, sa wootekaay di nañ ko delloo nimu meloon ci "
351+"defaram te sa bépp njoxe di nañ ko far."
352+
353+#: qml/Greeter/NarrowView.qml:116
354+#, qt-format
355+msgid "Enter %1"
356+msgstr "Bindal %1"
357+
358+#: qml/Greeter/NarrowView.qml:117 qml/Wizard/Pages/passwd-set.qml:60
359+msgid "Enter passphrase"
360+msgstr "Duggal kàddu-jàll"
361+
362+#: qml/Greeter/NarrowView.qml:118
363+msgid "Enter passcode"
364+msgstr "Duggal baatu-jàll"
365+
366+#: qml/Greeter/NarrowView.qml:119
367+#, qt-format
368+msgid "Sorry, incorrect %1"
369+msgstr "Jéggalu, %1 baaxul"
370+
371+#: qml/Greeter/NarrowView.qml:120
372+msgid "Sorry, incorrect passphrase"
373+msgstr "Jéggalu, kàddu-jàll gi baaxul"
374+
375+#: qml/Greeter/NarrowView.qml:121
376+msgctxt "passphrase"
377+msgid "Please re-enter"
378+msgstr "Di la ñaan nga duggalaat"
379+
380+#: qml/Greeter/NarrowView.qml:122
381+msgid "Sorry, incorrect passcode"
382+msgstr "Jéggalu, baatu-jàll bi baaxul"
383+
384+#: qml/Notifications/NotificationMenuItemFactory.qml:128
385+msgid "Show password"
386+msgstr "Wone baatu-jàll"
387+
388+#: qml/Panel/ActiveCallHint.qml:79
389+msgid "Tap to return to call..."
390+msgstr "Bësal ngir dello ci woote bi..."
391+
392+#: qml/Panel/ActiveCallHint.qml:92
393+msgid "Conference"
394+msgstr "Wax ci kaw"
395+
396+#: qml/Panel/Indicators/MenuItemFactory.qml:718
397+msgid "Nothing is playing"
398+msgstr "Dara dawul"
399+
400+#: qml/Panel/Indicators/MenuItemFactory.qml:847
401+#, qt-format
402+msgid "%1 hour"
403+msgid_plural "%1 hours"
404+msgstr[0] "%1 waxtu"
405+msgstr[1] "%1 waxtu"
406+
407+#: qml/Panel/Indicators/MenuItemFactory.qml:851
408+#, qt-format
409+msgid "%1 minute"
410+msgid_plural "%1 minutes"
411+msgstr[0] "%1 simili"
412+msgstr[1] "%1 simili"
413+
414+#: qml/Panel/Indicators/MenuItemFactory.qml:856
415+#, qt-format
416+msgid "%1 second"
417+msgid_plural "%1 seconds"
418+msgstr[0] "%1 saa"
419+msgstr[1] "%1 saa"
420+
421+#: qml/Panel/Indicators/MenuItemFactory.qml:859
422+msgid "0 seconds"
423+msgstr "0 saa"
424+
425+#. Translators: String like "1 hour, 2 minutes, 3 seconds remaining"
426+#: qml/Panel/Indicators/MenuItemFactory.qml:861
427+#, qt-format
428+msgid "%1 remaining"
429+msgstr "%1 moo des"
430+
431+#: qml/Panel/Indicators/MenuItemFactory.qml:867
432+msgid "In queue…"
433+msgstr "ci xaaruwaay bi..."
434+
435+#: qml/Panel/Indicators/MenuItemFactory.qml:871
436+msgid "Downloading"
437+msgstr "Yebbi"
438+
439+#: qml/Panel/Indicators/MenuItemFactory.qml:873
440+msgid "Paused, tap to resume"
441+msgstr "Dafa taxaw, bësal ngir tàmbaliwaat"
442+
443+#: qml/Panel/Indicators/MenuItemFactory.qml:875
444+msgid "Canceled"
445+msgstr "Neenalees"
446+
447+#: qml/Panel/Indicators/MenuItemFactory.qml:877
448+msgid "Finished"
449+msgstr "Jeexalees"
450+
451+#: qml/Panel/Indicators/MenuItemFactory.qml:879
452+msgid "Failed, tap to retry"
453+msgstr "Antoodi, bësal ngir jéemaat"
454+
455+#: qml/Panel/Indicators/MessageMenuItemFactory.qml:149
456+msgctxt "Label: Hint in message indicator line edit"
457+msgid "Reply"
458+msgstr "Wuyu"
459+
460+#: qml/Panel/Indicators/MessageMenuItemFactory.qml:204
461+msgid "Call back"
462+msgstr "wootewaat"
463+
464+#: qml/Panel/Indicators/ModemInfoItem.qml:105
465+msgid "Unlock SIM"
466+msgstr "Tijji SIM"
467+
468+#: qml/Panel/Indicators/RoamingIndication.qml:27
469+msgid "Roaming"
470+msgstr "Roaming"
471+
472+#: qml/Tutorial/TutorialBottomFinish.qml:24
473+msgid "This action does different things for different apps"
474+msgstr "Jii jëf dafay defal mbir yu wuute jëfekaay yu wuute"
475+
476+#: qml/Tutorial/TutorialBottomFinish.qml:25
477+msgid "Tap here to finish."
478+msgstr "Bësal fii ngir Feexal."
479+
480+#: qml/Tutorial/TutorialBottom.qml:28
481+msgid "Open special menus"
482+msgstr "Open njëli jagleel"
483+
484+#: qml/Tutorial/TutorialBottom.qml:29
485+msgid "Swipe up from the bottom edge."
486+msgstr "Diri tambalee ci cat bu suuf bi."
487+
488+#: qml/Tutorial/TutorialContent.qml:80 qml/Tutorial/TutorialLeftFinish.qml:25
489+#: qml/Tutorial/TutorialRight.qml:144
490+msgid "Tap here to continue."
491+msgstr "Bësal fii ngir wéy."
492+
493+#: qml/Tutorial/TutorialLeftFinish.qml:24
494+msgid "These are the shortcuts to favorite apps"
495+msgstr "Yii ñall ñooy yóbbe ci jëfekaay yi nga taamu"
496+
497+#: qml/Tutorial/TutorialLeft.qml:26
498+msgid "Open the launcher"
499+msgstr "Ubbi Ubbikaay bi"
500+
501+#: qml/Tutorial/TutorialLeft.qml:27
502+msgid "Short swipe from the left edge."
503+msgstr "Diri bu gàtt tambalee ci cat bu cammoñ bi"
504+
505+#: qml/Tutorial/TutorialPage.qml:178
506+msgid "You almost got it!"
507+msgstr "Léegi mu jeex"
508+
509+#: qml/Tutorial/TutorialPage.qml:195
510+msgid "Try again."
511+msgstr "Jéemaatal"
512+
513+#: qml/Tutorial/TutorialRight.qml:31
514+msgid "To view open apps"
515+msgstr "Ngir gis jëfekaay yi ubeeku"
516+
517+#: qml/Tutorial/TutorialRight.qml:32
518+msgid "Long swipe from the right edge."
519+msgstr "Diri bu gudd tambalee ci cat bu ndijoor bi."
520+
521+#: qml/Tutorial/TutorialRight.qml:122
522+msgid "View all your running tasks."
523+msgstr "Gis lépp luy dox ci biir."
524+
525+#: qml/Wizard/Page.qml:89
526+msgctxt "Button: Go back one page in the Wizard"
527+msgid "Back"
528+msgstr "Dellu"
529+
530+#: qml/Wizard/Pages/here-terms.qml:27
531+msgid "Terms & Conditions"
532+msgstr "Anami jëfandiku gi"
533+
534+#: qml/Wizard/Pages/passwd-confirm.qml:49
535+msgid "Confirm passphrase"
536+msgstr "Dëggal kàddu-jàll"
537+
538+#: qml/Wizard/Pages/passwd-confirm.qml:50
539+msgid "Confirm passcode"
540+msgstr "Dëggal baatu-jàll"
541+
542+#: qml/Wizard/Pages/passwd-confirm.qml:53
543+#: qml/Wizard/Pages/passwd-confirm.qml:54
544+msgid "Please try again."
545+msgstr "Dila ñaan nga jéemaat."
546+
547+#: qml/Wizard/Pages/passwd-confirm.qml:82 qml/Wizard/Pages/passwd-set.qml:90
548+#: qml/Wizard/Pages/10-welcome.qml:88 qml/Wizard/Pages/30-passwd-type.qml:128
549+#: qml/Wizard/Pages/40-wifi.qml:215 qml/Wizard/Pages/50-location.qml:131
550+#: qml/Wizard/Pages/60-reporting.qml:50
551+msgid "Continue"
552+msgstr "Wéy"
553+
554+#: qml/Wizard/Pages/passwd-set.qml:61
555+msgid "Choose your passcode"
556+msgstr "Tànnal sa baatu-jàll"
557+
558+#: qml/Wizard/Pages/passwd-set.qml:68
559+msgid "Passphrase must be 4 characters long"
560+msgstr "Kàddu-jàll gi faww mu mat 4 màndarga"
561+
562+#: qml/Wizard/Pages/10-welcome.qml:27
563+msgid "Hi!"
564+msgstr "Dila nuyu!"
565+
566+#: qml/Wizard/Pages/10-welcome.qml:44
567+msgid "Welcome to your Ubuntu phone."
568+msgstr "Dala-jàmm ci sa wootekaay bu Ubuntu."
569+
570+#: qml/Wizard/Pages/10-welcome.qml:52
571+msgid "Let’s get started."
572+msgstr "Nu tambali."
573+
574+#: qml/Wizard/Pages/20-sim.qml:25
575+msgid "Add a SIM card and restart your device"
576+msgstr "Duggalal ab SIM te fay-taalaat sa wootekaay"
577+
578+#: qml/Wizard/Pages/20-sim.qml:59
579+msgid "Without it, you won’t be able to make calls or use text messaging."
580+msgstr "Lu ko moy doo man a woote walla yónney bataaxal."
581+
582+#: qml/Wizard/Pages/20-sim.qml:73 qml/Wizard/Pages/40-wifi.qml:215
583+msgid "Skip"
584+msgstr "Tëb"
585+
586+#: qml/Wizard/Pages/30-passwd-type.qml:39
587+msgid "Lock security"
588+msgstr "Kaaraangeg tëj"
589+
590+#: qml/Wizard/Pages/30-passwd-type.qml:74
591+msgid "Please select how you’d like to unlock your phone."
592+msgstr "Tànnal nan nga bëgg a tëjee sa wootekaay"
593+
594+#: qml/Wizard/Pages/30-passwd-type.qml:97
595+msgctxt "Label: Type of security method"
596+msgid "Swipe"
597+msgstr "Diri"
598+
599+#: qml/Wizard/Pages/30-passwd-type.qml:98
600+msgctxt "Label: Description of security method"
601+msgid "No security"
602+msgstr "Amul kaaraange"
603+
604+#: qml/Wizard/Pages/30-passwd-type.qml:100
605+msgctxt "Label: Type of security method"
606+msgid "Passcode"
607+msgstr "Baatu-jàll"
608+
609+#: qml/Wizard/Pages/30-passwd-type.qml:101
610+msgctxt "Label: Description of security method"
611+msgid "4 digits only"
612+msgstr "4 baaraam rek"
613+
614+#: qml/Wizard/Pages/30-passwd-type.qml:103
615+msgctxt "Label: Type of security method"
616+msgid "Passphrase"
617+msgstr "kàddu-jàll"
618+
619+#: qml/Wizard/Pages/30-passwd-type.qml:104
620+msgctxt "Label: Description of security method"
621+msgid "Numbers and letters"
622+msgstr "Nimero aki araf"
623+
624+#: qml/Wizard/Pages/40-wifi.qml:29
625+msgid "Connect to Wi‑Fi"
626+msgstr "Lonku ci Wi-fi"
627+
628+#: qml/Wizard/Pages/40-wifi.qml:168
629+msgid "Available networks…"
630+msgstr "Mbaal yi jàppandi..."
631+
632+#: qml/Wizard/Pages/40-wifi.qml:169
633+msgid "No available networks."
634+msgstr "Benn mbaal jàppandiwul"
635+
636+#: qml/Wizard/Pages/50-location.qml:27
637+msgid "Location"
638+msgstr "Nekkuwaay"
639+
640+#: qml/Wizard/Pages/50-location.qml:62
641+msgid "Let the phone detect your location:"
642+msgstr "Bàyyi wootekaay bi gisal boppam sa nekkuwaay"
643+
644+#: qml/Wizard/Pages/50-location.qml:69
645+msgid "Using GPS only (less accurate)"
646+msgstr "Ci jëfandikoo GPS kepp (gën a ñawadi)"
647+
648+#: qml/Wizard/Pages/50-location.qml:86
649+msgid "Using GPS, anonymized Wi-Fi and cellular network info (recommended)"
650+msgstr ""
651+"Jëfandikoo GPS, wi-fi buñ xamul ak xibaaru mbaalu wootekaay (digalees)"
652+
653+#. Translators: HERE is a trademark for Nokia's location service, you probably shouldn't translate it
654+#: qml/Wizard/Pages/50-location.qml:103
655+msgid ""
656+"By selecting this option you agree to the Nokia HERE <a href='#'>terms and "
657+"conditions</a>."
658+msgstr ""
659+"Soo falee bii tànneef mooy ne nangu nga <a href='#'>anami jëfandiku</a gu "
660+"Nokia HERE"
661+
662+#: qml/Wizard/Pages/50-location.qml:112
663+msgid "Not at all"
664+msgstr "Déet"
665+
666+#: qml/Wizard/Pages/50-location.qml:124
667+msgid "You can change your mind later in <b>System Settings</b>."
668+msgstr "Man ngaa seetaat sa tànneef ginnaaw bi ci <b>Jekkali Noste</b>."
669+
670+#: qml/Wizard/Pages/60-reporting.qml:24
671+msgid "Improving your experience"
672+msgstr "Gënal jëfandiku gi"
673+
674+#: qml/Wizard/Pages/60-reporting.qml:36
675+msgid ""
676+"Your phone is set up to automatically report errors to Canonical and its "
677+"partners, the makers of the operating system."
678+msgstr ""
679+"Sa wootekaay dañ koo def bamuy yónneel boppam njuumte yi Canonical aki "
680+"farandoom, ñi defar nosteg doxiin gi."
681+
682+#: qml/Wizard/Pages/60-reporting.qml:43
683+msgid ""
684+"This can be disabled in <b>System Settings</b> under <b>Security &amp; "
685+"Privacy</b>"
686+msgstr ""
687+"Man nañ koo dindee ci <b>Jagali Noste</b> ci ronu <b>Karaange &amp; "
688+"Sutura</b>"
689+
690+#: qml/Wizard/Pages/80-finished.qml:24
691+msgid "All done"
692+msgstr "Sotti na"
693+
694+#: qml/Wizard/Pages/80-finished.qml:39
695+msgid "Nice work!"
696+msgstr "Liggéey bu rafet!"
697+
698+#: qml/Wizard/Pages/80-finished.qml:46
699+msgid "Your phone is now ready to use."
700+msgstr "Leegi sa wootekaay noppi na ngir ñu man koo jëfandikoo."
701+
702+#: qml/Wizard/Pages/80-finished.qml:53
703+msgid "Finish"
704+msgstr "Jeexal"
705+
706+#. Translators: This is the arrow for "Back" buttons
707+#: qml/Wizard/StackButton.qml:39
708+#, qt-format
709+msgid "〈 %1"
710+msgstr "〈 %1"
711+
712+#. Translators: This is the arrow for "Forward" buttons
713+#: qml/Wizard/StackButton.qml:42
714+#, qt-format
715+msgid "%1 〉"
716+msgstr "%1 〉"
717+
718+#~ msgid "Log out"
719+#~ msgstr "Génn"
720+
721+#~ msgid "Power"
722+#~ msgstr "Fay"
723+
724+#~ msgid "Reboot"
725+#~ msgstr "Fay-taalaat"
726+
727+#~ msgid "Shut down"
728+#~ msgstr "Fay"
729+
730+#~ msgid "Restart"
731+#~ msgstr "Fay-taalaat"
732+
733+#~ msgid "Power off"
734+#~ msgstr "Fay"
735+
736+#~ msgid "Try swiping from the top edge to access the indicators"
737+#~ msgstr "Jéemal diri tambale ci kaw ngir gis wonekaay yi"
738+
739+#~ msgid "Top edge"
740+#~ msgstr "Cat wu kaw"
741+
742+#~ msgid "Close"
743+#~ msgstr "Tëj"
744+
745+#~ msgid "Swipe up again to close the settings screen"
746+#~ msgstr "Diriwaatal ci kaw ngir tëj xoolu jekkal yi"
747+
748+#~ msgid "Left edge"
749+#~ msgstr "Catu cammoñ"
750+
751+#~ msgid "Well done"
752+#~ msgstr "Jaa-jëf"
753+
754+#~ msgid "Swipe from the left to reveal the launcher for quick access to apps"
755+#~ msgstr ""
756+#~ "Jéemal diri tambalee ci cammoñ ngir gis ubbikaay bi ngir àgg gu gaaw ci "
757+#~ "jëfekaay yi"
758+
759+#~ msgid "Skip intro"
760+#~ msgstr "Tëb ndoorteel"
761+
762+#~ msgid "Try swiping from the right edge to unlock the phone"
763+#~ msgstr "Jéemal diri tambalee ci catu ndijoor bi ngir ubbi wootekaay bi"
764+
765+#~ msgid "Right edge"
766+#~ msgstr "Cat wu ndijoor"
767+
768+#~ msgid "Settings"
769+#~ msgstr "Jekkal"
770+
771+#~ msgid ""
772+#~ "You have now mastered the edge gestures and can start using the "
773+#~ "phone<br><br>Tap on the screen to start"
774+#~ msgstr ""
775+#~ "Léegi nàng nga bu baax kon man nga tàmbali jëfandikoo wootekaay bi <br><br> "
776+#~ "Bësal ci xoolu bi ngir tàmbali"
777+
778+#~ msgid "Store"
779+#~ msgstr "Ja"
780+
781+#~ msgid "Search"
782+#~ msgstr "Seet"
783+
784+#~ msgid "Type or say a command"
785+#~ msgstr "Bind walla wax ag cantaane"
786+
787+#~ msgid "Loading. Please Wait..."
788+#~ msgstr "Yeb. Di ñaan nga xaar..."
789+
790+#~ msgid "Speaking..."
791+#~ msgstr "Maa ngi wax..."
792+
793+#~ msgid "Speak Now..."
794+#~ msgstr "Léegi waxal..."
795+
796+#~ msgid "Confirm"
797+#~ msgstr "Dëggal"
798+
799+#~ msgid "Please re-enter"
800+#~ msgstr "Di la ñaan nga duggalaat"
qml/Components/Background.qml+2−2
@@ -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.4
18−import Ubuntu.Components 1.1
18+import Ubuntu.Components 1.3
19import Utils 0.1 as Utils
19import Utils 0.1 as Utils
20
20
21Loader {
21Loader {
qml/Components/BaseCarouselDelegate.qml+2−2
@@ -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.4
18−import Ubuntu.Components 0.1
18+import Ubuntu.Components 1.3
19
19
20/*!
20/*!
21 \brief Base delegate for use with the Carousel component
21 \brief Base delegate for use with the Carousel component
qml/Components/Carousel.qml+2−2
@@ -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.3
17+import QtQuick 2.4
18−import Ubuntu.Components 0.1
18+import Ubuntu.Components 1.3
19import "carousel.js" as CarouselJS
19import "carousel.js" as CarouselJS
20
20
21/*! The Carousel component presents the items of a model in a carousel view. It's similar to a
21/*! The Carousel component presents the items of a model in a carousel view. It's similar to a
qml/Components/Circle.qml+1−1
@@ -14,7 +14,7 @@
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.4
18
18
19Rectangle {
19Rectangle {
20 antialiasing: true
20 antialiasing: true
qml/Components/DelayedLockscreen.qml+2−2
@@ -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.4
18−import Ubuntu.Components 0.1
18+import Ubuntu.Components 1.3
19import "../Components"
19import "../Components"
20
20
21Item {
21Item {
qml/Components/Dialogs.qml+2−2
@@ -14,12 +14,12 @@
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.4
18
18
19import Unity.Application 0.1
19import Unity.Application 0.1
20import Unity.Session 0.1
20import Unity.Session 0.1
21−import Ubuntu.Components 1.1
22import GlobalShortcut 1.0
21import GlobalShortcut 1.0
22+import Ubuntu.Components 1.3
23import Unity.Platform 1.0
23import Unity.Platform 1.0
24import Utils 0.1
24import Utils 0.1
25import "../Greeter"
25import "../Greeter"
qml/Components/DragHandle.qml+2−2
@@ -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.4
18−import Ubuntu.Components 0.1
18+import Ubuntu.Components 1.3
19import Ubuntu.Gestures 0.1
19import Ubuntu.Gestures 0.1
20
20
21/*
21/*
qml/Components/DraggingArea.qml+2−2
@@ -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.4
18−import Ubuntu.Components 0.1
18+import Ubuntu.Components 1.3
19
19
20MouseArea {
20MouseArea {
21 id: draggingArea
21 id: draggingArea
qml/Components/EdgeDragEvaluator.qml+2−2
@@ -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.4
18−import Ubuntu.Components 0.1
18+import Ubuntu.Components 1.3
19import Ubuntu.Gestures 0.1
19import Ubuntu.Gestures 0.1
20
20
21/*
21/*
qml/Components/Header.qml+2−2
@@ -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 Ubuntu.Components 1.1
17+import Ubuntu.Components 1.3
18−import Ubuntu.Components.Themes.Ambiance 1.1
18+import Ubuntu.Components.Themes.Ambiance 1.3
19
19
20PageHeadStyle {
20PageHeadStyle {
21 id: root
21 id: root
qml/Components/InputMethod.qml+2−2
@@ -14,9 +14,9 @@
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.4
18import Unity.Application 0.1
18import Unity.Application 0.1
19−import Ubuntu.Components 0.1
19+import Ubuntu.Components 1.3
20import Ubuntu.Gestures 0.1
20import Ubuntu.Gestures 0.1
21
21
22Item {
22Item {
qml/Components/LazyImage.qml+24−13
@@ -17,8 +17,8 @@
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
18 */
19
19
20−import QtQuick 2.0
20+import QtQuick 2.4
21−import Ubuntu.Components 0.1
21+import Ubuntu.Components 1.3
22
22
23Item {
23Item {
24 id: root
24 id: root
@@ -31,13 +31,12 @@ Item {
31 property real initialHeight: scaleTo == "height" || scaleTo == "fit" ? height : units.gu(10)
31 property real initialHeight: scaleTo == "height" || scaleTo == "fit" ? height : units.gu(10)
32
32
33 property alias sourceSize: image.sourceSize
33 property alias sourceSize: image.sourceSize
34− property alias fillMode: image.fillMode
35 property alias asynchronous: image.asynchronous
34 property alias asynchronous: image.asynchronous
36 property alias cache: image.cache
35 property alias cache: image.cache
37− property alias horizontalAlignment: image.horizontalAlignment
38− property alias verticalAlignment: image.verticalAlignment
39 property alias sourceImage: image
36 property alias sourceImage: image
40− property alias borderSource: shape.borderSource
37+
38+ property bool useUbuntuShape: true
39+ property bool pressed: false
41
40
42 state: "default"
41 state: "default"
43
42
@@ -50,12 +49,15 @@ Item {
50 }
49 }
51 }
50 }
52
51
53− UbuntuShape {
52+ Loader {
54 id: placeholder
53 id: placeholder
55 objectName: "placeholder"
54 objectName: "placeholder"
56− color: "#22FFFFFF"
57 anchors.fill: shape
55 anchors.fill: shape
56+ active: useUbuntuShape
58 visible: opacity != 0
57 visible: opacity != 0
58+ sourceComponent: UbuntuShape {
59+ backgroundColor: "#22FFFFFF"
60+ }
59
61
60 ActivityIndicator {
62 ActivityIndicator {
61 id: activity
63 id: activity
@@ -78,28 +80,37 @@ Item {
78 }
80 }
79 }
81 }
80
82
81− UbuntuShape {
83+ Loader {
82 id: shape
84 id: shape
83 objectName: "shape"
85 objectName: "shape"
84 height: root.initialHeight
86 height: root.initialHeight
85 width: root.initialWidth
87 width: root.initialWidth
86 anchors.centerIn: root.scaleTo == "fit" ? parent : undefined
88 anchors.centerIn: root.scaleTo == "fit" ? parent : undefined
87−
89+ active: useUbuntuShape
88 opacity: 0
90 opacity: 0
89 visible: opacity != 0
91 visible: opacity != 0
92+ sourceComponent: UbuntuShapeOverlay {
93+ property bool pressed: false
94+ overlayColor: Qt.rgba(0, 0, 0, pressed ? 0.1 : 0)
95+ overlayRect: Qt.rect(0.0, 0.0, 1.0, 1.0)
96+ }
97+ onLoaded: {
98+ item.source = image;
99+ item.pressed = Qt.binding(function() { return root.pressed; });
100+ }
90
101
91− image: Image {
102+ Image {
92 id: image
103 id: image
93 objectName: "image"
104 objectName: "image"
94
105
95 property url nextSource
106 property url nextSource
96 property string format: image.implicitWidth > image.implicitHeight ? "landscape" : "portrait"
107 property string format: image.implicitWidth > image.implicitHeight ? "landscape" : "portrait"
97
108
109+ anchors.fill: parent
110+ visible: !useUbuntuShape
98 fillMode: Image.PreserveAspectFit
111 fillMode: Image.PreserveAspectFit
99 asynchronous: true
112 asynchronous: true
100 cache: false
113 cache: false
101− horizontalAlignment: Image.AlignHCenter
102− verticalAlignment: Image.AlignVCenter
103 sourceSize.width: root.scaleTo == "width" ? root.width
114 sourceSize.width: root.scaleTo == "width" ? root.width
104 : root.scaleTo == "fit" && root.width <= root.height ? root.width
115 : root.scaleTo == "fit" && root.width <= root.height ? root.width
105 : 0
116 : 0
qml/Components/ListItems/Header.qml+2−2
@@ -14,9 +14,9 @@
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.4
18import QtQuick.Layouts 1.1
18import QtQuick.Layouts 1.1
19−import Ubuntu.Components 0.1
19+import Ubuntu.Components 1.3
20
20
21Item {
21Item {
22 property alias text: label.text
22 property alias text: label.text
qml/Components/ListItems/ThinDivider.qml+1−1
@@ -14,7 +14,7 @@
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.4
18
18
19Image {
19Image {
20 anchors {
20 anchors {
qml/Components/ListViewOSKScroller.qmlnew file+53
@@ -0,0 +1,53 @@
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.4
18+import "../Components"
19+
20+Item {
21+ id: root
22+
23+ property ListView list
24+
25+ Binding {
26+ target: list
27+ property: "bottomMargin"
28+ value: d.bottomMargin
29+ }
30+
31+ function setMakeSureVisibleItem(item) {
32+ d.previousVisibleHeight = d.visibleHeight;
33+ d.makeSureVisibleItem = item;
34+ }
35+
36+ QtObject {
37+ id: d
38+ property var makeSureVisibleItem
39+ property real previousVisibleHeight: 0
40+ readonly property real visibleHeight: list.height - list.bottomMargin
41+ readonly property real bottomMargin: Qt.inputMethod.visible ? Qt.inputMethod.keyboardRectangle.height : 0
42+
43+ onVisibleHeightChanged: {
44+ if (makeSureVisibleItem && makeSureVisibleItem.activeFocus && previousVisibleHeight > visibleHeight) {
45+ var textAreaPos = makeSureVisibleItem.mapToItem(list, 0, 0);
46+ if (textAreaPos.y + makeSureVisibleItem.height > visibleHeight) {
47+ list.contentY += textAreaPos.y + makeSureVisibleItem.height - visibleHeight
48+ }
49+ }
50+ previousVisibleHeight = visibleHeight;
51+ }
52+ }
53+}
qml/Components/Lockscreen.qml+3−3
@@ -14,9 +14,9 @@
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.4
18−import Ubuntu.Components 1.0
18+import Ubuntu.Components 1.3
19−import Ubuntu.Components.Popups 1.0
19+import Ubuntu.Components.Popups 1.3
20import Ubuntu.Telephony 0.1 as Telephony
20import Ubuntu.Telephony 0.1 as Telephony
21
21
22Showable {
22Showable {
qml/Components/NotificationAudio.qmlnew file+42
@@ -0,0 +1,42 @@
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.4
18+
19+Item {
20+ id: root
21+ property string source: ""
22+ readonly property var playbackState: priv.audio ? priv.audio.playbackState : 0
23+
24+ function play() {
25+ priv.audio.play();
26+ }
27+ function stop() {
28+ priv.audio.stop();
29+ }
30+
31+ QtObject {
32+ id: priv
33+ property var audio: {
34+ try {
35+ return Qt.createQmlObject("import QtMultimedia 5.6; Audio { source: root.source; audioRole: MediaPlayer.NotificationRole }", priv)
36+ } catch(err) {
37+ console.log("Upstream audioRole enum not available, falling back to old role name.");
38+ return Qt.createQmlObject("import QtMultimedia 5.0; Audio { source: root.source; audioRole: MediaPlayer.alert }", priv)
39+ }
40+ }
41+ }
42+}
qml/Components/Orientations.qml+28
@@ -17,6 +17,8 @@
17import QtQuick 2.4
17import QtQuick 2.4
18
18
19QtObject {
19QtObject {
20+ id: root
21+
20 // Just because "native" is a reserved keyword :(
22 // Just because "native" is a reserved keyword :(
21 property int native_: Qt.PortraitOrientation
23 property int native_: Qt.PortraitOrientation
22
24
@@ -26,4 +28,30 @@ QtObject {
26 property int invertedLandscape: Qt.InvertedLandscapeOrientation
28 property int invertedLandscape: Qt.InvertedLandscapeOrientation
27 property int portrait: Qt.PortraitOrientation
29 property int portrait: Qt.PortraitOrientation
28 property int invertedPortrait: Qt.InvertedPortraitOrientation
30 property int invertedPortrait: Qt.InvertedPortraitOrientation
31+
32+ function map(orientations) {
33+ var result = 0;
34+
35+ if (orientations & Qt.PortraitOrientation) {
36+ result |= root.portrait;
37+ }
38+
39+ if (orientations & Qt.InvertedPortraitOrientation) {
40+ result |= root.invertedPortrait;
41+ }
42+
43+ if (orientations & Qt.LandscapeOrientation) {
44+ result |= root.landscape;
45+ }
46+
47+ if (orientations & Qt.InvertedLandscapeOrientation) {
48+ result |= root.invertedLandscape;
49+ }
50+
51+ if (result == 0) {
52+ result = root.primary;
53+ }
54+
55+ return result;
56+ }
29}
57}
qml/Components/PanelState/PanelState.qml+1−1
@@ -15,7 +15,7 @@
15 */
15 */
16
16
17pragma Singleton
17pragma Singleton
18−import QtQuick 2.0
18+import QtQuick 2.4
19
19
20QtObject {
20QtObject {
21 id: root
21 id: root
qml/Components/PassphraseLockscreen.qml+2−2
@@ -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.4
18−import Ubuntu.Components 0.1
18+import Ubuntu.Components 1.3
19import "../Components"
19import "../Components"
20
20
21Item {
21Item {
qml/Components/PhysicalKeysMapper.qml+14−21
@@ -14,7 +14,7 @@
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.4
18import Powerd 0.1
18import Powerd 0.1
19
19
20/*!
20/*!
@@ -57,27 +57,20 @@ Item {
57
57
58 property bool altPressed: false
58 property bool altPressed: false
59 property bool altTabPressed: false
59 property bool altTabPressed: false
60− }
61
60
62− Timer {
61+ property var powerButtonPressStart: 0
63− id: powerKeyLongPressTimer
64− interval: root.powerKeyLongPressTime
65− onTriggered: root.powerKeyLongPressed();
66 }
62 }
67
63
68− function onKeyPressed(event) {
64+ function onKeyPressed(event, currentEventTimestamp) {
69− if ((event.key == Qt.Key_PowerDown || event.key == Qt.Key_PowerOff)
65+ if (event.key == Qt.Key_PowerDown || event.key == Qt.Key_PowerOff) {
70− && (!event.isAutoRepeat || !powerKeyLongPressTimer.running)) {
66+ if (event.isAutoRepeat) {
71−
67+ if (d.powerButtonPressStart > 0
72− // FIXME: We only consider power key presses if the screen is
68+ && currentEventTimestamp - d.powerButtonPressStart >= powerKeyLongPressTime) {
73− // on because of bugs 1410830/1409003. The theory is that when
69+ d.powerButtonPressStart = 0;
74− // those bugs are encountered, there is a >2s delay between the
70+ root.powerKeyLongPressed();
75− // power press event and the power release event, which causes
71+ }
76− // the shutdown dialog to appear on resume. So to avoid that
72+ } else {
77− // symptom while we investigate the root cause, we simply won't
73+ d.powerButtonPressStart = currentEventTimestamp;
78− // initiate any dialogs when the screen is off.
79− if (Powerd.status === Powerd.On) {
80− powerKeyLongPressTimer.restart();
81 }
74 }
82 } else if ((event.key == Qt.Key_MediaTogglePlayPause || event.key == Qt.Key_MediaPlay) && !event.isAutoRepeat) {
75 } else if ((event.key == Qt.Key_MediaTogglePlayPause || event.key == Qt.Key_MediaPlay) && !event.isAutoRepeat) {
83 event.accepted = callManager.handleMediaKey(false);
76 event.accepted = callManager.handleMediaKey(false);
@@ -113,9 +106,9 @@ Item {
113 }
106 }
114 }
107 }
115
108
116− function onKeyReleased(event) {
109+ function onKeyReleased(event, currentEventTimestamp) {
117 if (event.key == Qt.Key_PowerDown || event.key == Qt.Key_PowerOff) {
110 if (event.key == Qt.Key_PowerDown || event.key == Qt.Key_PowerOff) {
118− powerKeyLongPressTimer.stop();
111+ d.powerButtonPressStart = 0;
119 event.accepted = true;
112 event.accepted = true;
120 } else if (event.key == Qt.Key_VolumeDown) {
113 } else if (event.key == Qt.Key_VolumeDown) {
121 if (!d.ignoreVolumeEvents) root.volumeDownTriggered();
114 if (!d.ignoreVolumeEvents) root.volumeDownTriggered();
qml/Components/PinLockscreen.qml+3−3
@@ -14,9 +14,9 @@
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.4
18−import Ubuntu.Components 0.1
18+import Ubuntu.Components 1.3
19−import Ubuntu.Components.ListItems 0.1
19+import Ubuntu.Components.ListItems 1.3
20import "../Components"
20import "../Components"
21
21
22Item {
22Item {
qml/Components/PinPadButton.qml+2−2
@@ -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.4
18−import Ubuntu.Components 1.1
18+import Ubuntu.Components 1.3
19
19
20AbstractButton {
20AbstractButton {
21 id: root
21 id: root
qml/Components/Rating.qml+2−2
@@ -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.4
18−import Ubuntu.Components 0.1
18+import Ubuntu.Components 1.3
19
19
20/*! Rating widget bar. */
20/*! Rating widget bar. */
21
21
qml/Components/RatingStyle.qml+2−2
@@ -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.4
18−import Ubuntu.Components 0.1
18+import Ubuntu.Components 1.3
19
19
20Row {
20Row {
21 anchors.fill: parent
21 anchors.fill: parent
qml/Components/ResponsiveGridView.qml+2−2
@@ -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.3
17+import QtQuick 2.4
18−import Ubuntu.Components 0.1
18+import Ubuntu.Components 1.3
19
19
20/*
20/*
21 Essentially a GridView where you can specify the maximum number of columns it can have.
21 Essentially a GridView where you can specify the maximum number of columns it can have.
qml/Components/ResponsiveVerticalJournal.qml+2−2
@@ -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.4
18−import Ubuntu.Components 0.1
18+import Ubuntu.Components 1.3
19import "../Components"
19import "../Components"
20import Dash 0.1
20import Dash 0.1
21
21
qml/Components/ScreenGrabber.qml+2−4
@@ -14,8 +14,7 @@
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.4
18−import QtMultimedia 5.0
19import ScreenGrabber 0.1
18import ScreenGrabber 0.1
20import GlobalShortcut 1.0
19import GlobalShortcut 1.0
21
20
@@ -40,9 +39,8 @@ Rectangle {
40 onTriggered: capture()
39 onTriggered: capture()
41 }
40 }
42
41
43− Audio {
42+ NotificationAudio {
44 id: shutterSound
43 id: shutterSound
45− audioRole: MediaPlayer.alert
46 source: "/system/media/audio/ui/camera_click.ogg"
44 source: "/system/media/audio/ui/camera_click.ogg"
47 }
45 }
48
46
qml/Components/ScrollCalculator.qml+2−2
@@ -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.2
17+import QtQuick 2.4
18−import Ubuntu.Components 1.1
18+import Ubuntu.Components 1.3
19
19
20Item {
20Item {
21 id: scrollArea
21 id: scrollArea
qml/Components/SearchHistoryModel/SearchHistoryModel.qml+1−1
@@ -15,7 +15,7 @@
15 */
15 */
16
16
17pragma Singleton
17pragma Singleton
18−import QtQuick 2.0
18+import QtQuick 2.4
19
19
20// TODO sanitize input, move to persistent storage
20// TODO sanitize input, move to persistent storage
21
21
qml/Components/ShellDialog.qml+3−3
@@ -14,10 +14,10 @@
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.4
18
18
19−import Ubuntu.Components 1.1
19+import Ubuntu.Components 1.3
20−import Ubuntu.Components.Popups 0.1
20+import Ubuntu.Components.Popups 1.3
21
21
22/*
22/*
23 A Dialog configured for use as a proper in-scene Dialog
23 A Dialog configured for use as a proper in-scene Dialog
qml/Components/Showable.qml+1−1
@@ -14,7 +14,7 @@
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.4
18
18
19Item {
19Item {
20 id: showable
20 id: showable
qml/Components/StandardAnimation.qml+1−1
@@ -14,7 +14,7 @@
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.4
18
18
19NumberAnimation {
19NumberAnimation {
20 duration: 200
20 duration: 200
qml/Components/UbuntuShapeForItem.qml+2−2
@@ -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.4
18−import Ubuntu.Components 0.1
18+import Ubuntu.Components 1.3
19
19
20/* FIXME: This component is duplicating the UbuntuShape from the SDK, but shapes more
20/* FIXME: This component is duplicating the UbuntuShape from the SDK, but shapes more
21 * general (Item-based) components. This ability should be incorporated into the SDK's
21 * general (Item-based) components. This ability should be incorporated into the SDK's
qml/Components/Unity8Settings.qml+1−1
@@ -14,7 +14,7 @@
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.4
18import GSettings 1.0
18import GSettings 1.0
19
19
20QtObject {
20QtObject {
qml/Components/UnityInputInfo/UnityInputInfo.qml+2−2
@@ -16,10 +16,10 @@
16
16
17pragma Singleton
17pragma Singleton
18
18
19−import QtQuick 2.3
19+import QtQuick 2.4
20import Unity.InputInfo 0.1
20import Unity.InputInfo 0.1
21// Workaround https://bugs.launchpad.net/ubuntu/+source/unity8/+bug/1473471
21// Workaround https://bugs.launchpad.net/ubuntu/+source/unity8/+bug/1473471
22−import Ubuntu.Components 1.2
22+import Ubuntu.Components 1.3
23
23
24Item {
24Item {
25 id: root
25 id: root
qml/Components/WindowControlButtons.qml+2−2
@@ -16,8 +16,8 @@
16 * Authors: Michael Zanetti <michael.zanetti@canonical.com>
16 * Authors: Michael Zanetti <michael.zanetti@canonical.com>
17 */
17 */
18
18
19−import QtQuick 2.3
19+import QtQuick 2.4
20−import Ubuntu.Components 1.1
20+import Ubuntu.Components 1.3
21
21
22Row {
22Row {
23 id: root
23 id: root
qml/Components/WindowScreenshot.qml+1−1
@@ -14,7 +14,7 @@
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.2
17+import QtQuick 2.4
18
18
19Item {
19Item {
20 id: root
20 id: root
qml/Components/WrongPasswordAnimation.qml+1−1
@@ -14,7 +14,7 @@
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.4
18
18
19SequentialAnimation {
19SequentialAnimation {
20 id: root
20 id: root
qml/Components/ZoomableImage.qml+2−2
@@ -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.4
18−import Ubuntu.Components 0.1
18+import Ubuntu.Components 1.3
19import "../Components"
19import "../Components"
20
20
21/*! \brief Zoomable for image.
21/*! \brief Zoomable for image.
qml/Dash/CardCarousel.qml+3−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.4
18−import Ubuntu.Components 0.1
18+import Ubuntu.Components 1.3
19import "../Components"
19import "../Components"
20
20
21DashRenderer {
21DashRenderer {
@@ -68,7 +68,7 @@ DashRenderer {
68 item.fontScale = Qt.binding(function() { return carousel.fontScale; });
68 item.fontScale = Qt.binding(function() { return carousel.fontScale; });
69 item.showHeader = Qt.binding(function() { return loader.explicitlyScaled; });
69 item.showHeader = Qt.binding(function() { return loader.explicitlyScaled; });
70 item.titleAlignment = Qt.binding(function() { return cardTool.titleAlignment; });
70 item.titleAlignment = Qt.binding(function() { return cardTool.titleAlignment; });
71− item.artShapeBorderSource = "none";
71+ item.artShapeStyle = "flat";
72 item.scopeStyle = cardCarousel.scopeStyle;
72 item.scopeStyle = cardCarousel.scopeStyle;
73 }
73 }
74
74
qml/Dash/CardGrid.qml+1−1
@@ -14,7 +14,7 @@
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.4
18import "../Components"
18import "../Components"
19
19
20DashRenderer {
20DashRenderer {
qml/Dash/CardHorizontalList.qml+2−2
@@ -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.3
17+import QtQuick 2.4
18−import Ubuntu.Components 1.1
18+import Ubuntu.Components 1.3
19import "../Components"
19import "../Components"
20
20
21DashRenderer {
21DashRenderer {
qml/Dash/CardTool.qml+1−1
@@ -14,7 +14,7 @@
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.4
18import Dash 0.1
18import Dash 0.1
19
19
20/*!
20/*!
qml/Dash/CardVerticalJournal.qml+2−2
@@ -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.4
18−import Ubuntu.Components 0.1
18+import Ubuntu.Components 1.3
19import "../Components"
19import "../Components"
20
20
21DashRenderer {
21DashRenderer {
qml/Dash/Dash.qml+2−2
@@ -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.2
17+import QtQuick 2.4
18−import Ubuntu.Components 0.1
18+import Ubuntu.Components 1.3
19import Ubuntu.Gestures 0.1
19import Ubuntu.Gestures 0.1
20import Unity 0.2
20import Unity 0.2
21import Utils 0.1
21import Utils 0.1
qml/Dash/DashApplication.qml+4−3
@@ -14,15 +14,16 @@
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.2
17+import QtQuick 2.4
18−import Ubuntu.Components 1.0
18+import Ubuntu.Components 1.3
19import Ubuntu.Thumbnailer 0.1 // Register support for image://thumbnailer/ and image://albumart/
19import Ubuntu.Thumbnailer 0.1 // Register support for image://thumbnailer/ and image://albumart/
20
20
21MainView {
21MainView {
22 implicitWidth: units.gu(40)
22 implicitWidth: units.gu(40)
23 implicitHeight: units.gu(68)
23 implicitHeight: units.gu(68)
24
24
25− useDeprecatedToolbar: false
25+ // Workaround bug #1475643
26+ headerColor: Qt.rgba(0, 0, 0, 0)
26
27
27 Dash {
28 Dash {
28 anchors.fill: parent
29 anchors.fill: parent
qml/Dash/DashBackground.qml+1−1
@@ -14,7 +14,7 @@
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.4
18
18
19Image {
19Image {
20 source: anchors.fill.width > anchors.fill.height ? "graphics/paper_landscape.png" : "graphics/paper_portrait.png"
20 source: anchors.fill.width > anchors.fill.height ? "graphics/paper_landscape.png" : "graphics/paper_portrait.png"
qml/Dash/DashCategoryBase.qml+2−2
@@ -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.4
18−import Ubuntu.Components 0.1
18+import Ubuntu.Components 1.3
19
19
20Item {
20Item {
21 width: parent.width
21 width: parent.width
qml/Dash/DashContent.qml+2−2
@@ -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.4
18−import Ubuntu.Components 0.1
18+import Ubuntu.Components 1.3
19import Unity 0.2
19import Unity 0.2
20import Utils 0.1
20import Utils 0.1
21import "../Components"
21import "../Components"
qml/Dash/DashContentTabBarStyle.qml+1−1
@@ -14,7 +14,7 @@
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 Ubuntu.Components.Themes.Ambiance 0.1
17+import Ubuntu.Components.Themes.Ambiance 1.3
18
18
19TabBarStyle {
19TabBarStyle {
20 indicatorImageSource: "graphics/tabbarchevron.png"
20 indicatorImageSource: "graphics/tabbarchevron.png"
qml/Dash/DashNavigation.qml+4−4
@@ -1,5 +1,5 @@
1/*
1/*
2− * Copyright (C) 2014 Canonical, Ltd.
2+ * Copyright (C) 2014,2015 Canonical, Ltd.
3 *
3 *
4 * This program is free software; you can redistribute it and/or modify
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
5 * it under the terms of the GNU General Public License as published by
@@ -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.2
17+import QtQuick 2.4
18−import Ubuntu.Components 1.1
18+import Ubuntu.Components 1.3
19import Dash 0.1
19import Dash 0.1
20import "../Components"
20import "../Components"
21
21
@@ -48,7 +48,7 @@ Item {
48 id: d
48 id: d
49 readonly property color foregroundColor: root.scopeStyle
49 readonly property color foregroundColor: root.scopeStyle
50 ? root.scopeStyle.getTextColor(backgroundItem.luminance)
50 ? root.scopeStyle.getTextColor(backgroundItem.luminance)
51− : Theme.palette.normal.baseText
51+ : theme.palette.normal.baseText
52 readonly property bool bothVisible: altNavigationButton.visible && navigationButton.visible
52 readonly property bool bothVisible: altNavigationButton.visible && navigationButton.visible
53 readonly property real navigationWidth: root.width >= units.gu(60) ? units.gu(40) : root.width
53 readonly property real navigationWidth: root.width >= units.gu(60) ? units.gu(40) : root.width
54 readonly property real buttonWidth: navigationWidth / (bothVisible ? 2 : 1)
54 readonly property real buttonWidth: navigationWidth / (bothVisible ? 2 : 1)
qml/Dash/DashNavigationButton.qml+4−4
@@ -1,5 +1,5 @@
1/*
1/*
2− * Copyright (C) 2014 Canonical, Ltd.
2+ * Copyright (C) 2014,2015 Canonical, Ltd.
3 *
3 *
4 * This program is free software; you can redistribute it and/or modify
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
5 * it under the terms of the GNU General Public License as published by
@@ -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.2
17+import QtQuick 2.4
18−import Ubuntu.Components 1.1
18+import Ubuntu.Components 1.3
19
19
20AbstractButton {
20AbstractButton {
21 id: root
21 id: root
@@ -24,7 +24,7 @@ AbstractButton {
24 // Set by parent
24 // Set by parent
25 property var scope: null
25 property var scope: null
26 property var scopeStyle: null
26 property var scopeStyle: null
27− property color foregroundColor: Theme.palette.normal.baseText
27+ property color foregroundColor: theme.palette.normal.baseText
28 property bool isAltNavigation: false
28 property bool isAltNavigation: false
29 property bool showDivider: false
29 property bool showDivider: false
30
30
qml/Dash/DashNavigationList.qml+5−5
@@ -1,5 +1,5 @@
1/*
1/*
2− * Copyright (C) 2014 Canonical, Ltd.
2+ * Copyright (C) 2014,2015 Canonical, Ltd.
3 *
3 *
4 * This program is free software; you can redistribute it and/or modify
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
5 * it under the terms of the GNU General Public License as published by
@@ -14,9 +14,9 @@
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.2
17+import QtQuick 2.4
18−import Ubuntu.Components 1.1
18+import Ubuntu.Components 1.3
19−import Ubuntu.Components.ListItems 0.1 as ListItem
19+import Ubuntu.Components.ListItems 1.3 as ListItem
20import "../Components"
20import "../Components"
21
21
22Item {
22Item {
@@ -24,7 +24,7 @@ Item {
24 property var navigation: null
24 property var navigation: null
25 property var currentNavigation: null
25 property var currentNavigation: null
26 property var scopeStyle: null
26 property var scopeStyle: null
27− property color foregroundColor: Theme.palette.normal.baseText
27+ property color foregroundColor: theme.palette.normal.baseText
28 signal enterNavigation(var newNavigationId, bool hasChildren)
28 signal enterNavigation(var newNavigationId, bool hasChildren)
29 signal goBackToParentClicked()
29 signal goBackToParentClicked()
30 signal allNavigationClicked()
30 signal allNavigationClicked()
qml/Dash/PageHeader.qml → qml/Dash/DashPageHeader.qmlrenamed+12−16
@@ -1,5 +1,5 @@
1/*
1/*
2− * Copyright (C) 2013 Canonical, Ltd.
2+ * Copyright (C) 2013,2015 Canonical, Ltd.
3 *
3 *
4 * This program is free software; you can redistribute it and/or modify
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
5 * it under the terms of the GNU General Public License as published by
@@ -14,11 +14,11 @@
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.2
17+import QtQuick 2.4
18−import Ubuntu.Components 1.1
18+import Ubuntu.Components 1.3
19−import Ubuntu.Components.Themes.Ambiance 1.1
19+import Ubuntu.Components.Themes.Ambiance 1.3
20−import Ubuntu.Components.Popups 1.0
20+import Ubuntu.Components.Popups 1.3
21−import Ubuntu.Components.ListItems 1.0
21+import Ubuntu.Components.ListItems 1.3
22import "../Components"
22import "../Components"
23import "../Components/SearchHistoryModel"
23import "../Components/SearchHistoryModel"
24
24
@@ -136,7 +136,7 @@ Item {
136 objectName: "headerContainer"
136 objectName: "headerContainer"
137 clip: contentY < height
137 clip: contentY < height
138 anchors { left: parent.left; top: parent.top; right: parent.right }
138 anchors { left: parent.left; top: parent.top; right: parent.right }
139− height: units.gu(7)
139+ height: header.contentHeight
140 contentHeight: headersColumn.height
140 contentHeight: headersColumn.height
141 interactive: false
141 interactive: false
142 contentY: showSearch ? 0 : height
142 contentY: showSearch ? 0 : height
@@ -171,18 +171,15 @@ Item {
171 PageHeadStyle {
171 PageHeadStyle {
172 id: searchHeader
172 id: searchHeader
173 anchors { left: parent.left; right: parent.right }
173 anchors { left: parent.left; right: parent.right }
174− height: headerContainer.height
175− contentHeight: height
176 opacity: headerContainer.clip || headerContainer.showSearch ? 1 : 0 // setting visible false cause column to relayout
174 opacity: headerContainer.clip || headerContainer.showSearch ? 1 : 0 // setting visible false cause column to relayout
177 __separator_visible: false
175 __separator_visible: false
178 // Required to keep PageHeadStyle noise down as it expects the Page's properties around.
176 // Required to keep PageHeadStyle noise down as it expects the Page's properties around.
179 property var styledItem: searchHeader
177 property var styledItem: searchHeader
180− property string title
181 property color dividerColor: "transparent" // Doesn't matter as we don't have PageHeadSections
178 property color dividerColor: "transparent" // Doesn't matter as we don't have PageHeadSections
182 property color panelColor: background.topColor
179 property color panelColor: background.topColor
183 panelForegroundColor: config.foregroundColor
180 panelForegroundColor: config.foregroundColor
184− property var config: PageHeadConfiguration {
181+ config: PageHeadConfiguration {
185− foregroundColor: root.scopeStyle ? root.scopeStyle.headerForeground : Theme.palette.normal.baseText
182+ foregroundColor: root.scopeStyle ? root.scopeStyle.headerForeground : theme.palette.normal.baseText
186 backAction: Action {
183 backAction: Action {
187 iconName: "back"
184 iconName: "back"
188 onTriggered: {
185 onTriggered: {
@@ -247,16 +244,15 @@ Item {
247 objectName: "innerPageHeader"
244 objectName: "innerPageHeader"
248 anchors { left: parent.left; right: parent.right }
245 anchors { left: parent.left; right: parent.right }
249 height: headerContainer.height
246 height: headerContainer.height
250− contentHeight: height
251 opacity: headerContainer.clip || !headerContainer.showSearch ? 1 : 0 // setting visible false cause column to relayout
247 opacity: headerContainer.clip || !headerContainer.showSearch ? 1 : 0 // setting visible false cause column to relayout
252 __separator_visible: false
248 __separator_visible: false
253 property var styledItem: header
249 property var styledItem: header
254− property string title: root.title
255 property color dividerColor: "transparent" // Doesn't matter as we don't have PageHeadSections
250 property color dividerColor: "transparent" // Doesn't matter as we don't have PageHeadSections
256 property color panelColor: background.topColor
251 property color panelColor: background.topColor
257 panelForegroundColor: config.foregroundColor
252 panelForegroundColor: config.foregroundColor
258− property var config: PageHeadConfiguration {
253+ config: PageHeadConfiguration {
254+ title: root.title
259− foregroundColor: root.scopeStyle ? root.scopeStyle.headerForeground : Theme.palette.normal.baseText
255+ foregroundColor: root.scopeStyle ? root.scopeStyle.headerForeground : theme.palette.normal.baseText
260 backAction: Action {
256 backAction: Action {
261 iconName: backIsClose ? "close" : "back"
257 iconName: backIsClose ? "close" : "back"
262 visible: root.showBackButton
258 visible: root.showBackButton
qml/Dash/DashRenderer.qml+1−1
@@ -14,7 +14,7 @@
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.4
18
18
19Item {
19Item {
20 property real collapsedHeight
20 property real collapsedHeight
qml/Dash/GenericScopeView.qml+6−6
@@ -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.4
18−import Ubuntu.Components 1.1
18+import Ubuntu.Components 1.3
19import Utils 0.1
19import Utils 0.1
20import Unity 0.2
20import Unity 0.2
21import Dash 0.1
21import Dash 0.1
@@ -573,7 +573,7 @@ FocusScope {
573 }
573 }
574 fontSize: "small"
574 fontSize: "small"
575 font.weight: Font.Bold
575 font.weight: Font.Bold
576− color: scopeStyle ? scopeStyle.foreground : Theme.palette.normal.baseText
576+ color: scopeStyle ? scopeStyle.foreground : theme.palette.normal.baseText
577 }
577 }
578 }
578 }
579
579
@@ -610,7 +610,7 @@ FocusScope {
610 width: categoryView.width
610 width: categoryView.width
611 height: section != "" ? units.gu(5) : 0
611 height: section != "" ? units.gu(5) : 0
612 text: section
612 text: section
613− color: scopeStyle ? scopeStyle.foreground : Theme.palette.normal.baseText
613+ color: scopeStyle ? scopeStyle.foreground : theme.palette.normal.baseText
614 iconName: delegate && delegate.headerLink ? "go-next" : ""
614 iconName: delegate && delegate.headerLink ? "go-next" : ""
615 onClicked: {
615 onClicked: {
616 if (delegate.headerLink) scopeView.scope.performQuery(delegate.headerLink);
616 if (delegate.headerLink) scopeView.scope.performQuery(delegate.headerLink);
@@ -624,7 +624,7 @@ FocusScope {
624 sourceComponent: scopeView.showPageHeader ? pageHeaderComponent : undefined
624 sourceComponent: scopeView.showPageHeader ? pageHeaderComponent : undefined
625 Component {
625 Component {
626 id: pageHeaderComponent
626 id: pageHeaderComponent
627− PageHeader {
627+ DashPageHeader {
628 objectName: "scopePageHeader"
628 objectName: "scopePageHeader"
629 width: parent.width
629 width: parent.width
630 title: scopeView.scope ? scopeView.scope.name : ""
630 title: scopeView.scope ? scopeView.scope.name : ""
@@ -731,7 +731,7 @@ FocusScope {
731 }
731 }
732 fontSize: "small"
732 fontSize: "small"
733 font.weight: Font.Bold
733 font.weight: Font.Bold
734− color: scopeStyle ? scopeStyle.foreground : Theme.palette.normal.baseText
734+ color: scopeStyle ? scopeStyle.foreground : theme.palette.normal.baseText
735 }
735 }
736
736
737 Connections {
737 Connections {
qml/Dash/PreviewListView.qml+3−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.4
18−import Ubuntu.Components 0.1
18+import Ubuntu.Components 1.3
19import Unity 0.2
19import Unity 0.2
20import "../Components"
20import "../Components"
21import "Previews" as Previews
21import "Previews" as Previews
@@ -43,7 +43,7 @@ Item {
43
43
44 signal backClicked()
44 signal backClicked()
45
45
46− PageHeader {
46+ DashPageHeader {
47 id: header
47 id: header
48 objectName: "pageHeader"
48 objectName: "pageHeader"
49 width: parent.width
49 width: parent.width
qml/Dash/Previews/Preview.qml+13−20
@@ -14,8 +14,9 @@
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.4
18−import Ubuntu.Components 0.1
18+import Ubuntu.Components 1.3
19+import "../../Components"
19
20
20/*! \brief This component constructs the Preview UI.
21/*! \brief This component constructs the Preview UI.
21 *
22 *
@@ -72,18 +73,10 @@ Item {
72 }
73 }
73 width: row.columnWidth
74 width: row.columnWidth
74 spacing: row.spacing
75 spacing: row.spacing
75− bottomMargin: Qt.inputMethod.visible ? Qt.inputMethod.keyboardRectangle.height : 0
76+
76− property var makeSureVisibleItem
77+ ListViewOSKScroller {
77− property real previousVisibleHeight: 0
78+ id: oskScroller
78− property real visibleHeight: height - bottomMargin
79+ list: column
79− onVisibleHeightChanged: {
80− if (makeSureVisibleItem && makeSureVisibleItem.activeFocus && previousVisibleHeight > visibleHeight) {
81− var textAreaPos = makeSureVisibleItem.mapToItem(column, 0, 0);
82− if (textAreaPos.y + makeSureVisibleItem.height > column.visibleHeight) {
83− column.contentY += textAreaPos.y + makeSureVisibleItem.height - column.visibleHeight
84− }
85− }
86− previousVisibleHeight = visibleHeight;
87 }
80 }
88
81
89 model: columnModel
82 model: columnModel
@@ -100,17 +93,17 @@ Item {
100 anchors {
93 anchors {
101 left: parent.left
94 left: parent.left
102 right: parent.right
95 right: parent.right
103− leftMargin: units.gu(1)
96+ leftMargin: widgetMargins
104− rightMargin: units.gu(1)
97+ rightMargin: widgetMargins
105 }
98 }
106
99
107 onTriggered: {
100 onTriggered: {
108 previewModel.triggered(widgetId, actionId, data);
101 previewModel.triggered(widgetId, actionId, data);
109 }
102 }
103+
110− onMakeSureVisible: {
104+ onMakeSureVisible: {
111− column.previousVisibleHeight=column.visibleHeight
105+ oskScroller.setMakeSureVisibleItem(item);
112− column.makeSureVisibleItem=item
113− }
106+ }
114
107
115 onFocusChanged: if (focus) column.positionViewAtIndex(index, ListView.Contain)
108 onFocusChanged: if (focus) column.positionViewAtIndex(index, ListView.Contain)
116
109
qml/Dash/Previews/PreviewActionButton.qml+2−2
@@ -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.4
18−import Ubuntu.Components 1.1
18+import Ubuntu.Components 1.3
19
19
20Button {
20Button {
21 signal triggeredAction(var actionData)
21 signal triggeredAction(var actionData)
qml/Dash/Previews/PreviewActionCombo.qml+4−4
@@ -1,5 +1,5 @@
1/*
1/*
2− * Copyright (C) 2014 Canonical, Ltd.
2+ * Copyright (C) 2014,2015 Canonical, Ltd.
3 *
3 *
4 * This program is free software; you can redistribute it and/or modify
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
5 * it under the terms of the GNU General Public License as published by
@@ -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.4
18−import Ubuntu.Components 1.1
18+import Ubuntu.Components 1.3
19
19
20Item {
20Item {
21 id: root
21 id: root
@@ -33,7 +33,7 @@ Item {
33
33
34 objectName: "moreLessButton"
34 objectName: "moreLessButton"
35 text: !expanded ? i18n.tr("More...") : i18n.tr("Less...")
35 text: !expanded ? i18n.tr("More...") : i18n.tr("Less...")
36− strokeColor: Theme.palette.normal.baseText
36+ strokeColor: theme.palette.normal.baseText
37 onClicked: expanded = !expanded
37 onClicked: expanded = !expanded
38 width: parent.width
38 width: parent.width
39 }
39 }
qml/Dash/Previews/PreviewActions.qml+4−4
@@ -1,5 +1,5 @@
1/*
1/*
2− * Copyright (C) 2014 Canonical, Ltd.
2+ * Copyright (C) 2014,2015 Canonical, Ltd.
3 *
3 *
4 * This program is free software; you can redistribute it and/or modify
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
5 * it under the terms of the GNU General Public License as published by
@@ -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.1
17+import QtQuick 2.4
18−import Ubuntu.Components 1.1
18+import Ubuntu.Components 1.3
19
19
20/*! This preview widget shows either one button, two buttons or one button
20/*! This preview widget shows either one button, two buttons or one button
21 * and a combo button depending on the number of items in widgetData["actions"].
21 * and a combo button depending on the number of items in widgetData["actions"].
@@ -50,7 +50,7 @@ PreviewWidget {
50 Binding {
50 Binding {
51 target: loader.item
51 target: loader.item
52 property: "strokeColor"
52 property: "strokeColor"
53− value: root.scopeStyle ? root.scopeStyle.foreground : Theme.palette.normal.baseText
53+ value: root.scopeStyle ? root.scopeStyle.foreground : theme.palette.normal.baseText
54 }
54 }
55 Connections {
55 Connections {
56 target: loader.item
56 target: loader.item
qml/Dash/Previews/PreviewAudioPlayback.qml+7−7
@@ -1,5 +1,5 @@
1/*
1/*
2− * Copyright (C) 2014 Canonical, Ltd.
2+ * Copyright (C) 2014,2015 Canonical, Ltd.
3 *
3 *
4 * This program is free software; you can redistribute it and/or modify
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
5 * it under the terms of the GNU General Public License as published by
@@ -14,9 +14,9 @@
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.4
18import QtMultimedia 5.0
18import QtMultimedia 5.0
19−import Ubuntu.Components 0.1
19+import Ubuntu.Components 1.3
20
20
21/*! \brief Preview widget for audio tracks.
21/*! \brief Preview widget for audio tracks.
22
22
@@ -139,7 +139,7 @@ PreviewWidget {
139 objectName: "trackTitleLabel"
139 objectName: "trackTitleLabel"
140 anchors { top: parent.top; left: parent.left; right: parent.right }
140 anchors { top: parent.top; left: parent.left; right: parent.right }
141 opacity: 0.9
141 opacity: 0.9
142− color: scopeStyle ? scopeStyle.foreground : Theme.palette.normal.baseText
142+ color: scopeStyle ? scopeStyle.foreground : theme.palette.normal.baseText
143 fontSize: "small"
143 fontSize: "small"
144 horizontalAlignment: Text.AlignLeft
144 horizontalAlignment: Text.AlignLeft
145 text: modelData["title"]
145 text: modelData["title"]
@@ -152,7 +152,7 @@ PreviewWidget {
152 anchors { top: trackTitleLabel.bottom; left: parent.left; right: parent.right }
152 anchors { top: trackTitleLabel.bottom; left: parent.left; right: parent.right }
153 visible: text !== ""
153 visible: text !== ""
154 opacity: 0.9
154 opacity: 0.9
155− color: scopeStyle ? scopeStyle.foreground : Theme.palette.normal.baseText
155+ color: scopeStyle ? scopeStyle.foreground : theme.palette.normal.baseText
156 font.weight: Font.Light
156 font.weight: Font.Light
157 fontSize: "small"
157 fontSize: "small"
158 horizontalAlignment: Text.AlignLeft
158 horizontalAlignment: Text.AlignLeft
@@ -175,7 +175,7 @@ PreviewWidget {
175 }
175 }
176 height: units.dp(2)
176 height: units.dp(2)
177 visible: progressBarImage.visible
177 visible: progressBarImage.visible
178− color: UbuntuColors.orange
178+ backgroundColor: UbuntuColors.orange
179 }
179 }
180
180
181 Image {
181 Image {
@@ -193,7 +193,7 @@ PreviewWidget {
193 anchors.verticalCenter: parent.verticalCenter
193 anchors.verticalCenter: parent.verticalCenter
194 width: parent.column3Width
194 width: parent.column3Width
195 opacity: 0.9
195 opacity: 0.9
196− color: scopeStyle ? scopeStyle.foreground : Theme.palette.normal.baseText
196+ color: scopeStyle ? scopeStyle.foreground : theme.palette.normal.baseText
197 fontSize: "small"
197 fontSize: "small"
198 horizontalAlignment: Text.AlignRight
198 horizontalAlignment: Text.AlignRight
199 text: audio.lengthToString(modelData["length"])
199 text: audio.lengthToString(modelData["length"])
qml/Dash/Previews/PreviewComment.qml+2−2
@@ -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.4
18−import Ubuntu.Components 1.2
18+import Ubuntu.Components 1.3
19
19
20/*! \brief Preview widget for comments.
20/*! \brief Preview widget for comments.
21
21
qml/Dash/Previews/PreviewCommentInput.qml+2−2
@@ -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.4
18−import Ubuntu.Components 1.1
18+import Ubuntu.Components 1.3
19import "../../Components"
19import "../../Components"
20
20
21/*! \brief Preview widget for commenting.
21/*! \brief Preview widget for commenting.
qml/Dash/Previews/PreviewExpandable.qml+5−5
@@ -1,5 +1,5 @@
1/*
1/*
2− * Copyright (C) 2014 Canonical, Ltd.
2+ * Copyright (C) 2014,2015 Canonical, Ltd.
3 *
3 *
4 * This program is free software; you can redistribute it and/or modify
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
5 * it under the terms of the GNU General Public License as published by
@@ -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.3
17+import QtQuick 2.4
18−import Ubuntu.Components 1.1
18+import Ubuntu.Components 1.3
19import "../../Components"
19import "../../Components"
20
20
21/*! \brief Preview widget for expandable widgets.
21/*! \brief Preview widget for expandable widgets.
@@ -41,7 +41,7 @@ PreviewWidget {
41 right: expandButton.left
41 right: expandButton.left
42 }
42 }
43 fontSize: "large"
43 fontSize: "large"
44− color: root.scopeStyle ? root.scopeStyle.foreground : Theme.palette.normal.baseText
44+ color: root.scopeStyle ? root.scopeStyle.foreground : theme.palette.normal.baseText
45 visible: text !== ""
45 visible: text !== ""
46 opacity: .8
46 opacity: .8
47 text: widgetData["title"] || ""
47 text: widgetData["title"] || ""
@@ -62,7 +62,7 @@ PreviewWidget {
62 width: units.gu(3)
62 width: units.gu(3)
63 height: units.gu(3)
63 height: units.gu(3)
64 name: root.expanded ? "view-collapse" : "view-expand"
64 name: root.expanded ? "view-collapse" : "view-expand"
65− color: root.scopeStyle ? root.scopeStyle.foreground : Theme.palette.normal.baseText
65+ color: root.scopeStyle ? root.scopeStyle.foreground : theme.palette.normal.baseText
66 }
66 }
67 }
67 }
68
68
qml/Dash/Previews/PreviewHeader.qml+10−10
@@ -1,5 +1,5 @@
1/*
1/*
2− * Copyright (C) 2014 Canonical, Ltd.
2+ * Copyright (C) 2014,2015 Canonical, Ltd.
3 *
3 *
4 * This program is free software; you can redistribute it and/or modify
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
5 * it under the terms of the GNU General Public License as published by
@@ -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.4
18−import Ubuntu.Components 0.1
18+import Ubuntu.Components 1.3
19import Dash 0.1
19import Dash 0.1
20import "../"
20import "../"
21
21
@@ -40,10 +40,10 @@ PreviewWidget {
40 readonly property string title: root.widgetData["title"] || ""
40 readonly property string title: root.widgetData["title"] || ""
41 readonly property string subtitle: root.widgetData["subtitle"] || ""
41 readonly property string subtitle: root.widgetData["subtitle"] || ""
42 readonly property var attributes: root.widgetData["attributes"] || null
42 readonly property var attributes: root.widgetData["attributes"] || null
43− readonly property color fontColor: root.scopeStyle ? root.scopeStyle.foreground : Theme.palette.normal.baseText
43+ readonly property color fontColor: root.scopeStyle ? root.scopeStyle.foreground : theme.palette.normal.baseText
44
44
45 // Rewire the source since we may have unwired it on onStatusChanged
45 // Rewire the source since we may have unwired it on onStatusChanged
46− onMascotChanged: if (mascotShapeLoader.item) mascotShapeLoader.item.image.source = mascot;
46+ onMascotChanged: if (mascotShapeLoader.item) mascotShapeLoader.item.source.source = mascot;
47
47
48 implicitHeight: row.height + row.margins * 2
48 implicitHeight: row.height + row.margins * 2
49 width: parent.width
49 width: parent.width
@@ -77,16 +77,16 @@ PreviewWidget {
77
77
78 sourceComponent: UbuntuShape {
78 sourceComponent: UbuntuShape {
79 objectName: "mascotShape"
79 objectName: "mascotShape"
80− visible: image.status === Image.Ready
80+ visible: source.status === Image.Ready
81+ sourceFillMode: UbuntuShape.PreserveAspectCrop
82+ sourceHorizontalAlignment: UbuntuShape.AlignHCenter
83+ sourceVerticalAlignment: UbuntuShape.AlignVCenter
81− image: Image {
84+ source: Image {
82 source: headerRoot.mascot
85 source: headerRoot.mascot
83 width: source ? mascotShapeLoader.width : 0
86 width: source ? mascotShapeLoader.width : 0
84 height: mascotShapeLoader.height
87 height: mascotShapeLoader.height
85
88
86 sourceSize { width: mascotShapeLoader.maxSize; height: mascotShapeLoader.maxSize }
89 sourceSize { width: mascotShapeLoader.maxSize; height: mascotShapeLoader.maxSize }
87− fillMode: Image.PreserveAspectCrop
88− horizontalAlignment: Image.AlignHCenter
89− verticalAlignment: Image.AlignVCenter
90 onStatusChanged: if (status === Image.Error) source = headerRoot.fallback;
90 onStatusChanged: if (status === Image.Error) source = headerRoot.fallback;
91 }
91 }
92 }
92 }
qml/Dash/Previews/PreviewIconActions.qml+2−2
@@ -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.1
17+import QtQuick 2.4
18−import Ubuntu.Components 1.1
18+import Ubuntu.Components 1.3
19
19
20/*! This preview widget icons+label for number of items in widgetData["actions"].
20/*! This preview widget icons+label for number of items in widgetData["actions"].
21 * For each of the items we recognize the fields "label", "icon", "temporaryIcon" and "id".
21 * For each of the items we recognize the fields "label", "icon", "temporaryIcon" and "id".
qml/Dash/Previews/PreviewImageGallery.qml+3−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.4
18−import Ubuntu.Components 1.1
18+import Ubuntu.Components 1.3
19import "../../Components"
19import "../../Components"
20
20
21/*! This preview widget shows a horizontal list of images.
21/*! This preview widget shows a horizontal list of images.
@@ -62,7 +62,7 @@ PreviewWidget {
62 source: modelData ? modelData : ""
62 source: modelData ? modelData : ""
63 scaleTo: "height"
63 scaleTo: "height"
64 initialWidth: units.gu(13)
64 initialWidth: units.gu(13)
65− borderSource: mouseArea.pressed ? "radius_pressed.sci" : "radius_idle.sci"
65+ pressed: mouseArea.pressed
66
66
67 MouseArea {
67 MouseArea {
68 id: mouseArea
68 id: mouseArea
qml/Dash/Previews/PreviewMediaToolbar.qmlnew file+36
@@ -0,0 +1,36 @@
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.4
18+import Ubuntu.Components 1.3
19+import "../../Components"
20+
21+Rectangle {
22+ property alias shareData: sharingWidget.shareData
23+
24+ implicitHeight: units.gu(6)
25+ color: Qt.rgba(0, 0, 0, 0.8)
26+ visible: sharingWidget.visible
27+
28+ PreviewSharing {
29+ id: sharingWidget
30+ anchors {
31+ left: parent.left
32+ verticalCenter: parent.verticalCenter
33+ leftMargin: units.gu(1)
34+ }
35+ }
36+}
qml/Dash/Previews/PreviewOverlay.qml+4−4
@@ -1,5 +1,5 @@
1/*
1/*
2− * Copyright (C) 2014 Canonical, Ltd.
2+ * Copyright (C) 2014,2015 Canonical, Ltd.
3 *
3 *
4 * This program is free software; you can redistribute it and/or modify
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
5 * it under the terms of the GNU General Public License as published by
@@ -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.4
18−import Ubuntu.Components 1.1
18+import Ubuntu.Components 1.3
19import "../../Components"
19import "../../Components"
20
20
21Rectangle {
21Rectangle {
@@ -158,7 +158,7 @@ Rectangle {
158 anchors.centerIn: parent
158 anchors.centerIn: parent
159 width: units.gu(2.5)
159 width: units.gu(2.5)
160 height: width
160 height: width
161− color: Theme.palette.normal.foregroundText
161+ color: theme.palette.normal.foregroundText
162 name: "close"
162 name: "close"
163 }
163 }
164 }
164 }
qml/Dash/Previews/PreviewPayments.qml+2−2
@@ -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.1
17+import QtQuick 2.4
18−import Ubuntu.Components 0.1
18+import Ubuntu.Components 1.3
19import Ubuntu.Payments 0.1
19import Ubuntu.Payments 0.1
20
20
21/*! \brief Preview widget for a purchase button.
21/*! \brief Preview widget for a purchase button.
qml/Dash/Previews/PreviewProgress.qml+2−2
@@ -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.1
17+import QtQuick 2.4
18−import Ubuntu.Components 0.1
18+import Ubuntu.Components 1.3
19import Ubuntu.DownloadDaemonListener 0.1
19import Ubuntu.DownloadDaemonListener 0.1
20
20
21/*! \brief Preview widget for a progress bar.
21/*! \brief Preview widget for a progress bar.
qml/Dash/Previews/PreviewRatingDisplay.qml+4−4
@@ -1,5 +1,5 @@
1/*
1/*
2− * Copyright (C) 2014 Canonical, Ltd.
2+ * Copyright (C) 2014,2015 Canonical, Ltd.
3 *
3 *
4 * This program is free software; you can redistribute it and/or modify
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
5 * it under the terms of the GNU General Public License as published by
@@ -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.4
18−import Ubuntu.Components 0.1
18+import Ubuntu.Components 1.3
19import "../../Components"
19import "../../Components"
20
20
21/*! \brief Preview widget for rating display.
21/*! \brief Preview widget for rating display.
@@ -60,7 +60,7 @@ PreviewWidget {
60 urlIconEmpty: widgetData["rating-icon-empty"]
60 urlIconEmpty: widgetData["rating-icon-empty"]
61 urlIconFull: widgetData["rating-icon-full"]
61 urlIconFull: widgetData["rating-icon-full"]
62 urlIconHalf: widgetData["rating-icon-half"]
62 urlIconHalf: widgetData["rating-icon-half"]
63− labelColor: scopeStyle ? scopeStyle.foreground : Theme.palette.normal.baseText
63+ labelColor: scopeStyle ? scopeStyle.foreground : theme.palette.normal.baseText
64 }
64 }
65 }
65 }
66 }
66 }
qml/Dash/Previews/PreviewRatingEdit.qml+2−2
@@ -15,7 +15,7 @@
15 */
15 */
16
16
17import QtQuick 2.4
17import QtQuick 2.4
18−import Ubuntu.Components 0.1
18+import Ubuntu.Components 1.3
19import "../../Components"
19import "../../Components"
20
20
21/*! \brief Preview widget for editable rating.
21/*! \brief Preview widget for editable rating.
@@ -56,7 +56,7 @@ PreviewWidget {
56 urlIconEmpty: widgetData["rating-icon-empty"]
56 urlIconEmpty: widgetData["rating-icon-empty"]
57 urlIconFull: widgetData["rating-icon-full"]
57 urlIconFull: widgetData["rating-icon-full"]
58 urlIconHalf: widgetData["rating-icon-half"]
58 urlIconHalf: widgetData["rating-icon-half"]
59− labelColor: scopeStyle ? scopeStyle.foreground : Theme.palette.normal.baseText
59+ labelColor: scopeStyle ? scopeStyle.foreground : theme.palette.normal.baseText
60 }
60 }
61
61
62 PreviewRatingInput {
62 PreviewRatingInput {
qml/Dash/Previews/PreviewRatingInput.qml+6−6
@@ -1,5 +1,5 @@
1/*
1/*
2− * Copyright (C) 2014 Canonical, Ltd.
2+ * Copyright (C) 2014,2015 Canonical, Ltd.
3 *
3 *
4 * This program is free software; you can redistribute it and/or modify
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
5 * it under the terms of the GNU General Public License as published by
@@ -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.4
18−import Ubuntu.Components 0.1
18+import Ubuntu.Components 1.3
19import "../../Components"
19import "../../Components"
20
20
21/*! \brief Preview widget for rating.
21/*! \brief Preview widget for rating.
@@ -79,7 +79,7 @@ PreviewWidget {
79 verticalCenter: parent.verticalCenter
79 verticalCenter: parent.verticalCenter
80 left: parent.left
80 left: parent.left
81 }
81 }
82− color: root.scopeStyle ? root.scopeStyle.foreground : Theme.palette.normal.baseText
82+ color: root.scopeStyle ? root.scopeStyle.foreground : theme.palette.normal.baseText
83 opacity: .8
83 opacity: .8
84 text: widgetData["rating-label"] || i18n.tr("Rate this")
84 text: widgetData["rating-label"] || i18n.tr("Rate this")
85 }
85 }
@@ -124,7 +124,7 @@ PreviewWidget {
124 left: parent.left
124 left: parent.left
125 right: parent.right
125 right: parent.right
126 }
126 }
127− color: root.scopeStyle ? root.scopeStyle.foreground : Theme.palette.normal.baseText
127+ color: root.scopeStyle ? root.scopeStyle.foreground : theme.palette.normal.baseText
128 opacity: .8
128 opacity: .8
129 text: widgetData["review-label"] || i18n.tr("Add a review")
129 text: widgetData["review-label"] || i18n.tr("Add a review")
130 }
130 }
@@ -170,7 +170,7 @@ PreviewWidget {
170 top: parent.top
170 top: parent.top
171 right: parent.right
171 right: parent.right
172 }
172 }
173− color: readyToSubmit ? Theme.palette.selected.base : Theme.palette.normal.base
173+ color: readyToSubmit ? theme.palette.selected.base : theme.palette.normal.base
174 text: widgetData["submit-label"] || i18n.tr("Send")
174 text: widgetData["submit-label"] || i18n.tr("Send")
175 onClicked: {
175 onClicked: {
176 if (readyToSubmit) root.submit()
176 if (readyToSubmit) root.submit()
qml/Dash/Previews/PreviewRatingSingleDisplay.qml+1−1
@@ -15,7 +15,7 @@
15 */
15 */
16
16
17import QtQuick 2.4
17import QtQuick 2.4
18−import Ubuntu.Components 0.1
18+import Ubuntu.Components 1.3
19import "../../Components"
19import "../../Components"
20
20
21Column {
21Column {
qml/Dash/Previews/PreviewSharing.qmlnew file+105
@@ -0,0 +1,105 @@
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.4
18+import Ubuntu.Components 1.3
19+import Ubuntu.Content 1.1
20+
21+Item {
22+ id: root
23+ implicitHeight: button.height
24+ implicitWidth: button.width
25+
26+ property var shareData
27+ readonly property bool isUrlExternal: url && url.indexOf("file:///") != 0 && url.indexOf("/") != 0
28+ readonly property string contentType: shareData ? shareData["contentType"] : ""
29+ readonly property var url: shareData ? shareData["uri"] : ""
30+ readonly property Item rootItem: QuickUtils.rootItem(root)
31+
32+ visible: url != ""
33+
34+ AbstractButton {
35+ id: button
36+ height: units.gu(4)
37+ width: units.gu(4)
38+ onClicked: peerPicker.visible = true
39+
40+ Icon {
41+ anchors.centerIn: parent
42+ height: units.gu(3)
43+ width: units.gu(3)
44+ source: "image://theme/share"
45+ }
46+ }
47+
48+ Component {
49+ id: exportItemComponent
50+ ContentItem {
51+ name: i18n.tr("Preview Share Item")
52+ }
53+ }
54+
55+ Component {
56+ id: contentPeerComponent
57+ ContentPeerPicker {
58+ handler: ContentHandler.Share
59+ contentType: {
60+ // for now, treat all external urls as Links, or it will break contenthub
61+ if (root.isUrlExternal) return ContentType.Links;
62+
63+ switch(root.contentType) {
64+ case "all": return ContentType.All;
65+ case "contacts": return ContentType.Contacts;
66+ case "documents": return ContentType.Documents;
67+ case "links": return ContentType.Links;
68+ case "music": return ContentType.Music;
69+ case "pictures": return ContentType.Pictures;
70+ case "text": return ContentType.Text;
71+ default:
72+ case "unknown": return ContentType.Unknown;
73+ case "videos": return ContentType.Videos;
74+ }
75+ }
76+
77+ onPeerSelected: {
78+ var transfer = peer.request();
79+ if (transfer.state === ContentTransfer.InProgress) {
80+ var items = new Array();
81+ for (var i = 0; i < url.length; i++) {
82+ var exportItem = exportItemComponent.createObject();
83+ exportItem.url = url[i];
84+ items.push(exportItem);
85+ }
86+ transfer.items = items;
87+ transfer.state = ContentTransfer.Charged;
88+ }
89+ peerPicker.visible = false;
90+ }
91+ onCancelPressed: peerPicker.visible = false;
92+ }
93+ }
94+
95+ Loader {
96+ id: peerPicker
97+ objectName: "peerPicker"
98+ parent: rootItem
99+ anchors.fill: parent
100+ visible: false
101+ active: root.visible
102+
103+ sourceComponent: contentPeerComponent
104+ }
105+}
qml/Dash/Previews/PreviewTable.qml+5−5
@@ -1,5 +1,5 @@
1/*
1/*
2− * Copyright (C) 2014 Canonical, Ltd.
2+ * Copyright (C) 2014,2015 Canonical, Ltd.
3 *
3 *
4 * This program is free software; you can redistribute it and/or modify
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
5 * it under the terms of the GNU General Public License as published by
@@ -14,9 +14,9 @@
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.4
18import QtQuick.Layouts 1.1
18import QtQuick.Layouts 1.1
19−import Ubuntu.Components 0.1
19+import Ubuntu.Components 1.3
20import "../../Components"
20import "../../Components"
21
21
22/*! \brief Preview widget for table.
22/*! \brief Preview widget for table.
@@ -48,7 +48,7 @@ PreviewWidget {
48 }
48 }
49 height: visible ? implicitHeight : 0
49 height: visible ? implicitHeight : 0
50 fontSize: "large"
50 fontSize: "large"
51− color: root.scopeStyle ? root.scopeStyle.foreground : Theme.palette.normal.baseText
51+ color: root.scopeStyle ? root.scopeStyle.foreground : theme.palette.normal.baseText
52 visible: text !== ""
52 visible: text !== ""
53 opacity: .8
53 opacity: .8
54 text: widgetData["title"] || ""
54 text: widgetData["title"] || ""
@@ -72,7 +72,7 @@ PreviewWidget {
72 fontSize: "small"
72 fontSize: "small"
73 text: perRowRepeater.model[index]
73 text: perRowRepeater.model[index]
74 visible: root.expanded || rowIndex < maximumCollapsedRowCount
74 visible: root.expanded || rowIndex < maximumCollapsedRowCount
75− color: root.scopeStyle ? root.scopeStyle.foreground : Theme.palette.normal.baseText
75+ color: root.scopeStyle ? root.scopeStyle.foreground : theme.palette.normal.baseText
76 font.bold: index == 0
76 font.bold: index == 0
77 wrapMode: Text.Wrap
77 wrapMode: Text.Wrap
78 Layout.alignment: Qt.AlignTop
78 Layout.alignment: Qt.AlignTop
qml/Dash/Previews/PreviewTextSummary.qml+5−5
@@ -1,5 +1,5 @@
1/*
1/*
2− * Copyright (C) 2014 Canonical, Ltd.
2+ * Copyright (C) 2014,2015 Canonical, Ltd.
3 *
3 *
4 * This program is free software; you can redistribute it and/or modify
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
5 * it under the terms of the GNU General Public License as published by
@@ -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.4
18−import Ubuntu.Components 0.1
18+import Ubuntu.Components 1.3
19import "../../Components"
19import "../../Components"
20
20
21/*! \brief Preview widget for text.
21/*! \brief Preview widget for text.
@@ -39,7 +39,7 @@ PreviewWidget {
39 }
39 }
40 height: visible ? implicitHeight : 0
40 height: visible ? implicitHeight : 0
41 fontSize: "large"
41 fontSize: "large"
42− color: root.scopeStyle ? root.scopeStyle.foreground : Theme.palette.normal.baseText
42+ color: root.scopeStyle ? root.scopeStyle.foreground : theme.palette.normal.baseText
43 visible: text !== ""
43 visible: text !== ""
44 opacity: .8
44 opacity: .8
45 text: widgetData["title"] || ""
45 text: widgetData["title"] || ""
@@ -61,7 +61,7 @@ PreviewWidget {
61 clip: true
61 clip: true
62 fontSize: "small"
62 fontSize: "small"
63 lineHeight: 1.2
63 lineHeight: 1.2
64− color: root.scopeStyle ? root.scopeStyle.foreground : Theme.palette.normal.baseText
64+ color: root.scopeStyle ? root.scopeStyle.foreground : theme.palette.normal.baseText
65 opacity: .8
65 opacity: .8
66 text: widgetData["text"] || ""
66 text: widgetData["text"] || ""
67 wrapMode: Text.Wrap
67 wrapMode: Text.Wrap
qml/Dash/Previews/PreviewVideoPlayback.qml+15−2
@@ -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.4
18−import Ubuntu.Components 0.1
18+import Ubuntu.Components 1.3
19import Ubuntu.Thumbnailer 0.1
19import Ubuntu.Thumbnailer 0.1
20import "../../Components"
20import "../../Components"
21
21
@@ -30,6 +30,8 @@ PreviewWidget {
30 implicitWidth: units.gu(35)
30 implicitWidth: units.gu(35)
31 implicitHeight: childrenRect.height
31 implicitHeight: childrenRect.height
32
32
33+ widgetMargins: -units.gu(1)
34+
33 LazyImage {
35 LazyImage {
34 objectName: "screenshot"
36 objectName: "screenshot"
35 anchors {
37 anchors {
@@ -51,6 +53,7 @@ PreviewWidget {
51 return "";
53 return "";
52 }
54 }
53 initialHeight: width * 10 / 16
55 initialHeight: width * 10 / 16
56+ useUbuntuShape: false
54
57
55 Image {
58 Image {
56 objectName: "playButton"
59 objectName: "playButton"
@@ -70,5 +73,15 @@ PreviewWidget {
70 anchors.fill: parent
73 anchors.fill: parent
71 onClicked: Qt.openUrlExternally(widgetData["source"])
74 onClicked: Qt.openUrlExternally(widgetData["source"])
72 }
75 }
76+
77+ PreviewMediaToolbar {
78+ id: toolbar
79+ anchors {
80+ left: parent.left
81+ right: parent.right
82+ bottom: parent.bottom
83+ }
84+ shareData: widgetData["shareData"]
85+ }
73 }
86 }
74}
87}
qml/Dash/Previews/PreviewWidget.qml+4−1
@@ -14,7 +14,7 @@
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.4
18
18
19/*! Interface for preview widgets. */
19/*! Interface for preview widgets. */
20
20
@@ -34,6 +34,9 @@ Item {
34 //! Should the widget show in expanded mode (For those that support it)
34 //! Should the widget show in expanded mode (For those that support it)
35 property bool expanded: true
35 property bool expanded: true
36
36
37+ //! Set margins width.
38+ property real widgetMargins: units.gu(1)
39+
37 /*! \brief This signal should be emitted when a preview action was triggered.
40 /*! \brief This signal should be emitted when a preview action was triggered.
38 *
41 *
39 * \param widgetId, actionId Respective identifiers from widgetData.
42 * \param widgetId, actionId Respective identifiers from widgetData.
qml/Dash/Previews/PreviewWidgetFactory.qml+4−1
@@ -15,7 +15,7 @@
15 *
15 *
16 */
16 */
17
17
18−import QtQuick 2.0
18+import QtQuick 2.4
19
19
20//! \brief This component loads the widgets based on widgetData["type"].
20//! \brief This component loads the widgets based on widgetData["type"].
21
21
@@ -40,6 +40,9 @@ Loader {
40 //! Set to true if the parent preview is displayed.
40 //! Set to true if the parent preview is displayed.
41 property bool isCurrentPreview: false
41 property bool isCurrentPreview: false
42
42
43+ //! Set margins width.
44+ property real widgetMargins: status === Loader.Ready ? item.widgetMargins : units.gu(1)
45+
43 //! Triggered signal forwarded from the widgets.
46 //! Triggered signal forwarded from the widgets.
44 signal triggered(string widgetId, string actionId, var data)
47 signal triggered(string widgetId, string actionId, var data)
45
48
qml/Dash/Previews/PreviewZoomableImage.qml+21−9
@@ -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.4
18−import Ubuntu.Components 0.1
18+import Ubuntu.Components 1.3
19import "../../Components"
19import "../../Components"
20
20
21/*! \brief Preview widget for image.
21/*! \brief Preview widget for image.
@@ -27,7 +27,10 @@ import "../../Components"
27
27
28PreviewWidget {
28PreviewWidget {
29 id: root
29 id: root
30+ implicitWidth: units.gu(35)
30− implicitHeight: units.gu(22)
31+ implicitHeight: lazyImage.height
32+
33+ widgetMargins: -units.gu(1)
31
34
32 property Item rootItem: QuickUtils.rootItem(root)
35 property Item rootItem: QuickUtils.rootItem(root)
33
36
@@ -35,15 +38,14 @@ PreviewWidget {
35 id: lazyImage
38 id: lazyImage
36 objectName: "lazyImage"
39 objectName: "lazyImage"
37 anchors {
40 anchors {
38− top: parent.top
41+ left: parent.left
39− bottom: parent.bottom
42+ right: parent.right
40− horizontalCenter: parent.horizontalCenter
41 }
43 }
42− scaleTo: "height"
44+ scaleTo: "width"
43 source: widgetData["source"]
45 source: widgetData["source"]
44 asynchronous: true
46 asynchronous: true
45−
47+ useUbuntuShape: false
46− borderSource: mouseArea.pressed ? "radius_pressed.sci" : "radius_idle.sci"
48+ pressed: mouseArea.pressed
47
49
48 MouseArea {
50 MouseArea {
49 id: mouseArea
51 id: mouseArea
@@ -62,6 +64,16 @@ PreviewWidget {
62 // But at the moment the model never changes
64 // But at the moment the model never changes
63 onStatusChanged: if (lazyImage.sourceImage.status === Image.Error) lazyImage.sourceImage.source = widgetData["fallback"];
65 onStatusChanged: if (lazyImage.sourceImage.status === Image.Error) lazyImage.sourceImage.source = widgetData["fallback"];
64 }
66 }
67+
68+ PreviewMediaToolbar {
69+ id: toolbar
70+ anchors {
71+ left: parent.left
72+ right: parent.right
73+ bottom: parent.bottom
74+ }
75+ shareData: widgetData["shareData"]
76+ }
65 }
77 }
66
78
67 PreviewOverlay {
79 PreviewOverlay {
qml/Dash/PullToRefreshScopeStyle.qml+3−3
@@ -14,9 +14,9 @@
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.3
17+import QtQuick 2.4
18−import Ubuntu.Components 1.1
18+import Ubuntu.Components 1.3
19−import Ubuntu.Components.Styles 1.1
19+import Ubuntu.Components.Styles 1.3
20
20
21/**
21/**
22 * TODO: Once the SDK version of PullToRefreshStyle doesn't have bug 1375799
22 * TODO: Once the SDK version of PullToRefreshStyle doesn't have bug 1375799
qml/Dash/ScopeListView.qml+1−1
@@ -14,7 +14,7 @@
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.4
18import Dash 0.1
18import Dash 0.1
19
19
20ListViewWithPageHeader {
20ListViewWithPageHeader {
qml/Dash/ScopeSettings/ScopeSetting.qml+11−2
@@ -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.2
17+import QtQuick 2.4
18−import Ubuntu.Components 1.1
18+import Ubuntu.Components 1.3
19
19
20/*! Interface for settings widgets. */
20/*! Interface for settings widgets. */
21
21
@@ -32,6 +32,15 @@ Item {
32 */
32 */
33 signal updated(var value)
33 signal updated(var value)
34
34
35+ /*! \brief This signal should be emitted when widget gains the focus
36+ * and input method popups.
37+ * And preview widget should reposition in visible area to avoid
38+ * keyboard appears over the widget.
39+ *
40+ * \param item, id of specified item which is needed to reposition.
41+ */
42+ signal makeSureVisible(var item)
43+
35 //! \internal
44 //! \internal
36 readonly property real settingMargins: units.gu(2)
45 readonly property real settingMargins: units.gu(2)
37}
46}
qml/Dash/ScopeSettings/ScopeSettingBoolean.qml+5−5
@@ -1,5 +1,5 @@
1/*
1/*
2− * Copyright (C) 2014 Canonical, Ltd.
2+ * Copyright (C) 2015 Canonical, Ltd.
3 *
3 *
4 * This program is free software; you can redistribute it and/or modify
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
5 * it under the terms of the GNU General Public License as published by
@@ -14,9 +14,9 @@
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.2
17+import QtQuick 2.4
18−import Ubuntu.Components 1.1
18+import Ubuntu.Components 1.3
19−import Ubuntu.Components.ListItems 1.0 as ListItem
19+import Ubuntu.Components.ListItems 1.3 as ListItem
20
20
21ScopeSetting {
21ScopeSetting {
22 id: root
22 id: root
@@ -44,7 +44,7 @@ ScopeSetting {
44 elide: Text.ElideMiddle
44 elide: Text.ElideMiddle
45 maximumLineCount: 2
45 maximumLineCount: 2
46 wrapMode: Text.Wrap
46 wrapMode: Text.Wrap
47− color: scopeStyle ? scopeStyle.foreground : Theme.palette.normal.baseText
47+ color: scopeStyle ? scopeStyle.foreground : theme.palette.normal.baseText
48 }
48 }
49
49
50 CheckBox {
50 CheckBox {
qml/Dash/ScopeSettings/ScopeSettingList.qml+3−3
@@ -14,9 +14,9 @@
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.2
17+import QtQuick 2.4
18−import Ubuntu.Components 1.1
18+import Ubuntu.Components 1.3
19−import Ubuntu.Components.ListItems 1.0 as ListItem
19+import Ubuntu.Components.ListItems 1.3 as ListItem
20
20
21ScopeSetting {
21ScopeSetting {
22 id: root
22 id: root
qml/Dash/ScopeSettings/ScopeSettingNumber.qml+1−1
@@ -14,7 +14,7 @@
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.2
17+import QtQuick 2.4
18
18
19ScopeSettingString {
19ScopeSettingString {
20 mode: "number"
20 mode: "number"
qml/Dash/ScopeSettings/ScopeSettingString.qml+12−6
@@ -1,5 +1,5 @@
1/*
1/*
2− * Copyright (C) 2014 Canonical, Ltd.
2+ * Copyright (C) 2015 Canonical, Ltd.
3 *
3 *
4 * This program is free software; you can redistribute it and/or modify
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
5 * it under the terms of the GNU General Public License as published by
@@ -14,9 +14,9 @@
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.2
17+import QtQuick 2.4
18−import Ubuntu.Components 1.1
18+import Ubuntu.Components 1.3
19−import Ubuntu.Components.ListItems 1.0 as ListItem
19+import Ubuntu.Components.ListItems 1.3 as ListItem
20
20
21ScopeSetting {
21ScopeSetting {
22 id: root
22 id: root
@@ -44,7 +44,7 @@ ScopeSetting {
44 elide: Text.ElideMiddle
44 elide: Text.ElideMiddle
45 maximumLineCount: 2
45 maximumLineCount: 2
46 wrapMode: Text.Wrap
46 wrapMode: Text.Wrap
47− color: scopeStyle ? scopeStyle.foreground : Theme.palette.normal.baseText
47+ color: scopeStyle ? scopeStyle.foreground : theme.palette.normal.baseText
48 }
48 }
49
49
50 TextField {
50 TextField {
@@ -57,7 +57,7 @@ ScopeSetting {
57 }
57 }
58 width: root.mode == "number" ? units.gu(8) : units.gu(12)
58 width: root.mode == "number" ? units.gu(8) : units.gu(12)
59 text: widgetData.value
59 text: widgetData.value
60− color: scopeStyle ? scopeStyle.foreground : Theme.palette.normal.fieldText
60+ color: scopeStyle ? scopeStyle.foreground : theme.palette.normal.fieldText
61 validator: root.mode == "number" ? doubleValidator : null
61 validator: root.mode == "number" ? doubleValidator : null
62 hasClearButton: root.mode == "number" ? false : true
62 hasClearButton: root.mode == "number" ? false : true
63
63
@@ -78,6 +78,12 @@ ScopeSetting {
78 updateText();
78 updateText();
79 }
79 }
80 }
80 }
81+
82+ readonly property bool inputMethodVisible: Qt.inputMethod.visible
83+ onInputMethodVisibleChanged: {
84+ if(inputMethodVisible && activeFocus)
85+ root.makeSureVisible(control);
86+ }
81 }
87 }
82 }
88 }
83}
89}
qml/Dash/ScopeSettings/ScopeSettingsWidgetFactory.qml+5−1
@@ -14,7 +14,7 @@
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.2
17+import QtQuick 2.4
18
18
19//! \brief This component loads the widgets based on type.
19//! \brief This component loads the widgets based on type.
20
20
@@ -30,6 +30,9 @@ Loader {
30 //! Triggered signal forwarded from the widgets.
30 //! Triggered signal forwarded from the widgets.
31 signal updated(var value)
31 signal updated(var value)
32
32
33+ //! makeSureVisible signal forwarded from the widgets.
34+ signal makeSureVisible(var item)
35+
33 source: widgetSource
36 source: widgetSource
34
37
35 //! \cond private
38 //! \cond private
@@ -53,5 +56,6 @@ Loader {
53 Connections {
56 Connections {
54 target: root.item
57 target: root.item
55 onUpdated: if (value !== widgetData.value) root.updated(value)
58 onUpdated: if (value !== widgetData.value) root.updated(value)
59+ onMakeSureVisible: root.makeSureVisible(item)
56 }
60 }
57}
61}
qml/Dash/ScopeSettingsPage.qml+12−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.2
17+import QtQuick 2.4
18−import Ubuntu.Components 1.1
18+import Ubuntu.Components 1.3
19import Unity 0.2
19import Unity 0.2
20import "../Components"
20import "../Components"
21import "ScopeSettings"
21import "ScopeSettings"
@@ -28,7 +28,7 @@ Item {
28
28
29 signal backClicked()
29 signal backClicked()
30
30
31− PageHeader {
31+ DashPageHeader {
32 id: header
32 id: header
33 objectName: "pageHeader"
33 objectName: "pageHeader"
34 width: parent.width
34 width: parent.width
@@ -51,6 +51,11 @@ Item {
51 model: root.scope ? root.scope.settings : null
51 model: root.scope ? root.scope.settings : null
52 clip: true
52 clip: true
53
53
54+ ListViewOSKScroller {
55+ id: oskScroller
56+ list: scopeSettings
57+ }
58+
54 delegate: ScopeSettingsWidgetFactory {
59 delegate: ScopeSettingsWidgetFactory {
55 objectName: "scopeSettingItem" + index
60 objectName: "scopeSettingItem" + index
56 width: root.width
61 width: root.width
@@ -58,6 +63,10 @@ Item {
58 scopeStyle: root.scopeStyle
63 scopeStyle: root.scopeStyle
59
64
60 onUpdated: model.value = value;
65 onUpdated: model.value = value;
66+
67+ onMakeSureVisible: { // var item
68+ oskScroller.setMakeSureVisibleItem(item);
69+ }
61 }
70 }
62 }
71 }
63}
72}
qml/Dash/ScopesList.qml+2−2
@@ -14,7 +14,7 @@
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.3
17+import QtQuick 2.4
18import Dash 0.1
18import Dash 0.1
19
19
20Item {
20Item {
@@ -61,7 +61,7 @@ Item {
61 value: root.scope ? root.scope.searchQuery : ""
61 value: root.scope ? root.scope.searchQuery : ""
62 }
62 }
63
63
64− PageHeader {
64+ DashPageHeader {
65 id: header
65 id: header
66 objectName: "pageHeader"
66 objectName: "pageHeader"
67 title: i18n.tr("Manage")
67 title: i18n.tr("Manage")
qml/Dash/ScopesListCategory.qml+4−4
@@ -1,5 +1,5 @@
1/*
1/*
2− * Copyright (C) 2014 Canonical, Ltd.
2+ * Copyright (C) 2014,2015 Canonical, Ltd.
3 *
3 *
4 * This program is free software; you can redistribute it and/or modify
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
5 * it under the terms of the GNU General Public License as published by
@@ -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.3
17+import QtQuick 2.4
18−import Ubuntu.Components 1.1
18+import Ubuntu.Components 1.3
19import Dash 0.1
19import Dash 0.1
20import "../Components/ListItems" as ListItems
20import "../Components/ListItems" as ListItems
21
21
@@ -43,7 +43,7 @@ Item {
43 id: header
43 id: header
44 width: root.width
44 width: root.width
45 height: units.gu(5)
45 height: units.gu(5)
46− color: scopeStyle ? scopeStyle.foreground : Theme.palette.normal.baseText
46+ color: scopeStyle ? scopeStyle.foreground : theme.palette.normal.baseText
47 }
47 }
48
48
49 readonly property double listItemHeight: units.gu(6)
49 readonly property double listItemHeight: units.gu(6)
qml/Dash/ScopesListCategoryItem.qml+4−4
@@ -14,9 +14,9 @@
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.3
17+import QtQuick 2.4
18import QtQuick.Layouts 1.1
18import QtQuick.Layouts 1.1
19−import Ubuntu.Components 1.1
19+import Ubuntu.Components 1.3
20
20
21MouseArea {
21MouseArea {
22 id: root
22 id: root
@@ -49,10 +49,10 @@ MouseArea {
49 width: units.gu(5)
49 width: units.gu(5)
50 height: units.gu(5)
50 height: units.gu(5)
51 visible: !hideChildren
51 visible: !hideChildren
52+ sourceFillMode: UbuntuShape.PreserveAspectCrop
52− image: Image {
53+ source: Image {
53 id: shapeImage
54 id: shapeImage
54 cache: true
55 cache: true
55− fillMode: Image.PreserveAspectCrop
56 sourceSize { width: shape.width; height: shape.height }
56 sourceSize { width: shape.width; height: shape.height }
57 }
57 }
58 }
58 }
qml/DeviceConfiguration.qml+3−1
@@ -14,7 +14,7 @@
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.4
18
18
19QtObject {
19QtObject {
20 id: root
20 id: root
@@ -98,6 +98,7 @@ QtObject {
98 PropertyChanges {
98 PropertyChanges {
99 target: priv
99 target: priv
100 landscapeOrientation: Qt.InvertedLandscapeOrientation
100 landscapeOrientation: Qt.InvertedLandscapeOrientation
101+ invertedLandscapeOrientation: Qt.LandscapeOrientation
101 primaryOrientation: Qt.InvertedLandscapeOrientation
102 primaryOrientation: Qt.InvertedLandscapeOrientation
102 category: "tablet"
103 category: "tablet"
103 }
104 }
@@ -107,6 +108,7 @@ QtObject {
107 PropertyChanges {
108 PropertyChanges {
108 target: priv
109 target: priv
109 category: "desktop"
110 category: "desktop"
111+ supportedOrientations: root.useNativeOrientation
110 }
112 }
111 }
113 }
112 ]
114 ]
qml/Greeter/Clock.qml+2−2
@@ -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.4
18−import Ubuntu.Components 0.1
18+import Ubuntu.Components 1.3
19import "../Panel/Indicators"
19import "../Panel/Indicators"
20import Unity.Indicators 0.1 as Indicators
20import Unity.Indicators 0.1 as Indicators
21
21
qml/Greeter/CoverPage.qml+2−2
@@ -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.3
17+import QtQuick 2.4
18−import Ubuntu.Components 1.1
18+import Ubuntu.Components 1.3
19import Ubuntu.Gestures 0.1
19import Ubuntu.Gestures 0.1
20import "../Components"
20import "../Components"
21
21
qml/Greeter/Dot.qml+1−1
@@ -14,7 +14,7 @@
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.4
18
18
19Image {
19Image {
20 states: [
20 states: [
qml/Greeter/Greeter.qml+2−2
@@ -14,10 +14,10 @@
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.3
17+import QtQuick 2.4
18import AccountsService 0.1
18import AccountsService 0.1
19import GSettings 1.0
19import GSettings 1.0
20−import Ubuntu.Components 1.1
20+import Ubuntu.Components 1.3
21import Ubuntu.SystemImage 0.1
21import Ubuntu.SystemImage 0.1
22import Unity.Launcher 0.1
22import Unity.Launcher 0.1
23import "../Components"
23import "../Components"
qml/Greeter/Infographics.qml+2−2
@@ -16,8 +16,8 @@
16
16
17import "../Components"
17import "../Components"
18import "Gradient.js" as Gradient
18import "Gradient.js" as Gradient
19−import QtQuick 2.0
19+import QtQuick 2.4
20−import Ubuntu.Components 0.1
20+import Ubuntu.Components 1.3
21
21
22Item {
22Item {
23 id: infographic
23 id: infographic
qml/Greeter/IntegratedLightDMImpl.qml+1−1
@@ -14,7 +14,7 @@
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.3
17+import QtQuick 2.4
18import IntegratedLightDM 0.1 as LightDM
18import IntegratedLightDM 0.1 as LightDM
19
19
20Item{
20Item{
qml/Greeter/LightDM.qml+1−1
@@ -19,7 +19,7 @@
19 * plugin
19 * plugin
20 */
20 */
21
21
22−import QtQuick 2.3
22+import QtQuick 2.4
23
23
24Loader {
24Loader {
25 id: loader
25 id: loader
qml/Greeter/LoginList.qml+2−2
@@ -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.3
17+import QtQuick 2.4
18−import Ubuntu.Components 1.1
18+import Ubuntu.Components 1.3
19import "../Components"
19import "../Components"
20
20
21Item {
21Item {
qml/Greeter/NarrowView.qml+2−2
@@ -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.3
17+import QtQuick 2.4
18−import Ubuntu.Components 1.1
18+import Ubuntu.Components 1.3
19import "../Components"
19import "../Components"
20
20
21FocusScope {
21FocusScope {
qml/Greeter/ObjectPositioner.qml+2−2
@@ -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.4
18−import Ubuntu.Components 0.1
18+import Ubuntu.Components 1.3
19
19
20Item {
20Item {
21 property int count
21 property int count
qml/Greeter/ShimGreeter.qml+1−1
@@ -14,7 +14,7 @@
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.3
17+import QtQuick 2.4
18
18
19/*
19/*
20 * This is a shim greeter that is only used to provide a shell,
20 * This is a shim greeter that is only used to provide a shell,
qml/Greeter/WideView.qml+2−2
@@ -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.3
17+import QtQuick 2.4
18−import Ubuntu.Components 1.1
18+import Ubuntu.Components 1.3
19
19
20FocusScope {
20FocusScope {
21 id: root
21 id: root
qml/Launcher/FoldingLauncherDelegate.qml+2−2
@@ -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.4
18−import Ubuntu.Components 0.1
18+import Ubuntu.Components 1.3
19
19
20LauncherDelegate {
20LauncherDelegate {
21 id: root
21 id: root
qml/Launcher/Launcher.qml+2−2
@@ -14,9 +14,9 @@
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.4
18import "../Components"
18import "../Components"
19−import Ubuntu.Components 0.1
19+import Ubuntu.Components 1.3
20import Ubuntu.Gestures 0.1
20import Ubuntu.Gestures 0.1
21import Unity.Launcher 0.1
21import Unity.Launcher 0.1
22
22
qml/Launcher/LauncherDelegate.qml+7−8
@@ -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.4
18−import Ubuntu.Components 1.1
18+import Ubuntu.Components 1.3
19
19
20Item {
20Item {
21 id: root
21 id: root
@@ -130,13 +130,12 @@ Item {
130 anchors.fill: parent
130 anchors.fill: parent
131 anchors.margins: units.gu(1)
131 anchors.margins: units.gu(1)
132 radius: "medium"
132 radius: "medium"
133− borderSource: "none"
133+ aspect: UbuntuShape.Flat
134−
134+ sourceFillMode: UbuntuShape.PreserveAspectCrop
135− image: Image {
135+ source: Image {
136 id: iconImage
136 id: iconImage
137 sourceSize.width: iconShape.width
137 sourceSize.width: iconShape.width
138 sourceSize.height: iconShape.height
138 sourceSize.height: iconShape.height
139− fillMode: Image.PreserveAspectCrop
140 source: root.iconName
139 source: root.iconName
141 }
140 }
142 }
141 }
@@ -159,9 +158,9 @@ Item {
159 }
158 }
160 width: Math.min(root.itemWidth, Math.max(units.gu(2), countLabel.implicitWidth + units.gu(1)))
159 width: Math.min(root.itemWidth, Math.max(units.gu(2), countLabel.implicitWidth + units.gu(1)))
161 height: units.gu(2)
160 height: units.gu(2)
162− color: UbuntuColors.orange
161+ backgroundColor: UbuntuColors.orange
163 visible: root.countVisible
162 visible: root.countVisible
164− borderSource: "none"
163+ aspect: UbuntuShape.Flat
165
164
166 Label {
165 Label {
167 id: countLabel
166 id: countLabel
qml/Launcher/LauncherPanel.qml+6−6
@@ -14,11 +14,11 @@
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.3
17+import QtQuick 2.4
18−import Ubuntu.Components 1.2
18+import Ubuntu.Components 1.3
19−import Ubuntu.Components.ListItems 1.0 as ListItems
19+import Ubuntu.Components.ListItems 1.3 as ListItems
20import Unity.Launcher 0.1
20import Unity.Launcher 0.1
21−import Ubuntu.Components.Popups 0.1
21+import Ubuntu.Components.Popups 1.3
22import "../Components/ListItems"
22import "../Components/ListItems"
23import "../Components/"
23import "../Components/"
24
24
@@ -61,8 +61,8 @@ Rectangle {
61 fill: parent
61 fill: parent
62 topMargin: -units.gu(2)
62 topMargin: -units.gu(2)
63 }
63 }
64− borderSource: "none"
64+ aspect: UbuntuShape.Flat
65− color: UbuntuColors.orange
65+ backgroundColor: UbuntuColors.orange
66 }
66 }
67
67
68 Image {
68 Image {
qml/Notifications/Notification.qml+14−15
@@ -14,14 +14,14 @@
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.4
18−import QtMultimedia 5.0
19import Powerd 0.1
18import Powerd 0.1
20−import Ubuntu.Components 1.2
19+import Ubuntu.Components 1.3
20+import Ubuntu.Components.ListItems 1.3 as ListItem
21import Unity.Notifications 1.0
21import Unity.Notifications 1.0
22import QMenuModel 0.1
22import QMenuModel 0.1
23import Utils 0.1
23import Utils 0.1
24−import Ubuntu.Components.ListItems 0.1 as ListItem
24+import "../Components"
25
25
26Item {
26Item {
27 id: notification
27 id: notification
@@ -80,10 +80,9 @@ Item {
80 return result;
80 return result;
81 }
81 }
82
82
83− Audio {
83+ NotificationAudio {
84 id: sound
84 id: sound
85 objectName: "sound"
85 objectName: "sound"
86− audioRole: MediaPlayer.alert
87 source: hints["suppress-sound"] !== "true" && hints["sound-file"] !== undefined ? hints["sound-file"] : ""
86 source: hints["suppress-sound"] !== "true" && hints["sound-file"] !== undefined ? hints["sound-file"] : ""
88 }
87 }
89
88
@@ -153,10 +152,10 @@ Item {
153 rightMargin: notification.margins
152 rightMargin: notification.margins
154 topMargin: type === Notification.Confirmation ? units.gu(.5) : 0
153 topMargin: type === Notification.Confirmation ? units.gu(.5) : 0
155 }
154 }
156− color: parent.color
155+ backgroundColor: parent.color
157 opacity: parent.opacity
156 opacity: parent.opacity
158 radius: "medium"
157 radius: "medium"
159− borderSource: "none"
158+ aspect: UbuntuShape.Flat
160 }
159 }
161
160
162 Rectangle {
161 Rectangle {
@@ -282,7 +281,7 @@ Item {
282 }
281 }
283 visible: type !== Notification.Confirmation
282 visible: type !== Notification.Confirmation
284 fontSize: "medium"
283 fontSize: "medium"
285− color: darkOnBright ? sdFontColor : Theme.palette.selected.backgroundText
284+ color: darkOnBright ? sdFontColor : theme.palette.selected.backgroundText
286 elide: Text.ElideRight
285 elide: Text.ElideRight
287 textFormat: Text.PlainText
286 textFormat: Text.PlainText
288 }
287 }
@@ -297,7 +296,7 @@ Item {
297 }
296 }
298 visible: body != "" && type !== Notification.Confirmation
297 visible: body != "" && type !== Notification.Confirmation
299 fontSize: "small"
298 fontSize: "small"
300− color: darkOnBright ? sdFontColor : Theme.palette.selected.backgroundText
299+ color: darkOnBright ? sdFontColor : theme.palette.selected.backgroundText
301 wrapMode: Text.WordWrap
300 wrapMode: Text.WordWrap
302 maximumLineCount: type == Notification.SnapDecision ? 12 : 2
301 maximumLineCount: type == Notification.SnapDecision ? 12 : 2
303 elide: Text.ElideRight
302 elide: Text.ElideRight
@@ -338,7 +337,7 @@ Item {
338 anchors.horizontalCenter: parent.horizontalCenter
337 anchors.horizontalCenter: parent.horizontalCenter
339 visible: type === Notification.Confirmation && body !== ""
338 visible: type === Notification.Confirmation && body !== ""
340 fontSize: "medium"
339 fontSize: "medium"
341− color: darkOnBright ? sdFontColor : Theme.palette.selected.backgroundText
340+ color: darkOnBright ? sdFontColor : theme.palette.selected.backgroundText
342 wrapMode: Text.WordWrap
341 wrapMode: Text.WordWrap
343 maximumLineCount: 1
342 maximumLineCount: 1
344 elide: Text.ElideRight
343 elide: Text.ElideRight
@@ -358,8 +357,8 @@ Item {
358 }
357 }
359
358
360 height: units.gu(1)
359 height: units.gu(1)
361− color: darkOnBright ? UbuntuColors.darkGrey : UbuntuColors.lightGrey
360+ backgroundColor: darkOnBright ? UbuntuColors.darkGrey : UbuntuColors.lightGrey
362− borderSource: "none"
361+ aspect: UbuntuShape.Flat
363 radius: "small"
362 radius: "small"
364
363
365 UbuntuShape {
364 UbuntuShape {
@@ -367,8 +366,8 @@ Item {
367 objectName: "innerBar"
366 objectName: "innerBar"
368 width: valueIndicator.width * valueIndicator.value / 100
367 width: valueIndicator.width * valueIndicator.value / 100
369 height: units.gu(1)
368 height: units.gu(1)
370− color: notification.hints["x-canonical-value-bar-tint"] === "true" ? UbuntuColors.orange : darkOnBright ? UbuntuColors.lightGrey : "white"
369+ backgroundColor: notification.hints["x-canonical-value-bar-tint"] === "true" ? UbuntuColors.orange : darkOnBright ? UbuntuColors.lightGrey : "white"
371− borderSource: "none"
370+ aspect: UbuntuShape.Flat
372 radius: "small"
371 radius: "small"
373 }
372 }
374 }
373 }
qml/Notifications/NotificationMenuItemFactory.qml+2−2
@@ -17,8 +17,8 @@
17 * Nick Dedekind <nick.dedekind@canonical.com>
17 * Nick Dedekind <nick.dedekind@canonical.com>
18 */
18 */
19
19
20−import QtQuick 2.0
20+import QtQuick 2.4
21−import Ubuntu.Components 0.1
21+import Ubuntu.Components 1.3
22import QMenuModel 0.1
22import QMenuModel 0.1
23import "../Components"
23import "../Components"
24
24
qml/Notifications/Notifications.qml+2−2
@@ -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.4
18−import Ubuntu.Components 0.1
18+import Ubuntu.Components 1.3
19import Unity.Notifications 1.0 as UnityNotifications
19import Unity.Notifications 1.0 as UnityNotifications
20import Utils 0.1
20import Utils 0.1
21import "../Components"
21import "../Components"
qml/Notifications/OptionToggle.qml+7−7
@@ -1,5 +1,5 @@
1/*
1/*
2− * Copyright (C) 2014 Canonical, Ltd.
2+ * Copyright (C) 2014,2015 Canonical, Ltd.
3 *
3 *
4 * This program is free software; you can redistribute it and/or modify
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
5 * it under the terms of the GNU General Public License as published by
@@ -14,10 +14,10 @@
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.4
18−import Ubuntu.Components 0.1
18+import Ubuntu.Components 1.3
19−import Ubuntu.Components.ListItems 0.1 as ListItem
19+import Ubuntu.Components.ListItems 1.3 as ListItem
20−import Ubuntu.Components.Popups 0.1
20+import Ubuntu.Components.Popups 1.3
21
21
22UbuntuShape {
22UbuntuShape {
23 id: optionToggle
23 id: optionToggle
@@ -29,8 +29,8 @@ UbuntuShape {
29
29
30 signal triggered(string id)
30 signal triggered(string id)
31
31
32− color: Theme.palette.normal.base
32+ backgroundColor: theme.palette.normal.base
33− borderSource: "none"
33+ aspect: UbuntuShape.Flat
34 height: expanded ? (optionToggleRepeater.count - startIndex) * itemHeight : itemHeight
34 height: expanded ? (optionToggleRepeater.count - startIndex) * itemHeight : itemHeight
35 width: parent.width
35 width: parent.width
36 radius: "medium"
36 radius: "medium"
qml/Notifications/ShapedIcon.qml+3−3
@@ -1,5 +1,5 @@
1/*
1/*
2− * Copyright (C) 2013 Canonical, Ltd.
2+ * Copyright (C) 2013,2015 Canonical, Ltd.
3 *
3 *
4 * This program is free software; you can redistribute it and/or modify
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
5 * it under the terms of the GNU General Public License as published by
@@ -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.3
17+import QtQuick 2.4
18−import Ubuntu.Components 1.2
18+import Ubuntu.Components 1.3
19
19
20Item {
20Item {
21 property string fileSource
21 property string fileSource
qml/Notifications/SwipeToAct.qml+10−10
@@ -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.3
17+import QtQuick 2.4
18−import Ubuntu.Components 1.2
18+import Ubuntu.Components 1.3
19
19
20Item {
20Item {
21 id: swipeToAct
21 id: swipeToAct
@@ -98,8 +98,8 @@ Item {
98 id: row
98 id: row
99 width: parent.width
99 width: parent.width
100 height: priv.sliderHeight
100 height: priv.sliderHeight
101− color: priv.sliderBGColor
101+ backgroundColor: priv.sliderBGColor
102− borderSource: "none"
102+ aspect: UbuntuShape.Flat
103 visible: !clickToAct
103 visible: !clickToAct
104
104
105 UbuntuShape {
105 UbuntuShape {
@@ -108,8 +108,8 @@ Item {
108 anchors.top: parent.top
108 anchors.top: parent.top
109 anchors.left: parent.left
109 anchors.left: parent.left
110 anchors.margins: priv.gap
110 anchors.margins: priv.gap
111− color: UbuntuColors.red
111+ backgroundColor: UbuntuColors.red
112− borderSource: "none"
112+ aspect: UbuntuShape.Flat
113
113
114 state: "normal"
114 state: "normal"
115 height: units.gu(6)
115 height: units.gu(6)
@@ -187,10 +187,10 @@ Item {
187 }
187 }
188
188
189 z: 1
189 z: 1
190− color: priv.sliderMainColor
190+ backgroundColor: priv.sliderMainColor
191 height: units.gu(6)
191 height: units.gu(6)
192 width: units.gu(6)
192 width: units.gu(6)
193− borderSource: "none"
193+ aspect: UbuntuShape.Flat
194 radius: "medium"
194 radius: "medium"
195 Icon {
195 Icon {
196 anchors.fill: parent
196 anchors.fill: parent
@@ -226,8 +226,8 @@ Item {
226 anchors.top: parent.top
226 anchors.top: parent.top
227 anchors.right: parent.right
227 anchors.right: parent.right
228 anchors.margins: priv.gap
228 anchors.margins: priv.gap
229− color: UbuntuColors.green
229+ backgroundColor: UbuntuColors.green
230− borderSource: "none"
230+ aspect: UbuntuShape.Flat
231
231
232 state: "normal"
232 state: "normal"
233 height: units.gu(6)
233 height: units.gu(6)
qml/OrientedShell.qml+6−6
@@ -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.4
18−import QtQuick.Window 2.0
18+import QtQuick.Window 2.2
19import Unity.Session 0.1
19import Unity.Session 0.1
20import GSettings 1.0
20import GSettings 1.0
21import "Components"
21import "Components"
@@ -23,7 +23,7 @@ import "Components/UnityInputInfo"
23import "Rotation"
23import "Rotation"
24// Backup Workaround https://bugs.launchpad.net/ubuntu/+source/unity8/+bug/1473471
24// Backup Workaround https://bugs.launchpad.net/ubuntu/+source/unity8/+bug/1473471
25// in case we remove the UnityInputInfo import
25// in case we remove the UnityInputInfo import
26−import Ubuntu.Components 1.2
26+import Ubuntu.Components 1.3
27
27
28Rectangle {
28Rectangle {
29 id: root
29 id: root
@@ -89,8 +89,8 @@ Rectangle {
89
89
90 // we must rotate to a supported orientation regardless of shell's preference
90 // we must rotate to a supported orientation regardless of shell's preference
91 property bool orientationChangesEnabled:
91 property bool orientationChangesEnabled:
92− (orientation & supportedOrientations) === 0 ? true
92+ (shell.orientation & supportedOrientations) === 0 ? true
93− : shell.orientationChangesEnabled
93+ : shell.orientationChangesEnabled
94
94
95
95
96 Binding {
96 Binding {
@@ -107,7 +107,7 @@ Rectangle {
107
107
108 readonly property int supportedOrientations: shell.supportedOrientations
108 readonly property int supportedOrientations: shell.supportedOrientations
109 & (deviceConfiguration.supportedOrientations == deviceConfiguration.useNativeOrientation
109 & (deviceConfiguration.supportedOrientations == deviceConfiguration.useNativeOrientation
110− ? nativeOrientation
110+ ? orientations.native_
111 : deviceConfiguration.supportedOrientations)
111 : deviceConfiguration.supportedOrientations)
112
112
113 property int acceptedOrientationAngle: {
113 property int acceptedOrientationAngle: {
qml/Panel/ActiveCallHint.qml+2−2
@@ -14,9 +14,9 @@
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.4
18import Ubuntu.Telephony 0.1 as Telephony
18import Ubuntu.Telephony 0.1 as Telephony
19−import Ubuntu.Components 0.1
19+import Ubuntu.Components 1.3
20import Unity.Application 0.1
20import Unity.Application 0.1
21import "../Components"
21import "../Components"
22
22
qml/Panel/Handle.qml+2−2
@@ -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.2
17+import QtQuick 2.4
18−import Ubuntu.Components 1.1
18+import Ubuntu.Components 1.3
19
19
20Rectangle {
20Rectangle {
21 id: handle
21 id: handle
qml/Panel/IndicatorItem.qml+2−2
@@ -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.2
17+import QtQuick 2.4
18−import Ubuntu.Components 1.1
18+import Ubuntu.Components 1.3
19import Ubuntu.Settings.Components 0.1
19import Ubuntu.Settings.Components 0.1
20import "Indicators"
20import "Indicators"
21
21
qml/Panel/IndicatorItemRow.qml+2−2
@@ -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.2
17+import QtQuick 2.4
18−import Ubuntu.Components 1.1
18+import Ubuntu.Components 1.3
19
19
20Item {
20Item {
21 id: root
21 id: root
qml/Panel/IndicatorPage.qml+2−2
@@ -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.4
18−import Ubuntu.Components 0.1 as Components
18+import Ubuntu.Components 1.3 as Components
19import Unity.Indicators 0.1 as Indicators
19import Unity.Indicators 0.1 as Indicators
20import "Indicators"
20import "Indicators"
21
21
qml/Panel/Indicators/IndicatorBase.qml+1−1
@@ -17,7 +17,7 @@
17 * Nick Dedekind <nick.dedekind@canonical.com>
17 * Nick Dedekind <nick.dedekind@canonical.com>
18 */
18 */
19
19
20−import QtQuick 2.0
20+import QtQuick 2.4
21import Unity.Indicators 0.1
21import Unity.Indicators 0.1
22
22
23Item {
23Item {
qml/Panel/Indicators/IndicatorDelegate.qml+1−1
@@ -17,7 +17,7 @@
17 * Nick Dedekind <nick.dedekind@canonical.com>
17 * Nick Dedekind <nick.dedekind@canonical.com>
18 */
18 */
19
19
20−import QtQuick 2.0
20+import QtQuick 2.4
21
21
22IndicatorBase {
22IndicatorBase {
23 readonly property bool indicatorVisible: rootActionState.indicatorVisible
23 readonly property bool indicatorVisible: rootActionState.indicatorVisible
qml/Panel/Indicators/IndicatorsLight.qml+1−1
@@ -17,7 +17,7 @@
17 * Renato Araujo Oliveira Filho <renato@canonical.com>
17 * Renato Araujo Oliveira Filho <renato@canonical.com>
18 */
18 */
19
19
20−import QtQuick 2.0
20+import QtQuick 2.4
21import Powerd 0.1
21import Powerd 0.1
22import Lights 0.1
22import Lights 0.1
23import QMenuModel 0.1 as QMenuModel
23import QMenuModel 0.1 as QMenuModel
qml/Panel/Indicators/MenuItemFactory.qml+5−5
@@ -14,12 +14,12 @@
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.4
18import Ubuntu.Settings.Menus 0.1 as Menus
18import Ubuntu.Settings.Menus 0.1 as Menus
19import Ubuntu.Settings.Components 0.1
19import Ubuntu.Settings.Components 0.1
20import QMenuModel 0.1
20import QMenuModel 0.1
21import Utils 0.1 as Utils
21import Utils 0.1 as Utils
22−import Ubuntu.Components.ListItems 0.1 as ListItems
22+import Ubuntu.Components.ListItems 1.3 as ListItems
23import Ubuntu.Components 1.3
23import Ubuntu.Components 1.3
24import Unity.Session 0.1
24import Unity.Session 0.1
25
25
@@ -249,7 +249,7 @@ Item {
249 name: "settings"
249 name: "settings"
250 height: units.gu(3)
250 height: units.gu(3)
251 width: height
251 width: height
252− color: Theme.palette.selected.backgroundText
252+ color: theme.palette.selected.backgroundText
253 }
253 }
254 }
254 }
255 }
255 }
@@ -281,7 +281,7 @@ Item {
281 source: menuData.icon
281 source: menuData.icon
282 height: units.gu(3)
282 height: units.gu(3)
283 width: height
283 width: height
284− color: Theme.palette.selected.backgroundText
284+ color: theme.palette.selected.backgroundText
285 }
285 }
286 }
286 }
287 }
287 }
@@ -928,7 +928,7 @@ Item {
928 enabled: menuData && menuData.sensitive || false
928 enabled: menuData && menuData.sensitive || false
929 highlightWhenPressed: false
929 highlightWhenPressed: false
930 text: menuData && menuData.label || ""
930 text: menuData && menuData.label || ""
931− foregroundColor: Theme.palette.normal.backgroundText
931+ foregroundColor: theme.palette.normal.backgroundText
932
932
933 onMenuModelChanged: {
933 onMenuModelChanged: {
934 loadAttributes();
934 loadAttributes();
qml/Panel/Indicators/MessageMenuItemFactory.qml+1−1
@@ -18,7 +18,7 @@
18 * Olivier Tilloy <olivier.tilloy@canonical.com>
18 * Olivier Tilloy <olivier.tilloy@canonical.com>
19 */
19 */
20
20
21−import QtQuick 2.0
21+import QtQuick 2.4
22import Ubuntu.Components 1.3
22import Ubuntu.Components 1.3
23import Ubuntu.Settings.Menus 0.1 as Menus
23import Ubuntu.Settings.Menus 0.1 as Menus
24import QMenuModel 0.1 as QMenuModel
24import QMenuModel 0.1 as QMenuModel
qml/Panel/Indicators/ModemInfoItem.qml+6−6
@@ -1,5 +1,5 @@
1/*
1/*
2− * Copyright 2014 Canonical Ltd.
2+ * Copyright 2014,2015 Canonical Ltd.
3 *
3 *
4 * This program is free software; you can redistribute it and/or modify
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
5 * it under the terms of the GNU Lesser General Public License as published by
@@ -14,10 +14,10 @@
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.4
18import QtQuick.Layouts 1.1
18import QtQuick.Layouts 1.1
19−import Ubuntu.Components 0.1
19+import Ubuntu.Components 1.3
20−import Ubuntu.Components.ListItems 0.1 as ListItem
20+import Ubuntu.Components.ListItems 1.3 as ListItem
21
21
22ListItem.Empty {
22ListItem.Empty {
23 id: menu
23 id: menu
@@ -65,7 +65,7 @@ ListItem.Empty {
65 height: parent.height
65 height: parent.height
66 Icon {
66 Icon {
67 id: statusIcon
67 id: statusIcon
68− color: Theme.palette.selected.backgroundText
68+ color: theme.palette.selected.backgroundText
69
69
70 Layout.preferredHeight: parent.height
70 Layout.preferredHeight: parent.height
71 Layout.preferredWidth: Layout.preferredHeight
71 Layout.preferredWidth: Layout.preferredHeight
@@ -75,7 +75,7 @@ ListItem.Empty {
75
75
76 Icon {
76 Icon {
77 id: iconConnectivity
77 id: iconConnectivity
78− color: Theme.palette.selected.backgroundText
78+ color: theme.palette.selected.backgroundText
79
79
80 Layout.preferredHeight: parent.height
80 Layout.preferredHeight: parent.height
81 Layout.preferredWidth: Layout.preferredHeight
81 Layout.preferredWidth: Layout.preferredHeight
qml/Panel/Indicators/RoamingIndication.qml+4−4
@@ -1,5 +1,5 @@
1/*
1/*
2− * Copyright 2014 Canonical Ltd.
2+ * Copyright 2014,2015 Canonical Ltd.
3 *
3 *
4 * This program is free software; you can redistribute it and/or modify
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
5 * it under the terms of the GNU Lesser General Public License as published by
@@ -14,9 +14,9 @@
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.4
18import QtQuick.Layouts 1.1
18import QtQuick.Layouts 1.1
19−import Ubuntu.Components 0.1
19+import Ubuntu.Components 1.3
20
20
21RowLayout {
21RowLayout {
22 spacing: units.gu(0.5)
22 spacing: units.gu(0.5)
@@ -30,7 +30,7 @@ RowLayout {
30
30
31 Icon {
31 Icon {
32 id: iconRoaming
32 id: iconRoaming
33− color: Theme.palette.selected.backgroundText
33+ color: theme.palette.selected.backgroundText
34
34
35 Layout.preferredHeight: parent.height
35 Layout.preferredHeight: parent.height
36 Layout.preferredWidth: Layout.preferredHeight
36 Layout.preferredWidth: Layout.preferredHeight
qml/Panel/Indicators/client/IndicatorRepresentation.qml+3−3
@@ -18,9 +18,9 @@
18 * Nick Dedekind <nick.dedekind@canonical.com>
18 * Nick Dedekind <nick.dedekind@canonical.com>
19 */
19 */
20
20
21−import QtQuick 2.0
21+import QtQuick 2.4
22−import Ubuntu.Components 0.1
22+import Ubuntu.Components 1.3
23−import Ubuntu.Components.ListItems 0.1 as ListItem
23+import Ubuntu.Components.ListItems 1.3 as ListItem
24import "../.."
24import "../.."
25
25
26Page {
26Page {
qml/Panel/Indicators/client/IndicatorsClient.qml+4−4
@@ -17,16 +17,16 @@
17 * Renato Araujo Oliveira Filho <renato@canonical.com>
17 * Renato Araujo Oliveira Filho <renato@canonical.com>
18 */
18 */
19
19
20−import QtQuick 2.0
20+import QtQuick 2.4
21−import Ubuntu.Components 0.1
21+import Ubuntu.Components 1.3
22−import Ubuntu.Components.ListItems 0.1 as ListItem
22+import Ubuntu.Components.ListItems 1.3 as ListItem
23
23
24Rectangle {
24Rectangle {
25 color: "black"
25 color: "black"
26 id: root
26 id: root
27
27
28 Component.onCompleted: {
28 Component.onCompleted: {
29− Theme.name = "Ubuntu.Components.Themes.SuruGradient"
29+ theme.name = "Ubuntu.Components.Themes.SuruGradient"
30 }
30 }
31
31
32 PageStack {
32 PageStack {
qml/Panel/Indicators/client/IndicatorsList.qml+3−3
@@ -17,9 +17,9 @@
17 * Renato Araujo Oliveira Filho <renato@canonical.com>
17 * Renato Araujo Oliveira Filho <renato@canonical.com>
18 */
18 */
19
19
20−import QtQuick 2.0
20+import QtQuick 2.4
21−import Ubuntu.Components 0.1
21+import Ubuntu.Components 1.3
22−import Ubuntu.Components.ListItems 0.1 as ListItem
22+import Ubuntu.Components.ListItems 1.3 as ListItem
23import Unity.Indicators 0.1 as Indicators
23import Unity.Indicators 0.1 as Indicators
24import "../.."
24import "../.."
25
25
qml/Panel/Indicators/client/IndicatorsTree.qml+2−2
@@ -17,8 +17,8 @@
17 * Nick Dedekind <nick.dededkind@canonical.com>
17 * Nick Dedekind <nick.dededkind@canonical.com>
18 */
18 */
19
19
20−import QtQuick 2.0
20+import QtQuick 2.4
21−import Ubuntu.Components 0.1
21+import Ubuntu.Components 1.3
22import Unity.Indicators 0.1 as Indicators
22import Unity.Indicators 0.1 as Indicators
23import ".."
23import ".."
24
24
qml/Panel/IndicatorsBar.qml+2−2
@@ -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.2
17+import QtQuick 2.4
18−import Ubuntu.Components 1.1
18+import Ubuntu.Components 1.3
19import "../Components"
19import "../Components"
20
20
21Item {
21Item {
qml/Panel/IndicatorsMenu.qml+2−2
@@ -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.2
17+import QtQuick 2.4
18−import Ubuntu.Components 1.1
18+import Ubuntu.Components 1.3
19import Ubuntu.Gestures 0.1
19import Ubuntu.Gestures 0.1
20import "../Components"
20import "../Components"
21import "Indicators"
21import "Indicators"
qml/Panel/MenuContent.qml+2−2
@@ -14,9 +14,9 @@
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.2
17+import QtQuick 2.4
18import QtQuick.Layouts 1.1
18import QtQuick.Layouts 1.1
19−import Ubuntu.Components 1.1
19+import Ubuntu.Components 1.3
20import Unity.Indicators 0.1 as Indicators
20import Unity.Indicators 0.1 as Indicators
21import Utils 0.1
21import Utils 0.1
22import "../Components"
22import "../Components"
qml/Panel/Panel.qml+2−2
@@ -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.2
17+import QtQuick 2.4
18−import Ubuntu.Components 1.1
18+import Ubuntu.Components 1.3
19import Unity.Application 0.1
19import Unity.Application 0.1
20import "../Components"
20import "../Components"
21import "../Components/PanelState"
21import "../Components/PanelState"
qml/Panel/PanelBackground.qml+1−1
@@ -14,7 +14,7 @@
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.4
18
18
19Rectangle {
19Rectangle {
20 color: "black"
20 color: "black"
qml/Panel/PanelSeparatorLine.qml+1−1
@@ -14,7 +14,7 @@
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.4
18
18
19Rectangle {
19Rectangle {
20 property real saturation: 1.0
20 property real saturation: 1.0
qml/Panel/PanelVelocityCalculator.qml+1−1
@@ -14,7 +14,7 @@
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.2
17+import QtQuick 2.4
18import Ubuntu.Gestures 0.1
18import Ubuntu.Gestures 0.1
19
19
20Item {
20Item {
qml/Rotation/HalfLoopRotationAnimation.qml+1−1
@@ -14,7 +14,7 @@
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.3
17+import QtQuick 2.4
18
18
19SequentialAnimation {
19SequentialAnimation {
20 id: root
20 id: root
qml/Rotation/ImmediateRotationAction.qml+1−1
@@ -14,7 +14,7 @@
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.3
17+import QtQuick 2.4
18
18
19ScriptAction {
19ScriptAction {
20 property var info
20 property var info
qml/Rotation/NinetyRotationAnimation.qml+1−1
@@ -14,7 +14,7 @@
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.3
17+import QtQuick 2.4
18
18
19SequentialAnimation {
19SequentialAnimation {
20 id: root
20 id: root
qml/Rotation/RotationStates.qml+2−2
@@ -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.4
18−import Ubuntu.Components 1.1
18+import Ubuntu.Components 1.3
19import Powerd 0.1
19import Powerd 0.1
20
20
21// Why the state machine is done that way:
21// Why the state machine is done that way:
qml/ScopeTool.qml+3−3
@@ -14,9 +14,9 @@
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.4
18−import Ubuntu.Components 0.1
18+import Ubuntu.Components 1.3
19−import Ubuntu.Components.Popups 0.1
19+import Ubuntu.Components.Popups 1.3
20import Ubuntu.Thumbnailer 0.1 // Register support for image://thumbnailer/ and image://albumart/
20import Ubuntu.Thumbnailer 0.1 // Register support for image://thumbnailer/ and image://albumart/
21import Utils 0.1
21import Utils 0.1
22import Unity 0.2
22import Unity 0.2
qml/Shell.qml+8−8
@@ -14,12 +14,12 @@
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.4
18−import QtQuick.Window 2.0
18+import QtQuick.Window 2.2
19import AccountsService 0.1
19import AccountsService 0.1
20import Unity.Application 0.1
20import Unity.Application 0.1
21−import Ubuntu.Components 0.1
21+import Ubuntu.Components 1.3
22−import Ubuntu.Components.Popups 1.0
22+import Ubuntu.Components.Popups 1.3
23import Ubuntu.Gestures 0.1
23import Ubuntu.Gestures 0.1
24import Ubuntu.Telephony 0.1 as Telephony
24import Ubuntu.Telephony 0.1 as Telephony
25import Unity.Connectivity 0.1
25import Unity.Connectivity 0.1
@@ -85,7 +85,7 @@ Item {
85 } else if (greeter && greeter.shown) {
85 } else if (greeter && greeter.shown) {
86 return Qt.PrimaryOrientation;
86 return Qt.PrimaryOrientation;
87 } else if (mainApp) {
87 } else if (mainApp) {
88− return mainApp.supportedOrientations;
88+ return shell.orientations.map(mainApp.supportedOrientations);
89 } else {
89 } else {
90 // we just don't care
90 // we just don't care
91 return Qt.PortraitOrientation
91 return Qt.PortraitOrientation
@@ -139,7 +139,7 @@ Item {
139 }
139 }
140
140
141 Component.onCompleted: {
141 Component.onCompleted: {
142− Theme.name = "Ubuntu.Components.Themes.SuruGradient"
142+ theme.name = "Ubuntu.Components.Themes.SuruGradient"
143 if (ApplicationManager.count > 0) {
143 if (ApplicationManager.count > 0) {
144 ApplicationManager.focusApplication(ApplicationManager.get(0).appId);
144 ApplicationManager.focusApplication(ApplicationManager.get(0).appId);
145 }
145 }
@@ -172,8 +172,8 @@ Item {
172 }
172 }
173
173
174 WindowKeysFilter {
174 WindowKeysFilter {
175− Keys.onPressed: physicalKeysMapper.onKeyPressed(event);
175+ Keys.onPressed: physicalKeysMapper.onKeyPressed(event, currentEventTimestamp);
176− Keys.onReleased: physicalKeysMapper.onKeyReleased(event);
176+ Keys.onReleased: physicalKeysMapper.onKeyReleased(event, currentEventTimestamp);
177 }
177 }
178
178
179 HomeKeyWatcher {
179 HomeKeyWatcher {
qml/Stages/Animations/BaseSessionAnimation.qml+1−1
@@ -14,7 +14,7 @@
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.4
18
18
19/* This is the base case for surface animations, used when adding/removing * child surfaces.
19/* This is the base case for surface animations, used when adding/removing * child surfaces.
20 * The class is meant to be overridden and changes/animations provided for state changes.
20 * The class is meant to be overridden and changes/animations provided for state changes.
qml/Stages/Animations/SwipeFromBottomAnimation.qml+2−2
@@ -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.4
18−import Ubuntu.Components 1.1
18+import Ubuntu.Components 1.3
19
19
20BaseSessionAnimation {
20BaseSessionAnimation {
21 id: animation
21 id: animation
qml/Stages/ApplicationWindow.qml+2−2
@@ -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.4
18−import Ubuntu.Components 1.1
18+import Ubuntu.Components 1.3
19import Unity.Application 0.1
19import Unity.Application 0.1
20
20
21FocusScope {
21FocusScope {
qml/Stages/DecoratedWindow.qml+2−2
@@ -16,8 +16,8 @@
16 * Authors: Michael Zanetti <michael.zanetti@canonical.com>
16 * Authors: Michael Zanetti <michael.zanetti@canonical.com>
17 */
17 */
18
18
19−import QtQuick 2.3
19+import QtQuick 2.4
20−import Ubuntu.Components 1.1
20+import Ubuntu.Components 1.3
21import Unity.Application 0.1
21import Unity.Application 0.1
22
22
23FocusScope {
23FocusScope {
qml/Stages/DesktopSpread.qml+1−1
@@ -16,7 +16,7 @@
16
16
17import QtQuick 2.4
17import QtQuick 2.4
18import QtQuick.Layouts 1.1
18import QtQuick.Layouts 1.1
19−import Ubuntu.Components 1.2
19+import Ubuntu.Components 1.3
20import Ubuntu.Gestures 0.1
20import Ubuntu.Gestures 0.1
21import Unity.Application 0.1
21import Unity.Application 0.1
22
22
qml/Stages/DesktopSpreadDelegate.qml+2−2
@@ -16,8 +16,8 @@
16 * Authors: Michael Zanetti <michael.zanetti@canonical.com>
16 * Authors: Michael Zanetti <michael.zanetti@canonical.com>
17 */
17 */
18
18
19−import QtQuick 2.3
19+import QtQuick 2.4
20−import Ubuntu.Components 1.1
20+import Ubuntu.Components 1.3
21import Unity.Application 0.1
21import Unity.Application 0.1
22
22
23Item {
23Item {
qml/Stages/DesktopStage.qml+79−8
@@ -18,7 +18,7 @@
18
18
19import QtQuick 2.4
19import QtQuick 2.4
20import QtQuick.Layouts 1.1
20import QtQuick.Layouts 1.1
21−import Ubuntu.Components 1.1
21+import Ubuntu.Components 1.3
22import Unity.Application 0.1
22import Unity.Application 0.1
23import "../Components"
23import "../Components"
24import "../Components/PanelState"
24import "../Components/PanelState"
@@ -68,6 +68,22 @@ AbstractStage {
68 var index = indexOf(focusedAppId);
68 var index = indexOf(focusedAppId);
69 return index >= 0 && index < appRepeater.count ? appRepeater.itemAt(index) : null
69 return index >= 0 && index < appRepeater.count ? appRepeater.itemAt(index) : null
70 }
70 }
71+ property int foregroundMaximizedAppIdIndex: -1
72+
73+ function updateForegroundMaximizedApp() {
74+ for (var i = 0; i < appRepeater.count; i++) {
75+ var item = appRepeater.itemAt(i);
76+
77+ if (item && item.visuallyMaximized) {
78+ var app = ApplicationManager.get(i);
79+ if (app) {
80+ foregroundMaximizedAppIdIndex = i;
81+ return;
82+ }
83+ }
84+ }
85+ foregroundMaximizedAppIdIndex = -1;
86+ }
71
87
72 function indexOf(appId) {
88 function indexOf(appId) {
73 for (var i = 0; i < ApplicationManager.count; i++) {
89 for (var i = 0; i < ApplicationManager.count; i++) {
@@ -114,8 +130,12 @@ AbstractStage {
114 model: ApplicationManager
130 model: ApplicationManager
115 objectName: "appRepeater"
131 objectName: "appRepeater"
116
132
133+ onItemAdded: priv.updateForegroundMaximizedApp()
134+ onItemRemoved: priv.updateForegroundMaximizedApp()
135+
117 delegate: FocusScope {
136 delegate: FocusScope {
118 id: appDelegate
137 id: appDelegate
138+ objectName: "stageDelegate_" + model.appId
119 z: ApplicationManager.count - index
139 z: ApplicationManager.count - index
120 y: units.gu(3)
140 y: units.gu(3)
121 width: units.gu(60)
141 width: units.gu(60)
@@ -126,12 +146,25 @@ AbstractStage {
126 property bool minimized: false
146 property bool minimized: false
127 property bool animationsEnabled: true
147 property bool animationsEnabled: true
128
148
149+ property bool visuallyMaximized: false
150+ property bool visuallyMinimized: false
151+
129 onFocusChanged: {
152 onFocusChanged: {
130 if (focus && ApplicationManager.focusedApplicationId !== model.appId) {
153 if (focus && ApplicationManager.focusedApplicationId !== model.appId) {
131 ApplicationManager.focusApplication(model.appId);
154 ApplicationManager.focusApplication(model.appId);
132 }
155 }
133 }
156 }
134
157
158+ onZChanged: priv.updateForegroundMaximizedApp()
159+ onVisuallyMaximizedChanged: priv.updateForegroundMaximizedApp()
160+
161+ visible: !visuallyMinimized &&
162+ !greeter.fullyShown &&
163+ (priv.foregroundMaximizedAppIdIndex === -1 || priv.foregroundMaximizedAppIdIndex >= index) ||
164+ (spread.state == "altTab" && index === spread.highlightedIndex)
165+
166+ onVisibleChanged: console.log("VISIBLE", model.appId, visible)
167+
135 Binding {
168 Binding {
136 target: ApplicationManager.get(index)
169 target: ApplicationManager.get(index)
137 property: "requestedState"
170 property: "requestedState"
@@ -161,23 +194,60 @@ AbstractStage {
161
194
162 states: [
195 states: [
163 State {
196 State {
197+ name: "normal";
164− name: "normal"; when: !appDelegate.maximized && !appDelegate.minimized
198+ when: !appDelegate.maximized && !appDelegate.minimized
199+ PropertyChanges {
200+ target: appDelegate;
201+ visuallyMinimized: false;
202+ visuallyMaximized: false
203+ }
165 },
204 },
166 State {
205 State {
167 name: "maximized"; when: appDelegate.maximized
206 name: "maximized"; when: appDelegate.maximized
207+ PropertyChanges {
208+ target: appDelegate;
209+ x: 0; y: 0;
168− PropertyChanges { target: appDelegate; x: 0; y: 0; width: root.width; height: root.height }
210+ width: root.width; height: root.height;
211+ visuallyMinimized: false;
212+ visuallyMaximized: true
213+ }
169 },
214 },
170 State {
215 State {
171 name: "minimized"; when: appDelegate.minimized
216 name: "minimized"; when: appDelegate.minimized
217+ PropertyChanges {
218+ target: appDelegate;
219+ x: -appDelegate.width / 2;
172− PropertyChanges { target: appDelegate; x: -appDelegate.width / 2; scale: units.gu(5) / appDelegate.width; opacity: 0 }
220+ scale: units.gu(5) / appDelegate.width;
221+ opacity: 0
222+ visuallyMinimized: true;
223+ visuallyMaximized: false
224+ }
173 }
225 }
174 ]
226 ]
175 transitions: [
227 transitions: [
176 Transition {
228 Transition {
177− from: "maximized,minimized,normal,"
229+ to: "normal"
178− to: "maximized,minimized,normal,"
230+ enabled: appDelegate.animationsEnabled
231+ PropertyAction { target: appDelegate; properties: "visuallyMinimized,visuallyMaximized" }
232+ PropertyAnimation { target: appDelegate; properties: "x,y,opacity,width,height,scale,opacity" }
233+ },
234+ Transition {
235+ to: "maximized"
179 enabled: appDelegate.animationsEnabled
236 enabled: appDelegate.animationsEnabled
237+ PropertyAction { target: appDelegate; property: "visuallyMinimized" }
238+ SequentialAnimation {
180− PropertyAnimation { target: appDelegate; properties: "x,y,opacity,width,height,scale" }
239+ PropertyAnimation { target: appDelegate; properties: "x,y,opacity,width,height,scale,opacity" }
240+ PropertyAction { target: appDelegate; property: "visuallyMaximized" }
241+ }
242+ },
243+ Transition {
244+ to: "minimized"
245+ enabled: appDelegate.animationsEnabled
246+ PropertyAction { target: appDelegate; property: "visuallyMaximized" }
247+ SequentialAnimation {
248+ PropertyAnimation { target: appDelegate; properties: "x,y,opacity,width,height,scale,opacity" }
249+ PropertyAction { target: appDelegate; property: "visuallyMinimized" }
250+ }
181 },
251 },
182 Transition {
252 Transition {
183 from: ""
253 from: ""
@@ -202,6 +272,7 @@ AbstractStage {
202 }
272 }
203
273
204 WindowResizeArea {
274 WindowResizeArea {
275+ objectName: "windowResizeArea"
205 target: appDelegate
276 target: appDelegate
206 minWidth: units.gu(10)
277 minWidth: units.gu(10)
207 minHeight: units.gu(10)
278 minHeight: units.gu(10)
@@ -223,7 +294,7 @@ AbstractStage {
223 focus: true
294 focus: true
224
295
225 onClose: ApplicationManager.stopApplication(model.appId)
296 onClose: ApplicationManager.stopApplication(model.appId)
226− onMaximize: appDelegate.maximize()
297+ onMaximize: appDelegate.maximized ? appDelegate.unmaximize() : appDelegate.maximize()
227 onMinimize: appDelegate.minimize()
298 onMinimize: appDelegate.minimize()
228 onDecorationPressed: { ApplicationManager.focusApplication(model.appId) }
299 onDecorationPressed: { ApplicationManager.focusApplication(model.appId) }
229 }
300 }
qml/Stages/MainViewStyle.qml+35−27
@@ -1,5 +1,5 @@
1/*
1/*
2− * Copyright 2014 Canonical Ltd.
2+ * Copyright 2012 Canonical Ltd.
3 *
3 *
4 * This program is free software; you can redistribute it and/or modify
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
5 * it under the terms of the GNU Lesser General Public License as published by
@@ -13,51 +13,60 @@
13 * You should have received a copy of the GNU Lesser General Public License
13 * You should have received a copy of the GNU Lesser General Public License
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−import QtQuick 2.0
16+import QtQuick 2.4
17−import Ubuntu.Components 1.1
17+import Ubuntu.Components 1.3
18
18
19// FIXME: copied with slight modifications from Ubuntu UI Toolkit's Ambiance's theme
19// FIXME: copied with slight modifications from Ubuntu UI Toolkit's Ambiance's theme
20Item {
20Item {
21− // styling properties
22 anchors.fill: parent
21 anchors.fill: parent
23 z: -1
22 z: -1
24 id: mainViewStyle
23 id: mainViewStyle
25
24
25+ property var theme
26+
27+ /*!
28+ Color of the header's background.
29+
30+ \sa backgroundColor, footerColor
31+ */
32+ property color headerColor: styledItem.headerColor
33+
26 /*!
34 /*!
27− The background texture of the main view. The image will be drawn over the background color,
35+ Color of the background.
28− so if it has (semi-)transparent pixels, in those pixels the background color will be visible.
36+
37+ The background is usually a single color. However if \l headerColor
38+ or \l footerColor are set then a gradient of colors will be drawn.
39+
40+ \sa footerColor, headerColor
29− */
41+ */
30− property url backgroundSource: "graphics/background_paper.png"
42+ property color backgroundColor: styledItem.backgroundColor
31− property var theme
43+
44+ /*!
45+ Color of the footer's background.
46+
47+ \sa backgroundColor, headerColor
48+ */
49+ property color footerColor: styledItem.footerColor
32
50
33 Gradient {
51 Gradient {
34 id: backgroundGradient
52 id: backgroundGradient
35− GradientStop { position: 0.0; color: styledItem.headerColor }
53+ GradientStop { position: 0.0; color: mainViewStyle.headerColor }
36− GradientStop { position: 0.83; color: styledItem.backgroundColor }
54+ GradientStop { position: 0.83; color: mainViewStyle.backgroundColor }
37− GradientStop { position: 1.0; color: styledItem.footerColor }
55+ GradientStop { position: 1.0; color: mainViewStyle.footerColor }
38 }
56 }
39
57
40 Rectangle {
58 Rectangle {
41 id: backgroundColor
59 id: backgroundColor
42 anchors.fill: parent
60 anchors.fill: parent
43− color: styledItem.backgroundColor
61+ color: mainViewStyle.backgroundColor
44 gradient: internals.isGradient ? backgroundGradient : null
62 gradient: internals.isGradient ? backgroundGradient : null
45 }
63 }
46
64
47− Image {
48− id: backgroundTexture
49− anchors.fill: parent
50− source: mainViewStyle.theme.name === "Ambiance" ? mainViewStyle.backgroundSource : ""
51− fillMode: Image.Tile
52− asynchronous: true
53− cache: false
54− visible: status === Image.Ready
55− }
56−
57 QtObject {
65 QtObject {
58 id: internals
66 id: internals
59− property bool isGradient: styledItem.backgroundColor != styledItem.headerColor ||
67+ property bool isGradient: mainViewStyle.backgroundColor != mainViewStyle.headerColor ||
60− styledItem.backgroundColor != styledItem.footerColor
68+ mainViewStyle.backgroundColor != mainViewStyle.footerColor
69+
61 /*
70 /*
62 As we don't know the order the property bindings and onXXXChanged signals are evaluated
71 As we don't know the order the property bindings and onXXXChanged signals are evaluated
63 we should rely only on one property when changing the theme to avoid intermediate
72 we should rely only on one property when changing the theme to avoid intermediate
@@ -65,8 +74,7 @@ Item {
65
74
66 Qt bug: https://bugreports.qt-project.org/browse/QTBUG-11712
75 Qt bug: https://bugreports.qt-project.org/browse/QTBUG-11712
67 */
76 */
68− property string theme: (ColorUtils.luminance(styledItem.backgroundColor) >= 0.85) ? "Ambiance" :
77+ property string theme: (ColorUtils.luminance(styledItem.backgroundColor) >= 0.85) ? "Ambiance" : "SuruDark"
69− (isGradient ? "SuruGradient" : "SuruDark")
70 }
78 }
71
79
72 // automatically select the appropriate theme depending on the background colors
80 // automatically select the appropriate theme depending on the background colors
qml/Stages/OrientationChangeAnimation.qml+1−1
@@ -14,7 +14,7 @@
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.3
17+import QtQuick 2.4
18
18
19QtObject {
19QtObject {
20 id: root
20 id: root
qml/Stages/PageHeadStyle.qmldeleted−76
@@ -1,76 +0,0 @@
1−/*
2− * Copyright 2014 Canonical Ltd.
3− *
4− * This program is free software; you can redistribute it and/or modify
5− * it under the terms of the GNU Lesser 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 Lesser General Public License for more details.
12− *
13− * You should have received a copy of the GNU Lesser General Public License
14− * along with this program. If not, see <http://www.gnu.org/licenses/>.
15− */
16−import QtQuick 2.2
17−import Ubuntu.Components 1.1
18−import Ubuntu.Components.Styles 1.1 as Style
19−
20−// FIXME: copied with large modifications from Ubuntu UI Toolkit's Ambiance's theme
21−Style.PageHeadStyle {
22− id: headerStyle
23−
24− contentHeight: units.gu(7)
25− separatorSource: "graphics/PageHeaderBaseDividerLight.sci"
26− separatorBottomSource: "graphics/PageHeaderBaseDividerBottom.png"
27− fontWeight: Font.Light
28− fontSize: "x-large"
29− textColor: styledItem.config.foregroundColor
30− textLeftMargin: units.gu(2)
31−
32− implicitHeight: headerStyle.contentHeight
33−
34− property var theme
35−
36− Label {
37− anchors {
38− left: parent.left
39− leftMargin: headerStyle.textLeftMargin
40− right: parent.right
41− verticalCenter: parent.verticalCenter
42− }
43− LayoutMirroring.enabled: Qt.application.layoutDirection == Qt.RightToLeft
44− text: styledItem.title
45− font.weight: headerStyle.fontWeight
46− fontSize: headerStyle.fontSize
47− color: headerStyle.textColor
48− elide: Text.ElideRight
49− }
50−
51− BorderImage {
52− id: separator
53− anchors {
54− top: parent.bottom
55− topMargin: separatorBottom.height
56− left: parent.left
57− right: parent.right
58− }
59− source: headerStyle.separatorSource
60− height: styledItem.config.sections.model !== undefined ? units.gu(3) : units.gu(2)
61− asynchronous: true
62− cache: true
63− }
64−
65− Image {
66− id: separatorBottom
67− anchors {
68− top: separator.bottom
69− left: parent.left
70− right: parent.right
71− }
72− source: headerStyle.separatorBottomSource
73− asynchronous: true
74− cache: true
75− }
76−}
qml/Stages/PhoneStage.qml+18−7
@@ -14,12 +14,13 @@
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.2
17+import QtQuick 2.4
18−import Ubuntu.Components 0.1
18+import Ubuntu.Components 1.3
19import Ubuntu.Gestures 0.1
19import Ubuntu.Gestures 0.1
20import Unity.Application 0.1
20import Unity.Application 0.1
21import Unity.Session 0.1
21import Unity.Session 0.1
22import Utils 0.1
22import Utils 0.1
23+import Powerd 0.1
23import "../Components"
24import "../Components"
24
25
25AbstractStage {
26AbstractStage {
@@ -182,7 +183,8 @@ AbstractStage {
182 }
183 }
183 }
184 }
184
185
185− property bool focusedAppDelegateIsDislocated: focusedAppDelegate && focusedAppDelegate.x !== 0
186+ property bool focusedAppDelegateIsDislocated: focusedAppDelegate &&
187+ (focusedAppDelegate.x !== 0 || focusedAppDelegate.xBehavior.running)
186
188
187 function indexOf(appId) {
189 function indexOf(appId) {
188 for (var i = 0; i < root.applicationManager.count; i++) {
190 for (var i = 0; i < root.applicationManager.count; i++) {
@@ -473,7 +475,6 @@ AbstractStage {
473
475
474 property var xBehavior: xBehavior
476 property var xBehavior: xBehavior
475 Behavior on x {
477 Behavior on x {
476− id: xBehavior
477 enabled: root.spreadEnabled &&
478 enabled: root.spreadEnabled &&
478 !spreadView.active &&
479 !spreadView.active &&
479 !snapAnimation.running &&
480 !snapAnimation.running &&
@@ -481,6 +482,7 @@ AbstractStage {
481 priv.animateX &&
482 priv.animateX &&
482 !root.beingResized
483 !root.beingResized
483 UbuntuNumberAnimation {
484 UbuntuNumberAnimation {
485+ id: xBehavior
484 duration: UbuntuAnimation.BriskDuration
486 duration: UbuntuAnimation.BriskDuration
485 }
487 }
486 }
488 }
@@ -520,9 +522,18 @@ AbstractStage {
520 return progress;
522 return progress;
521 }
523 }
522
524
523− // Hiding tiles when their progress is negative or reached the maximum
525+ // Hide tile when progress is such that it will be off screen.
526+ property bool occluded: {
524− visible: (progress >= 0 && progress < 1.7)
527+ if (spreadView.active && (progress >= 0 && progress < 1.7)) return false;
528+ else if (!spreadView.active && isFocused) return false;
529+ else if (xBehavior.running) return false;
525− || (isDash && priv.focusedAppDelegateIsDislocated)
530+ else if (z <= 1 && priv.focusedAppDelegateIsDislocated) return false;
531+ return true;
532+ }
533+
534+ visible: Powerd.status == Powerd.On &&
535+ !greeter.fullyShown &&
536+ !occluded
526
537
527 shellOrientationAngle: root.shellOrientationAngle
538 shellOrientationAngle: root.shellOrientationAngle
528 shellOrientation: root.shellOrientation
539 shellOrientation: root.shellOrientation
qml/Stages/SessionContainer.qml+1−1
@@ -14,7 +14,7 @@
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.4
18import "Animations"
18import "Animations"
19
19
20FocusScope {
20FocusScope {
qml/Stages/ShimStage.qml+2−2
@@ -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.3
17+import QtQuick 2.4
18−import Ubuntu.Components 0.1
18+import Ubuntu.Components 1.3
19
19
20AbstractStage {
20AbstractStage {
21 id: shimStage
21 id: shimStage
qml/Stages/Splash.qml+25−30
@@ -14,12 +14,12 @@
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.2
17+import QtQuick 2.4
18−import Ubuntu.Components 1.1
18+import Ubuntu.Components 1.3
19−import Ubuntu.Components.Themes 0.1
19+import Ubuntu.Components.Themes 1.3
20import "../Components"
20import "../Components"
21
21
22−import Ubuntu.Components.Themes.Ambiance 1.1 as Ambiance
22+import Ubuntu.Components.Themes.Ambiance 1.3 as Ambiance
23
23
24Item {
24Item {
25 id: root
25 id: root
@@ -29,7 +29,7 @@ Item {
29 property color footerColor: d.undefinedColor
29 property color footerColor: d.undefinedColor
30 property alias imageSource: overlaidImage.source
30 property alias imageSource: overlaidImage.source
31 property url icon
31 property url icon
32− property alias title: header.title
32+ property alias title: headerConfig.title
33 property alias showHeader: header.visible
33 property alias showHeader: header.visible
34
34
35 Ambiance.Palette {
35 Ambiance.Palette {
@@ -62,40 +62,36 @@ Item {
62 : root.footerColor
62 : root.footerColor
63
63
64 // FIXME: fake a Theme object as to expose the Palette corresponding to the backgroundColor (see MainViewStyle.qml)
64 // FIXME: fake a Theme object as to expose the Palette corresponding to the backgroundColor (see MainViewStyle.qml)
65− property var theme: QtObject {
65+ readonly property var fakeTheme: QtObject {
66 property string name
66 property string name
67− property Palette palette: Qt.createQmlObject("import QtQuick 2.2;\
67+ property Palette palette: Qt.createQmlObject("import QtQuick 2.4;\
68− import Ubuntu.Components.Themes.%1 1.1;\
68+ import Ubuntu.Components.Themes.%1 1.3;\
69− Palette {}".arg(styledItem.theme.name),
69+ Palette {}".arg(styledItem.fakeTheme.name),
70 styledItem, "dynamicPalette");
70 styledItem, "dynamicPalette");
71 }
71 }
72
72
73 // FIXME: should instead use future toolkit API:
73 // FIXME: should instead use future toolkit API:
74 // style: theme.createStyleComponent("MainViewStyle.qml", styledItem)
74 // style: theme.createStyleComponent("MainViewStyle.qml", styledItem)
75− style: Component { MainViewStyle {theme: styledItem.theme} }
75+ style: Component { MainViewStyle {theme: styledItem.fakeTheme} }
76 }
76 }
77
77
78− StyledItem {
78+ Ambiance.PageHeadStyle {
79 id: header
79 id: header
80 anchors {
80 anchors {
81− left: parent.left
81+ left: parent.left;
82 right: parent.right
82 right: parent.right
83 }
83 }
84− visible: false
84+ property var styledItem: header
85−
85+ // FIXME Keep in sync with SDK's MainView.qml values of these two colors
86− // mimic API of toolkit's AppHeader component required by PageHeadStyle
86+ property color dividerColor: Qt.darker(styledItem.backgroundColor, 1.1)
87− property Item pageStack
87+ property color panelColor: Qt.lighter(styledItem.backgroundColor, 1.1)
88− property Item contents
88+ panelForegroundColor: config.foregroundColor
89− property string title
89+ config: PageHeadConfiguration {
90− property var tabsModel
90+ id: headerConfig
91− property var config: QtObject {
92− property color foregroundColor: styledItem.theme.palette.selected.backgroundText
91+ foregroundColor: styledItem.fakeTheme.palette.selected.backgroundText
93− property var sections: QtObject {}
94 }
92 }
95
93
96− // FIXME: should instead use future toolkit API:
94+ property var contents: null
97− // style: theme.createStyleComponent("PageHeadStyle.qml", header)
98− style: Component { PageHeadStyle {theme: styledItem.theme} }
99 }
95 }
100
96
101 Image {
97 Image {
@@ -121,14 +117,13 @@ Item {
121 visible: d.showIcon
117 visible: d.showIcon
122
118
123 radius: "medium"
119 radius: "medium"
124− borderSource: "none"
120+ aspect: UbuntuShape.Flat
125−
121+ sourceFillMode: Image.PreserveAspectCrop
126− image: Image {
122+ source: Image {
127 id: iconImage
123 id: iconImage
128 sourceSize.width: iconShape.width
124 sourceSize.width: iconShape.width
129 sourceSize.height: iconShape.height
125 sourceSize.height: iconShape.height
130 source: d.showIcon ? root.icon : ""
126 source: d.showIcon ? root.icon : ""
131− fillMode: Image.PreserveAspectCrop
132 }
127 }
133 }
128 }
134
129
@@ -139,7 +134,7 @@ Item {
139 anchors.topMargin: units.gu(2)
134 anchors.topMargin: units.gu(2)
140 fontSize: "large"
135 fontSize: "large"
141
136
142− color: styledItem.theme.palette.selected.backgroundText
137+ color: styledItem.fakeTheme.palette.selected.backgroundText
143 visible: d.showIcon
138 visible: d.showIcon
144 }
139 }
145
140
qml/Stages/SpreadDelegate.qml+3−3
@@ -17,9 +17,9 @@
17 * Daniel d'Andrada <daniel.dandrada@canonical.com>
17 * Daniel d'Andrada <daniel.dandrada@canonical.com>
18 */
18 */
19
19
20−import QtQuick 2.0
20+import QtQuick 2.4
21−import QtQuick.Window 2.0
21+import QtQuick.Window 2.2
22−import Ubuntu.Components 1.1
22+import Ubuntu.Components 1.3
23import "../Components"
23import "../Components"
24
24
25FocusScope {
25FocusScope {
qml/Stages/SpreadMaths.qml+2−2
@@ -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.2
17+import QtQuick 2.4
18−import Ubuntu.Components 1.1
18+import Ubuntu.Components 1.3
19import Utils 0.1
19import Utils 0.1
20
20
21Item {
21Item {
qml/Stages/SurfaceContainer.qml+2−2
@@ -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.4
18−import Ubuntu.Components 1.1
18+import Ubuntu.Components 1.3
19import Ubuntu.Gestures 0.1 // For TouchGate
19import Ubuntu.Gestures 0.1 // For TouchGate
20import Utils 0.1 // for InputWatcher
20import Utils 0.1 // for InputWatcher
21import Unity.Application 0.1 // for MirSurfaceItem
21import Unity.Application 0.1 // for MirSurfaceItem
qml/Stages/TabletStage.qml+19−3
@@ -1,4 +1,4 @@
1−/*
1+/*
2 * Copyright (C) 2014-2015 Canonical, Ltd.
2 * Copyright (C) 2014-2015 Canonical, Ltd.
3 *
3 *
4 * This program is free software; you can redistribute it and/or modify
4 * This program is free software; you can redistribute it and/or modify
@@ -14,11 +14,12 @@
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.4
18−import Ubuntu.Components 0.1
18+import Ubuntu.Components 1.3
19import Ubuntu.Gestures 0.1
19import Ubuntu.Gestures 0.1
20import Unity.Application 0.1
20import Unity.Application 0.1
21import Utils 0.1
21import Utils 0.1
22+import Powerd 0.1
22import "../Components"
23import "../Components"
23
24
24AbstractStage {
25AbstractStage {
@@ -146,6 +147,8 @@ AbstractStage {
146 }
147 }
147 }
148 }
148
149
150+ property bool focusedAppDelegateIsDislocated: focusedAppDelegate &&
151+ (focusedAppDelegate.dragOffset !== 0 || focusedAppDelegate.xTranslateAnimating)
149 function indexOf(appId) {
152 function indexOf(appId) {
150 for (var i = 0; i < ApplicationManager.count; i++) {
153 for (var i = 0; i < ApplicationManager.count; i++) {
151 if (ApplicationManager.get(i).appId == appId) {
154 if (ApplicationManager.get(i).appId == appId) {
@@ -659,6 +662,19 @@ AbstractStage {
659 return tileProgress;
662 return tileProgress;
660 }
663 }
661
664
665+ // TODO: Hiding tile when progress is such that it will be off screen.
666+ property bool occluded: {
667+ if (spreadView.active) return false;
668+ else if (spreadTile.active) return false;
669+ else if (xTranslateAnimating) return false;
670+ else if (z <= 1 && priv.focusedAppDelegateIsDislocated) return false;
671+ return true;
672+ }
673+
674+ visible: Powerd.status == Powerd.On &&
675+ !greeter.fullyShown &&
676+ !occluded
677+
662 animatedProgress: {
678 animatedProgress: {
663 if (spreadView.phase == 0 && (spreadTile.active || spreadView.nextInStack == index)) {
679 if (spreadView.phase == 0 && (spreadTile.active || spreadView.nextInStack == index)) {
664 if (progress < spreadView.positionMarker1) {
680 if (progress < spreadView.positionMarker1) {
qml/Stages/TransformedSpreadDelegate.qml+2−2
@@ -16,9 +16,9 @@
16 * Authors: Michael Zanetti <michael.zanetti@canonical.com>
16 * Authors: Michael Zanetti <michael.zanetti@canonical.com>
17*/
17*/
18
18
19−import QtQuick 2.0
19+import QtQuick 2.4
20import Utils 0.1
20import Utils 0.1
21−import Ubuntu.Components 0.1
21+import Ubuntu.Components 1.3
22
22
23SpreadDelegate {
23SpreadDelegate {
24 id: root
24 id: root
qml/Stages/TransformedTabletSpreadDelegate.qml+4−2
@@ -16,9 +16,9 @@
16 * Authors: Michael Zanetti <michael.zanetti@canonical.com>
16 * Authors: Michael Zanetti <michael.zanetti@canonical.com>
17*/
17*/
18
18
19−import QtQuick 2.0
19+import QtQuick 2.4
20import Utils 0.1
20import Utils 0.1
21−import Ubuntu.Components 0.1
21+import Ubuntu.Components 1.3
22import Unity.Application 0.1
22import Unity.Application 0.1
23
23
24SpreadDelegate {
24SpreadDelegate {
@@ -48,6 +48,7 @@ SpreadDelegate {
48 property bool isInSideStage: false
48 property bool isInSideStage: false
49
49
50 property int dragOffset: 0
50 property int dragOffset: 0
51+ readonly property alias xTranslateAnimating: xTranslateAnimation.running
51
52
52 dropShadow: spreadView.active ||
53 dropShadow: spreadView.active ||
53 (active
54 (active
@@ -144,6 +145,7 @@ SpreadDelegate {
144 spreadView.animateX &&
145 spreadView.animateX &&
145 !spreadView.beingResized
146 !spreadView.beingResized
146 UbuntuNumberAnimation {
147 UbuntuNumberAnimation {
148+ id: xTranslateAnimation
147 duration: UbuntuAnimation.FastDuration
149 duration: UbuntuAnimation.FastDuration
148 }
150 }
149 }
151 }
qml/Stages/WindowDecoration.qml+2−2
@@ -14,9 +14,9 @@
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.3
17+import QtQuick 2.4
18import Unity.Application 0.1 // For Mir singleton
18import Unity.Application 0.1 // For Mir singleton
19−import Ubuntu.Components 1.1
19+import Ubuntu.Components 1.3
20import "../Components"
20import "../Components"
21
21
22MouseArea {
22MouseArea {
qml/Stages/WindowResizeArea.qml+4−2
@@ -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.3
17+import QtQuick 2.4
18−import Ubuntu.Components 1.1
18+import Ubuntu.Components 1.3
19import Utils 0.1
19import Utils 0.1
20import Unity.Application 0.1 // for Mir.cursorName
20import Unity.Application 0.1 // for Mir.cursorName
21
21
@@ -38,6 +38,7 @@ MouseArea {
38
38
39 QtObject {
39 QtObject {
40 id: priv
40 id: priv
41+ objectName: "priv"
41
42
42 property int normalX: 0
43 property int normalX: 0
43 property int normalY: 0
44 property int normalY: 0
@@ -74,6 +75,7 @@ MouseArea {
74 if (windowState === WindowStateStorage.WindowStateMaximized) {
75 if (windowState === WindowStateStorage.WindowStateMaximized) {
75 target.maximize(false)
76 target.maximize(false)
76 }
77 }
78+ priv.updateNormalGeometry();
77 }
79 }
78
80
79 Component.onDestruction: {
81 Component.onDestruction: {
qml/Stages/graphics/background_paper@27.pngdeleted

Binary file not shown.

qml/Tutorial/Arrow.qml+2−2
@@ -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.3
17+import QtQuick 2.4
18−import Ubuntu.Components 1.1
18+import Ubuntu.Components 1.3
19
19
20Item {
20Item {
21 id: root
21 id: root
qml/Tutorial/Slider.qml+2−2
@@ -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.3
17+import QtQuick 2.4
18−import Ubuntu.Components 1.1
18+import Ubuntu.Components 1.3
19
19
20Item {
20Item {
21 id: root
21 id: root
qml/Tutorial/Tick.qml+2−2
@@ -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.3
17+import QtQuick 2.4
18−import Ubuntu.Components 1.1
18+import Ubuntu.Components 1.3
19
19
20MouseArea {
20MouseArea {
21 implicitHeight: tick.height
21 implicitHeight: tick.height
qml/Tutorial/Tutorial.qml+2−2
@@ -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.3
17+import QtQuick 2.4
18−import Ubuntu.Components 1.1
18+import Ubuntu.Components 1.3
19
19
20Item {
20Item {
21 id: root
21 id: root
qml/Tutorial/TutorialBottom.qml+2−2
@@ -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.3
17+import QtQuick 2.4
18−import Ubuntu.Components 1.1
18+import Ubuntu.Components 1.3
19import Ubuntu.Gestures 0.1
19import Ubuntu.Gestures 0.1
20import "../Components"
20import "../Components"
21import "." as LocalComponents
21import "." as LocalComponents
qml/Tutorial/TutorialBottomFinish.qml+2−2
@@ -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.3
17+import QtQuick 2.4
18−import Ubuntu.Components 1.1
18+import Ubuntu.Components 1.3
19import "." as LocalComponents
19import "." as LocalComponents
20
20
21TutorialPage {
21TutorialPage {
qml/Tutorial/TutorialContent.qml+2−2
@@ -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.3
17+import QtQuick 2.4
18−import Ubuntu.Components 1.1
18+import Ubuntu.Components 1.3
19
19
20Item {
20Item {
21 id: root
21 id: root
qml/Tutorial/TutorialLeft.qml+2−2
@@ -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.3
17+import QtQuick 2.4
18−import Ubuntu.Components 1.1
18+import Ubuntu.Components 1.3
19import "." as LocalComponents
19import "." as LocalComponents
20
20
21TutorialPage {
21TutorialPage {
qml/Tutorial/TutorialLeftFinish.qml+2−2
@@ -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.3
17+import QtQuick 2.4
18−import Ubuntu.Components 1.1
18+import Ubuntu.Components 1.3
19import "." as LocalComponents
19import "." as LocalComponents
20
20
21TutorialPage {
21TutorialPage {
qml/Tutorial/TutorialPage.qml+2−2
@@ -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.3
17+import QtQuick 2.4
18−import Ubuntu.Components 1.1
18+import Ubuntu.Components 1.3
19import "../Components"
19import "../Components"
20
20
21Showable {
21Showable {
qml/Tutorial/TutorialRight.qml+2−2
@@ -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.3
17+import QtQuick 2.4
18−import Ubuntu.Components 1.1
18+import Ubuntu.Components 1.3
19import Ubuntu.Gestures 0.1
19import Ubuntu.Gestures 0.1
20import Unity.Application 0.1
20import Unity.Application 0.1
21import "../Components"
21import "../Components"
qml/Wizard/CheckableSetting.qml+5−5
@@ -1,5 +1,5 @@
1/*
1/*
2− * Copyright (C) 2014 Canonical, Ltd.
2+ * Copyright (C) 2014,2015 Canonical, Ltd.
3 *
3 *
4 * This program is free software; you can redistribute it and/or modify
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
5 * it under the terms of the GNU General Public License as published by
@@ -14,9 +14,9 @@
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.3
17+import QtQuick 2.4
18−import Ubuntu.Components 1.1
18+import Ubuntu.Components 1.3
19−import Ubuntu.Components.ListItems 1.0 as ListItem
19+import Ubuntu.Components.ListItems 1.3 as ListItem
20
20
21ListItem.Empty {
21ListItem.Empty {
22 id: listItem
22 id: listItem
@@ -77,7 +77,7 @@ ListItem.Empty {
77 rightMargin: listItem.rightMargin
77 rightMargin: listItem.rightMargin
78 }
78 }
79 wrapMode: Text.Wrap
79 wrapMode: Text.Wrap
80− linkColor: Theme.palette.normal.foregroundText
80+ linkColor: theme.palette.normal.foregroundText
81 onLinkActivated: listItem.linkActivated(link)
81 onLinkActivated: listItem.linkActivated(link)
82 }
82 }
83 }
83 }
qml/Wizard/Page.qml+4−4
@@ -1,5 +1,5 @@
1/*
1/*
2− * Copyright (C) 2013 Canonical, Ltd.
2+ * Copyright (C) 2013,2015 Canonical, Ltd.
3 *
3 *
4 * This program is free software; you can redistribute it and/or modify
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
5 * it under the terms of the GNU General Public License as published by
@@ -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.3
17+import QtQuick 2.4
18−import Ubuntu.Components 1.1
18+import Ubuntu.Components 1.3
19
19
20Item {
20Item {
21 readonly property real buttonMargin: units.gu(2)
21 readonly property real buttonMargin: units.gu(2)
@@ -57,7 +57,7 @@ Item {
57 }
57 }
58 wrapMode: Text.Wrap
58 wrapMode: Text.Wrap
59 text: title
59 text: title
60− color: Theme.palette.normal.baseText
60+ color: theme.palette.normal.baseText
61 font.pixelSize: units.gu(4)
61 font.pixelSize: units.gu(4)
62 }
62 }
63
63
qml/Wizard/Pages.qml+2−2
@@ -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.3
17+import QtQuick 2.4
18−import Ubuntu.Components 1.1
18+import Ubuntu.Components 1.3
19import Ubuntu.SystemSettings.SecurityPrivacy 1.0
19import Ubuntu.SystemSettings.SecurityPrivacy 1.0
20import Wizard 0.1
20import Wizard 0.1
21import "../Components"
21import "../Components"
qml/Wizard/Pages/10-welcome.qml+3−3
@@ -14,9 +14,9 @@
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.3
17+import QtQuick 2.4
18−import Ubuntu.Components 1.1
18+import Ubuntu.Components 1.3
19−import Ubuntu.Components.ListItems 0.1
19+import Ubuntu.Components.ListItems 1.3
20import Ubuntu.SystemSettings.LanguagePlugin 1.0
20import Ubuntu.SystemSettings.LanguagePlugin 1.0
21import Wizard 0.1
21import Wizard 0.1
22import ".." as LocalComponents
22import ".." as LocalComponents
qml/Wizard/Pages/20-sim.qml+2−2
@@ -14,9 +14,9 @@
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.4
18import MeeGo.QOfono 0.2
18import MeeGo.QOfono 0.2
19−import Ubuntu.Components 0.1
19+import Ubuntu.Components 1.3
20import ".." as LocalComponents
20import ".." as LocalComponents
21
21
22LocalComponents.Page {
22LocalComponents.Page {
qml/Wizard/Pages/30-passwd-type.qml+7−7
@@ -1,5 +1,5 @@
1/*
1/*
2− * Copyright (C) 2014 Canonical, Ltd.
2+ * Copyright (C) 2014,2015 Canonical, Ltd.
3 *
3 *
4 * This program is free software; you can redistribute it and/or modify
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
5 * it under the terms of the GNU General Public License as published by
@@ -14,9 +14,9 @@
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.3
17+import QtQuick 2.4
18−import Ubuntu.Components 1.1
18+import Ubuntu.Components 1.3
19−import Ubuntu.Components.ListItems 1.0
19+import Ubuntu.Components.ListItems 1.3
20import Ubuntu.SystemSettings.SecurityPrivacy 1.0
20import Ubuntu.SystemSettings.SecurityPrivacy 1.0
21import ".." as LocalComponents
21import ".." as LocalComponents
22
22
@@ -111,13 +111,13 @@ LocalComponents.Page {
111
111
112 Component.onCompleted: {
112 Component.onCompleted: {
113 // A visible selected background looks bad in ListItem widgets with our theme
113 // A visible selected background looks bad in ListItem widgets with our theme
114− originalBackground = Theme.palette.selected.background
114+ originalBackground = theme.palette.selected.background
115− Theme.palette.selected.background = "transparent"
115+ theme.palette.selected.background = "transparent"
116 }
116 }
117
117
118 Component.onDestruction: {
118 Component.onDestruction: {
119 // Restore original theme background
119 // Restore original theme background
120− Theme.palette.selected.background = originalBackground
120+ theme.palette.selected.background = originalBackground
121 }
121 }
122 }
122 }
123 }
123 }
qml/Wizard/Pages/40-wifi.qml+3−3
@@ -14,11 +14,11 @@
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.4
18import QMenuModel 0.1 as QMenuModel
18import QMenuModel 0.1 as QMenuModel
19import QtSystemInfo 5.0
19import QtSystemInfo 5.0
20−import Ubuntu.Components 0.1
20+import Ubuntu.Components 1.3
21−import Ubuntu.Components.ListItems 0.1 as ListItem
21+import Ubuntu.Components.ListItems 1.3 as ListItem
22import Ubuntu.Settings.Menus 0.1 as Menus
22import Ubuntu.Settings.Menus 0.1 as Menus
23import ".." as LocalComponents
23import ".." as LocalComponents
24
24
qml/Wizard/Pages/50-location.qml+4−4
@@ -1,5 +1,5 @@
1/*
1/*
2− * Copyright (C) 2013,2014 Canonical, Ltd.
2+ * Copyright (C) 2013-2015 Canonical, Ltd.
3 *
3 *
4 * This program is free software; you can redistribute it and/or modify
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
5 * it under the terms of the GNU General Public License as published by
@@ -14,11 +14,11 @@
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.3
17+import QtQuick 2.4
18import AccountsService 0.1
18import AccountsService 0.1
19import QMenuModel 0.1 as QMenuModel
19import QMenuModel 0.1 as QMenuModel
20import Qt.labs.folderlistmodel 2.1
20import Qt.labs.folderlistmodel 2.1
21−import Ubuntu.Components 1.1
21+import Ubuntu.Components 1.3
22import ".." as LocalComponents
22import ".." as LocalComponents
23
23
24LocalComponents.Page {
24LocalComponents.Page {
@@ -98,7 +98,7 @@ LocalComponents.Page {
98 anchors.leftMargin: hereCheck.labelOffset
98 anchors.leftMargin: hereCheck.labelOffset
99 anchors.right: parent.right
99 anchors.right: parent.right
100 wrapMode: Text.Wrap
100 wrapMode: Text.Wrap
101− linkColor: Theme.palette.normal.foregroundText
101+ linkColor: theme.palette.normal.foregroundText
102 // Translators: HERE is a trademark for Nokia's location service, you probably shouldn't translate it
102 // Translators: HERE is a trademark for Nokia's location service, you probably shouldn't translate it
103 text: i18n.tr("By selecting this option you agree to the Nokia HERE <a href='#'>terms and conditions</a>.")
103 text: i18n.tr("By selecting this option you agree to the Nokia HERE <a href='#'>terms and conditions</a>.")
104 onLinkActivated: pageStack.load(Qt.resolvedUrl("here-terms.qml"))
104 onLinkActivated: pageStack.load(Qt.resolvedUrl("here-terms.qml"))
qml/Wizard/Pages/60-reporting.qml+2−2
@@ -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.4
18−import Ubuntu.Components 0.1
18+import Ubuntu.Components 1.3
19import Ubuntu.SystemSettings.Diagnostics 1.0
19import Ubuntu.SystemSettings.Diagnostics 1.0
20import ".." as LocalComponents
20import ".." as LocalComponents
21
21
qml/Wizard/Pages/80-finished.qml+2−2
@@ -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.4
18−import Ubuntu.Components 0.1
18+import Ubuntu.Components 1.3
19import ".." as LocalComponents
19import ".." as LocalComponents
20
20
21LocalComponents.Page {
21LocalComponents.Page {
qml/Wizard/Pages/here-terms.qml+4−4
@@ -1,5 +1,5 @@
1/*
1/*
2− * Copyright (C) 2014 Canonical, Ltd.
2+ * Copyright (C) 2014,2015 Canonical, Ltd.
3 *
3 *
4 * This program is free software; you can redistribute it and/or modify
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
5 * it under the terms of the GNU General Public License as published by
@@ -14,10 +14,10 @@
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.3
17+import QtQuick 2.4
18import AccountsService 0.1
18import AccountsService 0.1
19import Qt.labs.folderlistmodel 2.1
19import Qt.labs.folderlistmodel 2.1
20−import Ubuntu.Components 1.1
20+import Ubuntu.Components 1.3
21import Ubuntu.Web 0.2
21import Ubuntu.Web 0.2
22import ".." as LocalComponents
22import ".." as LocalComponents
23
23
@@ -102,7 +102,7 @@ LocalComponents.Page {
102 anchors.left: parent.left
102 anchors.left: parent.left
103 anchors.right: parent.right
103 anchors.right: parent.right
104 wrapMode: Text.Wrap
104 wrapMode: Text.Wrap
105− linkColor: Theme.palette.normal.foregroundText
105+ linkColor: theme.palette.normal.foregroundText
106 onLinkActivated: {
106 onLinkActivated: {
107 webview.url = link
107 webview.url = link
108 termsLabel.visible = false
108 termsLabel.visible = false
qml/Wizard/Pages/passwd-confirm.qml+2−2
@@ -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.3
17+import QtQuick 2.4
18−import Ubuntu.Components 1.1
18+import Ubuntu.Components 1.3
19import Ubuntu.SystemSettings.SecurityPrivacy 1.0
19import Ubuntu.SystemSettings.SecurityPrivacy 1.0
20import ".." as LocalComponents
20import ".." as LocalComponents
21import "../../Components" as UnityComponents
21import "../../Components" as UnityComponents
qml/Wizard/Pages/passwd-set.qml+2−2
@@ -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.3
17+import QtQuick 2.4
18−import Ubuntu.Components 1.1
18+import Ubuntu.Components 1.3
19import Ubuntu.SystemSettings.SecurityPrivacy 1.0
19import Ubuntu.SystemSettings.SecurityPrivacy 1.0
20import ".." as LocalComponents
20import ".." as LocalComponents
21import "../../Components" as UnityComponents
21import "../../Components" as UnityComponents
qml/Wizard/StackButton.qml+4−4
@@ -1,5 +1,5 @@
1/*
1/*
2− * Copyright (C) 2014 Canonical, Ltd.
2+ * Copyright (C) 2014,2015 Canonical, Ltd.
3 *
3 *
4 * This program is free software; you can redistribute it and/or modify
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
5 * it under the terms of the GNU General Public License as published by
@@ -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.3
17+import QtQuick 2.4
18−import Ubuntu.Components 1.1
18+import Ubuntu.Components 1.3
19
19
20AbstractButton {
20AbstractButton {
21 id: stackButton
21 id: stackButton
@@ -32,7 +32,7 @@ AbstractButton {
32 anchors.verticalCenter: parent.verticalCenter
32 anchors.verticalCenter: parent.verticalCenter
33 anchors.left: parent.left
33 anchors.left: parent.left
34 anchors.right: parent.right
34 anchors.right: parent.right
35− color: enabled ? Theme.palette.selected.backgroundText : Qt.darker(Theme.palette.selected.backgroundText, 1.5)
35+ color: enabled ? theme.palette.selected.backgroundText : Qt.darker(theme.palette.selected.backgroundText, 1.5)
36 text: {
36 text: {
37 if (backArrow) {
37 if (backArrow) {
38 // Translators: This is the arrow for "Back" buttons
38 // Translators: This is the arrow for "Back" buttons
qml/Wizard/Wizard.qml+2−2
@@ -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.3
17+import QtQuick 2.4
18−import Ubuntu.Components 1.1
18+import Ubuntu.Components 1.3
19import Wizard 0.1
19import Wizard 0.1
20import "../Components"
20import "../Components"
21
21
tests/CMakeLists.txt+1
@@ -132,3 +132,4 @@ add_subdirectory(libs)
132add_subdirectory(plugins)
132add_subdirectory(plugins)
133add_subdirectory(qmltests)
133add_subdirectory(qmltests)
134add_subdirectory(whitespace)
134add_subdirectory(whitespace)
135+add_subdirectory(imports)
tests/autopilot/unity8/dash.py+3−3
@@ -158,7 +158,7 @@ class Dash(ubuntuuitoolkit.UbuntuUIToolkitCustomProxyObjectBase):
158 def enter_search_query(self, query, keyboard):
158 def enter_search_query(self, query, keyboard):
159 current_header = self._get_current_page_header()
159 current_header = self._get_current_page_header()
160 search_button = \
160 search_button = \
161− current_header.select_single(objectName="search_header_button")
161+ current_header.select_single(objectName="search_action_button")
162 self.pointing_device.move(
162 self.pointing_device.move(
163 search_button.globalRect.x + search_button.width / 2,
163 search_button.globalRect.x + search_button.width / 2,
164 search_button.globalRect.y + search_button.height / 2)
164 search_button.globalRect.y + search_button.height / 2)
@@ -224,7 +224,7 @@ class GenericScopeView(ubuntuuitoolkit.UbuntuUIToolkitCustomProxyObjectBase):
224 """
224 """
225 category_element = self._get_category_element(category)
225 category_element = self._get_category_element(category)
226 icon = category_element.wait_select_single(
226 icon = category_element.wait_select_single(
227− 'AbstractButton', title=title)
227+ 'UCAbstractButton', title=title)
228 list_view = self.select_single(
228 list_view = self.select_single(
229 ListViewWithPageHeader, objectName='categoryListView')
229 ListViewWithPageHeader, objectName='categoryListView')
230 list_view.swipe_child_into_view(icon)
230 list_view.swipe_child_into_view(icon)
@@ -247,7 +247,7 @@ class GenericScopeView(ubuntuuitoolkit.UbuntuUIToolkitCustomProxyObjectBase):
247 """
247 """
248 category_element = self._get_category_element(category)
248 category_element = self._get_category_element(category)
249 see_all = category_element.select_single(objectName='seeAll')
249 see_all = category_element.select_single(objectName='seeAll')
250− application_cards = category_element.select_many('AbstractButton')
250+ application_cards = category_element.select_many('UCAbstractButton')
251
251
252 application_cards = sorted(
252 application_cards = sorted(
253 (card for card in application_cards
253 (card for card in application_cards
tests/autopilot/unity8/process_helpers.py+1−1
@@ -146,7 +146,7 @@ def stop_job(name):
146 :raises CalledProcessError: if the job failed to stop.
146 :raises CalledProcessError: if the job failed to stop.
147
147
148 """
148 """
149− logger.info('Stoping job {}.'.format(name))
149+ logger.info('Stopping job {}.'.format(name))
150 command = ['/sbin/initctl', 'stop', name]
150 command = ['/sbin/initctl', 'stop', name]
151 try:
151 try:
152 output = subprocess.check_output(
152 output = subprocess.check_output(
tests/imports/CMakeLists.txtnew file+5
@@ -0,0 +1,5 @@
1+
2+#
3+# Test that all imports for QtQuick and Ubuntu.Components use the wanted version
4+#
5+add_test(imports ${CMAKE_CURRENT_SOURCE_DIR}/check_imports.py ${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR})
tests/imports/check_imports.pynew file+125
@@ -0,0 +1,125 @@
1+#! /usr/bin/env python3
2+
3+#
4+# Copyright (C) 2015 Canonical Ltd
5+#
6+# This program is free software: you can redistribute it and/or modify
7+# it under the terms of the GNU General Public License version 3 as
8+# published by the Free Software Foundation.
9+#
10+# This program is distributed in the hope that it will be useful,
11+# but WITHOUT ANY WARRANTY; without even the implied warranty of
12+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+# GNU General Public License for more details.
14+#
15+# You should have received a copy of the GNU General Public License
16+# along with this program. If not, see <http://www.gnu.org/licenses/>.
17+#
18+
19+#
20+# Little helper program to test that all source files import
21+# versions we want
22+#
23+# Usage: check_imports.py directory [ignore_prefix]
24+#
25+# The directory specifies the (recursive) location of the source files. Any
26+# files with a path that starts with ignore_prefix are not checked. This is
27+# useful to exclude files that are generated into the build directory.
28+#
29+# See the file_pat definition below for a list of files that are checked.
30+#
31+
32+from __future__ import print_function
33+
34+import argparse
35+import os
36+import re
37+import sys
38+
39+
40+# Print msg on stderr, preceded by program name and followed by newline
41+def error(msg):
42+ print(os.path.basename(sys.argv[0]) + ": " + msg, file=sys.stderr)
43+
44+
45+# Function to raise errors encountered by os.walk
46+def raise_error(e):
47+ raise e
48+
49+# Qt Quick patterns
50+# If you increase this make sure you increase
51+# the Qt version in debian/control and in CMakeLists.txt
52+quick_pat = re.compile(r'.*import QtQuick.*$')
53+quick_good_pat = re.compile(r'.*import QtQuick 2\.4.*$')
54+quick_layouts_good_pat = re.compile(r'.*import QtQuick.Layouts 1\.1.*$')
55+quick_window_good_pat = re.compile(r'.*import QtQuick.Window 2\.2.*$')
56+
57+# Ubuntu Components patterns
58+ubuntu_components_pat = re.compile(r'.*import Ubuntu.Components.*')
59+ubuntu_good_components_pat = re.compile(r'.*import Ubuntu.Components.*1\.3.*')
60+
61+def scan_for_bad_import(file_path, all_pat, good_pats):
62+ errors = []
63+ with open(file_path, 'rt', encoding='utf-8') as ifile:
64+ for lino, line in enumerate(ifile, start=1):
65+ if all_pat.match(line):
66+ good_found = False
67+ for good_pat in good_pats:
68+ if good_pat.match(line):
69+ good_found = True
70+ if not good_found:
71+ errors.append(lino)
72+ if 0 < len(errors) <= 10:
73+ if len(errors) > 1:
74+ plural = 's'
75+ else:
76+ plural = ''
77+ print(
78+ "%s: bad import version in line%s %s" % (
79+ file_path, plural, ", ".join((str(i) for i in errors))))
80+ elif errors:
81+ print("%s: bad import version in multiple lines" % file_path)
82+ return bool(errors)
83+
84+# Parse args
85+
86+parser = argparse.ArgumentParser(
87+ description='Test that source files contain the wanted import version.')
88+parser.add_argument(
89+ 'dir', nargs=1,
90+ help='The directory to (recursively) search for source files')
91+parser.add_argument(
92+ 'ignore_prefix', nargs='?', default=None,
93+ help='Ignore source files with a path that starts with the given prefix.')
94+args = parser.parse_args()
95+
96+# Files we want to check for import version.
97+
98+file_pat = (
99+ r'(.*\.(js|qml)$)')
100+pat = re.compile(file_pat)
101+
102+# Find all the files with matching file extension in the specified
103+# directory and check them
104+
105+directory = os.path.abspath(args.dir[0])
106+ignore = args.ignore_prefix and os.path.abspath(args.ignore_prefix) or None
107+
108+found_bad_import = False
109+try:
110+ for root, dirs, files in os.walk(directory, onerror=raise_error):
111+ for file in files:
112+ path = os.path.join(root, file)
113+ if not (ignore and path.startswith(ignore)) and pat.match(file):
114+ quick_good_pats = [quick_good_pat, quick_layouts_good_pat, quick_window_good_pat]
115+ if scan_for_bad_import(path, quick_pat, quick_good_pats):
116+ found_bad_import = True
117+ if scan_for_bad_import(path, ubuntu_components_pat, [ubuntu_good_components_pat]):
118+ found_bad_import = True
119+
120+except OSError as e:
121+ error("cannot create file list for \"" + dir + "\": " + e.strerror)
122+ sys.exit(1)
123+
124+if found_bad_import:
125+ sys.exit(1)
tests/mocks/MeeGo/QOfono/MockOfonoSimManager.qml+1−1
@@ -14,7 +14,7 @@
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.3
17+import QtQuick 2.4
18import MeeGo.QOfono 0.2
18import MeeGo.QOfono 0.2
19
19
20Item {
20Item {
tests/mocks/QMenuModel/QDBusActionGroup.qml+2−2
@@ -17,7 +17,7 @@
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
18 */
19
19
20−import QtQuick 2.0
20+import QtQuick 2.4
21import Ubuntu.Settings.Menus 0.1 as Menus
21import Ubuntu.Settings.Menus 0.1 as Menus
22import QMenuModel 0.1
22import QMenuModel 0.1
23
23
@@ -34,7 +34,7 @@ QtObject {
34
34
35 function action(actionName) {
35 function action(actionName) {
36 return Qt.createQmlObject("
36 return Qt.createQmlObject("
37− import QtQuick 2.3
37+ import QtQuick 2.4
38 import QMenuModel 0.1
38 import QMenuModel 0.1
39
39
40 QtObject {
40 QtObject {
tests/mocks/QMenuModel/UnityMenuAction.qml+1−1
@@ -17,7 +17,7 @@
17 * Nick Dedekind <nick.dedekind@canonical.com>
17 * Nick Dedekind <nick.dedekind@canonical.com>
18 */
18 */
19
19
20−import QtQuick 2.0
20+import QtQuick 2.4
21import QMenuModel 0.1
21import QMenuModel 0.1
22
22
23QtObject {
23QtObject {
tests/mocks/Ubuntu/SystemSettings/LanguagePlugin/MockLanguagePlugin.qml+1−1
@@ -14,7 +14,7 @@
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.3
17+import QtQuick 2.4
18
18
19Item {
19Item {
20 property var languageNames: ["English", "French", "Spanish"]
20 property var languageNames: ["English", "French", "Spanish"]
tests/mocks/Ubuntu/Web/WebView.qml+1−1
@@ -15,7 +15,7 @@
15 *
15 *
16 */
16 */
17
17
18−import QtQuick 2.0
18+import QtQuick 2.4
19
19
20Item {
20Item {
21 property url url
21 property url url
tests/mocks/Unity/Application/MirSurface.cpp+41−14
@@ -31,7 +31,7 @@ MirSurface::MirSurface(const QString& name,
31 , m_screenshotUrl(screenshot)
31 , m_screenshotUrl(screenshot)
32 , m_qmlFilePath(qmlFilePath)
32 , m_qmlFilePath(qmlFilePath)
33 , m_live(true)
33 , m_live(true)
34− , m_viewCount(0)
34+ , m_visible(true)
35 , m_activeFocus(false)
35 , m_activeFocus(false)
36 , m_width(-1)
36 , m_width(-1)
37 , m_height(-1)
37 , m_height(-1)
@@ -73,6 +73,11 @@ bool MirSurface::live() const
73 return m_live;
73 return m_live;
74}
74}
75
75
76+bool MirSurface::visible() const
77+{
78+ return m_visible;
79+}
80+
76void MirSurface::setLive(bool live)
81void MirSurface::setLive(bool live)
77{
82{
78// qDebug().nospace() << "MirSurface::setLive("<<live<<") " << name();
83// qDebug().nospace() << "MirSurface::setLive("<<live<<") " << name();
@@ -82,7 +87,7 @@ void MirSurface::setLive(bool live)
82 m_live = live;
87 m_live = live;
83 Q_EMIT liveChanged(live);
88 Q_EMIT liveChanged(live);
84
89
85− if (!m_live && m_viewCount == 0) {
90+ if (!m_live && m_views.count() == 0) {
86 deleteLater();
91 deleteLater();
87 }
92 }
88}
93}
@@ -120,27 +125,49 @@ void MirSurface::setOrientationAngle(Mir::OrientationAngle angle)
120 Q_EMIT orientationAngleChanged(angle);
125 Q_EMIT orientationAngleChanged(angle);
121}
126}
122
127
123−void MirSurface::incrementViewCount()
128+
129+
130+void MirSurface::registerView(qintptr viewId)
124{
131{
125− ++m_viewCount;
132+ m_views.insert(viewId, MirSurface::View{false});
126−// qDebug().nospace() << "MirSurface::incrementViewCount() viewCount(after)=" << m_viewCount << " " << name();
133+// qDebug().nospace() << "MirSurface[" << name() << "]::registerView(" << viewId << ")"
134+// << " after=" << m_views.count();
127}
135}
128
136
129−void MirSurface::decrementViewCount()
137+void MirSurface::unregisterView(qintptr viewId)
130{
138{
131− --m_viewCount;
139+// qDebug().nospace() << "MirSurface[" << name() << "]::unregisterView(" << viewId << ")"
132−// qDebug().nospace() << "MirSurface::decrementViewCount() viewCount(after)=" << m_viewCount << " " << name();
140+// << " after=" << m_views.count() << " live=" << m_live;
133−
141+ m_views.remove(viewId);
134− Q_ASSERT(m_viewCount >= 0);
135−
136− if (!m_live && m_viewCount == 0) {
142+ if (!m_live && m_views.count() == 0) {
137 deleteLater();
143 deleteLater();
138 }
144 }
145+ updateVisibility();
139}
146}
140
147
141−int MirSurface::viewCount() const
148+void MirSurface::setViewVisibility(qintptr viewId, bool visible)
142{
149{
143− return m_viewCount;
150+ if (!m_views.contains(viewId)) return;
151+
152+ m_views[viewId].visible = visible;
153+ updateVisibility();
154+}
155+
156+void MirSurface::updateVisibility()
157+{
158+ bool newVisible = false;
159+ QHashIterator<qintptr, View> i(m_views);
160+ while (i.hasNext()) {
161+ i.next();
162+ newVisible |= i.value().visible;
163+ }
164+
165+ if (newVisible != visible()) {
166+// qDebug().nospace() << "MirSurface[" << name() << "]::updateVisibility(" << newVisible << ")";
167+
168+ m_visible = newVisible;
169+ Q_EMIT visibleChanged(m_visible);
170+ }
144}
171}
145
172
146bool MirSurface::activeFocus() const
173bool MirSurface::activeFocus() const
tests/mocks/Unity/Application/MirSurface.h+14−4
@@ -19,6 +19,7 @@
19
19
20#include <QObject>
20#include <QObject>
21#include <QUrl>
21#include <QUrl>
22+#include <QHash>
22
23
23// unity-api
24// unity-api
24#include <unity/shell/application/MirSurfaceInterface.h>
25#include <unity/shell/application/MirSurfaceInterface.h>
@@ -58,6 +59,8 @@ public:
58
59
59 bool live() const override;
60 bool live() const override;
60
61
62+ bool visible() const override;
63+
61 Mir::OrientationAngle orientationAngle() const override;
64 Mir::OrientationAngle orientationAngle() const override;
62 void setOrientationAngle(Mir::OrientationAngle) override;
65 void setOrientationAngle(Mir::OrientationAngle) override;
63
66
@@ -66,9 +69,10 @@ public:
66
69
67 Q_INVOKABLE void setLive(bool live);
70 Q_INVOKABLE void setLive(bool live);
68
71
69− void incrementViewCount();
72+ void registerView(qintptr viewId);
70− void decrementViewCount();
73+ void unregisterView(qintptr viewId);
74+ void setViewVisibility(qintptr viewId, bool visible);
71− int viewCount() const;
75+ int viewCount() const { return m_views.count(); }
72
76
73 int width() const;
77 int width() const;
74 int height() const;
78 int height() const;
@@ -97,6 +101,8 @@ Q_SIGNALS:
97 void activeFocusChanged(bool);
101 void activeFocusChanged(bool);
98
102
99private:
103private:
104+ void updateVisibility();
105+
100 const QString m_name;
106 const QString m_name;
101 const Mir::Type m_type;
107 const Mir::Type m_type;
102 Mir::State m_state;
108 Mir::State m_state;
@@ -104,10 +110,14 @@ private:
104 QUrl m_screenshotUrl;
110 QUrl m_screenshotUrl;
105 QUrl m_qmlFilePath;
111 QUrl m_qmlFilePath;
106 bool m_live;
112 bool m_live;
107− int m_viewCount;
113+ bool m_visible;
108 bool m_activeFocus;
114 bool m_activeFocus;
109 int m_width;
115 int m_width;
110 int m_height;
116 int m_height;
117+ struct View {
118+ bool visible;
119+ };
120+ QHash<qintptr, View> m_views;
111};
121};
112
122
113#endif // MOCK_MIR_SURFACE_H
123#endif // MOCK_MIR_SURFACE_H
tests/mocks/Unity/Application/MirSurfaceItem.cpp+12−2
@@ -44,6 +44,8 @@ MirSurfaceItem::MirSurfaceItem(QQuickItem *parent)
44 Qt::ExtraButton5 | Qt::ExtraButton6 | Qt::ExtraButton7 | Qt::ExtraButton8 |
44 Qt::ExtraButton5 | Qt::ExtraButton6 | Qt::ExtraButton7 | Qt::ExtraButton8 |
45 Qt::ExtraButton9 | Qt::ExtraButton10 | Qt::ExtraButton11 |
45 Qt::ExtraButton9 | Qt::ExtraButton10 | Qt::ExtraButton11 |
46 Qt::ExtraButton12 | Qt::ExtraButton13);
46 Qt::ExtraButton12 | Qt::ExtraButton13);
47+
48+ connect(this, &QQuickItem::visibleChanged, this, &MirSurfaceItem::updateMirSurfaceVisibility);
47}
49}
48
50
49MirSurfaceItem::~MirSurfaceItem()
51MirSurfaceItem::~MirSurfaceItem()
@@ -194,17 +196,18 @@ void MirSurfaceItem::setSurface(MirSurfaceInterface* surface)
194 m_qmlContentComponent = nullptr;
196 m_qmlContentComponent = nullptr;
195
197
196 disconnect(m_qmlSurface, nullptr, this, nullptr);
198 disconnect(m_qmlSurface, nullptr, this, nullptr);
197− m_qmlSurface->decrementViewCount();
199+ m_qmlSurface->unregisterView((qintptr)this);
198 }
200 }
199
201
200 m_qmlSurface = static_cast<MirSurface*>(surface);
202 m_qmlSurface = static_cast<MirSurface*>(surface);
201
203
202 if (m_qmlSurface) {
204 if (m_qmlSurface) {
203− m_qmlSurface->incrementViewCount();
205+ m_qmlSurface->registerView((qintptr)this);
204
206
205 m_qmlSurface->setActiveFocus(hasActiveFocus());
207 m_qmlSurface->setActiveFocus(hasActiveFocus());
206
208
207 updateSurfaceSize();
209 updateSurfaceSize();
210+ updateMirSurfaceVisibility();
208
211
209 connect(m_qmlSurface, &MirSurface::orientationAngleChanged, this, &MirSurfaceItem::orientationAngleChanged);
212 connect(m_qmlSurface, &MirSurface::orientationAngleChanged, this, &MirSurfaceItem::orientationAngleChanged);
210 connect(m_qmlSurface, &MirSurface::screenshotUrlChanged, this, &MirSurfaceItem::updateScreenshot);
213 connect(m_qmlSurface, &MirSurface::screenshotUrlChanged, this, &MirSurfaceItem::updateScreenshot);
@@ -253,6 +256,13 @@ void MirSurfaceItem::itemChange(ItemChange change, const ItemChangeData & value)
253 }
256 }
254}
257}
255
258
259+void MirSurfaceItem::updateMirSurfaceVisibility()
260+{
261+ if (!m_qmlSurface) return;
262+
263+ m_qmlSurface->setViewVisibility((qintptr)this, isVisible());
264+}
265+
256void MirSurfaceItem::setConsumesInput(bool value)
266void MirSurfaceItem::setConsumesInput(bool value)
257{
267{
258 if (m_consumesInput != value) {
268 if (m_consumesInput != value) {
tests/mocks/Unity/Application/MirSurfaceItem.h+1
@@ -87,6 +87,7 @@ protected:
87private Q_SLOTS:
87private Q_SLOTS:
88 void onComponentStatusChanged(QQmlComponent::Status status);
88 void onComponentStatusChanged(QQmlComponent::Status status);
89 void updateScreenshot(QUrl screenshot);
89 void updateScreenshot(QUrl screenshot);
90+ void updateMirSurfaceVisibility();
90
91
91private:
92private:
92 void createQmlContentItem();
93 void createQmlContentItem();
tests/mocks/Unity/Application/resources/MirSurfaceItem.qml+1−1
@@ -14,7 +14,7 @@
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.4
18
18
19Rectangle {
19Rectangle {
20 id: root
20 id: root
tests/mocks/Unity/Application/resources/VirtualKeyboard.qml+1−1
@@ -14,7 +14,7 @@
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.4
18import Unity.Application 0.1
18import Unity.Application 0.1
19
19
20Item {
20Item {
tests/mocks/Unity/Indicators/ActionRootState.qml+1−1
@@ -17,7 +17,7 @@
17 * Nick Dedekind <nick.dedekind@canonical.com>
17 * Nick Dedekind <nick.dedekind@canonical.com>
18 */
18 */
19
19
20−import QtQuick 2.0
20+import QtQuick 2.4
21
21
22QtObject {
22QtObject {
23 property var actionGroup
23 property var actionGroup
tests/mocks/Unity/Indicators/IndicatorsModel.qml+1−1
@@ -14,7 +14,7 @@
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.4
18import Unity.Indicators 0.1 as Indicators
18import Unity.Indicators 0.1 as Indicators
19
19
20Indicators.FakeIndicatorsModel {
20Indicators.FakeIndicatorsModel {
tests/mocks/Unity/Indicators/ModelActionRootState.qml+1−1
@@ -17,7 +17,7 @@
17 * Nick Dedekind <nick.dedekind@canonical.com>
17 * Nick Dedekind <nick.dedekind@canonical.com>
18 */
18 */
19
19
20−import QtQuick 2.0
20+import QtQuick 2.4
21
21
22Item {
22Item {
23 property var menu: null
23 property var menu: null
tests/mocks/Utils/HomeKeyWatcher.qml+1−1
@@ -14,7 +14,7 @@
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.4
18
18
19QtObject {
19QtObject {
20 signal activated()
20 signal activated()
tests/plugins/Dash/cardcreator/1.res+7−8
@@ -2,7 +2,7 @@ AbstractButton {
2 id: root;
2 id: root;
3 property var components;
3 property var components;
4 property var cardData;
4 property var cardData;
5− property var artShapeBorderSource: undefined;
5+ property string artShapeStyle: "inset";
6 property real fontScale: 1.0;
6 property real fontScale: 1.0;
7 property var scopeStyle: null;
7 property var scopeStyle: null;
8 property int titleAlignment: Text.AlignLeft;
8 property int titleAlignment: Text.AlignLeft;
@@ -14,7 +14,6 @@ AbstractButton {
14 implicitWidth: childrenRect.width;
14 implicitWidth: childrenRect.width;
15 enabled: true;
15 enabled: true;
16
16
17−onArtShapeBorderSourceChanged: { if (artShapeBorderSource !== undefined && artShapeLoader.item) artShapeLoader.item.borderSource = artShapeBorderSource; }
18readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1);
17readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1);
19Item {
18Item {
20 id: artShapeHolder;
19 id: artShapeHolder;
@@ -30,10 +29,9 @@ Item {
30 sourceComponent: Item {
29 sourceComponent: Item {
31 id: artShape;
30 id: artShape;
32 objectName: "artShape";
31 objectName: "artShape";
33− property bool doShapeItem: components["art"]["conciergeMode"] !== true;
32+ readonly property bool doShapeItem: components["art"]["conciergeMode"] !== true;
34 visible: image.status == Image.Ready;
33 visible: image.status == Image.Ready;
35 readonly property alias image: artImage;
34 readonly property alias image: artImage;
36− property alias borderSource: artShapeShape.borderSource;
37 ShaderEffectSource {
35 ShaderEffectSource {
38 id: artShapeSource;
36 id: artShapeSource;
39 sourceItem: artImage;
37 sourceItem: artImage;
@@ -42,16 +40,17 @@ Item {
42 height: 1;
40 height: 1;
43 hideSource: doShapeItem;
41 hideSource: doShapeItem;
44 }
42 }
45− Shape {
43+ UbuntuShape {
46 id: artShapeShape;
44 id: artShapeShape;
47− image: artShapeSource;
45+ source: artShapeSource;
48 anchors.fill: parent;
46 anchors.fill: parent;
49 visible: doShapeItem;
47 visible: doShapeItem;
50 radius: "medium";
48 radius: "medium";
49+ aspect: root.artShapeStyle === "inset" ? UbuntuShape.Inset : UbuntuShape.Flat;
51 }
50 }
52 readonly property real fixedArtShapeSizeAspect: (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) ? root.fixedArtShapeSize.width / root.fixedArtShapeSize.height : -1;
51 readonly property real fixedArtShapeSizeAspect: (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) ? root.fixedArtShapeSize.width / root.fixedArtShapeSize.height : -1;
53 readonly property real aspect: fixedArtShapeSizeAspect > 0 ? fixedArtShapeSizeAspect : components !== undefined ? components["art"]["aspect-ratio"] : 1;
52 readonly property real aspect: fixedArtShapeSizeAspect > 0 ? fixedArtShapeSizeAspect : components !== undefined ? components["art"]["aspect-ratio"] : 1;
54− Component.onCompleted: { updateWidthHeightBindings(); if (artShapeBorderSource !== undefined) borderSource = artShapeBorderSource; }
53+ Component.onCompleted: { updateWidthHeightBindings(); }
55 Connections { target: root; onFixedArtShapeSizeChanged: updateWidthHeightBindings(); }
54 Connections { target: root; onFixedArtShapeSizeChanged: updateWidthHeightBindings(); }
56 function updateWidthHeightBindings() {
55 function updateWidthHeightBindings() {
57 if (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) {
56 if (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) {
@@ -87,7 +86,7 @@ Label {
87 wrapMode: Text.Wrap;
86 wrapMode: Text.Wrap;
88 maximumLineCount: 2;
87 maximumLineCount: 2;
89 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
88 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
90− color: root.scopeStyle ? root.scopeStyle.foreground : Theme.palette.normal.baseText;
89+ color: root.scopeStyle ? root.scopeStyle.foreground : theme.palette.normal.baseText;
91 visible: showHeader ;
90 visible: showHeader ;
92 width: undefined;
91 width: undefined;
93 text: root.title;
92 text: root.title;
tests/plugins/Dash/cardcreator/2.res+9−8
@@ -2,7 +2,7 @@ AbstractButton {
2 id: root;
2 id: root;
3 property var components;
3 property var components;
4 property var cardData;
4 property var cardData;
5− property var artShapeBorderSource: undefined;
5+ property string artShapeStyle: "inset";
6 property real fontScale: 1.0;
6 property real fontScale: 1.0;
7 property var scopeStyle: null;
7 property var scopeStyle: null;
8 property int titleAlignment: Text.AlignLeft;
8 property int titleAlignment: Text.AlignLeft;
@@ -23,11 +23,12 @@ Loader {
23 sourceComponent: UbuntuShape {
23 sourceComponent: UbuntuShape {
24 objectName: "background";
24 objectName: "background";
25 radius: "medium";
25 radius: "medium";
26− color: getColor(0) || "white";
26+ backgroundColor: getColor(0) || "white";
27− gradientColor: getColor(1) || color;
27+ secondaryBackgroundColor: getColor(1) || backgroundColor;
28+ backgroundMode: UbuntuShape.VerticalGradient;
28− anchors.fill: parent;
29+ anchors.fill: parent;
29− image: backgroundImage.source ? backgroundImage : null;
30+ source: backgroundImage.source ? backgroundImage : null;
30− property real luminance: Style.luminance(color);
31+ property real luminance: Style.luminance(backgroundColor);
31 property Image backgroundImage: Image {
32 property Image backgroundImage: Image {
32 objectName: "backgroundImage";
33 objectName: "backgroundImage";
33 source: {
34 source: {
@@ -88,7 +89,7 @@ CroppedImageMinimumSourceSize {
88 wrapMode: Text.Wrap;
89 wrapMode: Text.Wrap;
89 maximumLineCount: 2;
90 maximumLineCount: 2;
90 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
91 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
91− color: backgroundLoader.active && backgroundLoader.item && root.scopeStyle ? root.scopeStyle.getTextColor(backgroundLoader.item.luminance) : (backgroundLoader.item && backgroundLoader.item.luminance > 0.7 ? Theme.palette.normal.baseText : "white");
92+ color: backgroundLoader.active && backgroundLoader.item && root.scopeStyle ? root.scopeStyle.getTextColor(backgroundLoader.item.luminance) : (backgroundLoader.item && backgroundLoader.item.luminance > 0.7 ? theme.palette.normal.baseText : "white");
92 visible: showHeader ;
93 visible: showHeader ;
93 width: undefined;
94 width: undefined;
94 text: root.title;
95 text: root.title;
@@ -108,7 +109,7 @@ CroppedImageMinimumSourceSize {
108 maximumLineCount: 1;
109 maximumLineCount: 1;
109 fontSize: "x-small";
110 fontSize: "x-small";
110 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
111 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
111− color: backgroundLoader.active && backgroundLoader.item && root.scopeStyle ? root.scopeStyle.getTextColor(backgroundLoader.item.luminance) : (backgroundLoader.item && backgroundLoader.item.luminance > 0.7 ? Theme.palette.normal.baseText : "white");
112+ color: backgroundLoader.active && backgroundLoader.item && root.scopeStyle ? root.scopeStyle.getTextColor(backgroundLoader.item.luminance) : (backgroundLoader.item && backgroundLoader.item.luminance > 0.7 ? theme.palette.normal.baseText : "white");
112 visible: titleLabel.visible && titleLabel.text;
113 visible: titleLabel.visible && titleLabel.text;
113 text: cardData && cardData["subtitle"] || "";
114 text: cardData && cardData["subtitle"] || "";
114 font.weight: Font.Light;
115 font.weight: Font.Light;
tests/plugins/Dash/cardcreator/3.res+8−9
@@ -2,7 +2,7 @@ AbstractButton {
2 id: root;
2 id: root;
3 property var components;
3 property var components;
4 property var cardData;
4 property var cardData;
5− property var artShapeBorderSource: undefined;
5+ property string artShapeStyle: "inset";
6 property real fontScale: 1.0;
6 property real fontScale: 1.0;
7 property var scopeStyle: null;
7 property var scopeStyle: null;
8 property int titleAlignment: Text.AlignLeft;
8 property int titleAlignment: Text.AlignLeft;
@@ -14,7 +14,6 @@ AbstractButton {
14 implicitWidth: childrenRect.width;
14 implicitWidth: childrenRect.width;
15 enabled: true;
15 enabled: true;
16
16
17−onArtShapeBorderSourceChanged: { if (artShapeBorderSource !== undefined && artShapeLoader.item) artShapeLoader.item.borderSource = artShapeBorderSource; }
18readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1);
17readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1);
19Item {
18Item {
20 id: artShapeHolder;
19 id: artShapeHolder;
@@ -30,10 +29,9 @@ Item {
30 sourceComponent: Item {
29 sourceComponent: Item {
31 id: artShape;
30 id: artShape;
32 objectName: "artShape";
31 objectName: "artShape";
33− property bool doShapeItem: components["art"]["conciergeMode"] !== true;
32+ readonly property bool doShapeItem: components["art"]["conciergeMode"] !== true;
34 visible: image.status == Image.Ready;
33 visible: image.status == Image.Ready;
35 readonly property alias image: artImage;
34 readonly property alias image: artImage;
36− property alias borderSource: artShapeShape.borderSource;
37 ShaderEffectSource {
35 ShaderEffectSource {
38 id: artShapeSource;
36 id: artShapeSource;
39 sourceItem: artImage;
37 sourceItem: artImage;
@@ -42,16 +40,17 @@ Item {
42 height: 1;
40 height: 1;
43 hideSource: doShapeItem;
41 hideSource: doShapeItem;
44 }
42 }
45− Shape {
43+ UbuntuShape {
46 id: artShapeShape;
44 id: artShapeShape;
47− image: artShapeSource;
45+ source: artShapeSource;
48 anchors.fill: parent;
46 anchors.fill: parent;
49 visible: doShapeItem;
47 visible: doShapeItem;
50 radius: "medium";
48 radius: "medium";
49+ aspect: root.artShapeStyle === "inset" ? UbuntuShape.Inset : UbuntuShape.Flat;
51 }
50 }
52 readonly property real fixedArtShapeSizeAspect: (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) ? root.fixedArtShapeSize.width / root.fixedArtShapeSize.height : -1;
51 readonly property real fixedArtShapeSizeAspect: (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) ? root.fixedArtShapeSize.width / root.fixedArtShapeSize.height : -1;
53 readonly property real aspect: fixedArtShapeSizeAspect > 0 ? fixedArtShapeSizeAspect : components !== undefined ? components["art"]["aspect-ratio"] : 1;
52 readonly property real aspect: fixedArtShapeSizeAspect > 0 ? fixedArtShapeSizeAspect : components !== undefined ? components["art"]["aspect-ratio"] : 1;
54− Component.onCompleted: { updateWidthHeightBindings(); if (artShapeBorderSource !== undefined) borderSource = artShapeBorderSource; }
53+ Component.onCompleted: { updateWidthHeightBindings(); }
55 Connections { target: root; onFixedArtShapeSizeChanged: updateWidthHeightBindings(); }
54 Connections { target: root; onFixedArtShapeSizeChanged: updateWidthHeightBindings(); }
56 function updateWidthHeightBindings() {
55 function updateWidthHeightBindings() {
57 if (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) {
56 if (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) {
@@ -87,7 +86,7 @@ Label {
87 wrapMode: Text.Wrap;
86 wrapMode: Text.Wrap;
88 maximumLineCount: 2;
87 maximumLineCount: 2;
89 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
88 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
90− color: root.scopeStyle ? root.scopeStyle.foreground : Theme.palette.normal.baseText;
89+ color: root.scopeStyle ? root.scopeStyle.foreground : theme.palette.normal.baseText;
91 visible: showHeader ;
90 visible: showHeader ;
92 width: undefined;
91 width: undefined;
93 text: root.title;
92 text: root.title;
@@ -107,7 +106,7 @@ Label {
107 maximumLineCount: 1;
106 maximumLineCount: 1;
108 fontSize: "x-small";
107 fontSize: "x-small";
109 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
108 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
110− color: root.scopeStyle ? root.scopeStyle.foreground : Theme.palette.normal.baseText;
109+ color: root.scopeStyle ? root.scopeStyle.foreground : theme.palette.normal.baseText;
111 visible: titleLabel.visible && titleLabel.text;
110 visible: titleLabel.visible && titleLabel.text;
112 text: cardData && cardData["subtitle"] || "";
111 text: cardData && cardData["subtitle"] || "";
113 font.weight: Font.Light;
112 font.weight: Font.Light;
tests/plugins/Dash/cardcreator/4.res+3−3
@@ -2,7 +2,7 @@ AbstractButton {
2 id: root;
2 id: root;
3 property var components;
3 property var components;
4 property var cardData;
4 property var cardData;
5− property var artShapeBorderSource: undefined;
5+ property string artShapeStyle: "inset";
6 property real fontScale: 1.0;
6 property real fontScale: 1.0;
7 property var scopeStyle: null;
7 property var scopeStyle: null;
8 property int titleAlignment: Text.AlignLeft;
8 property int titleAlignment: Text.AlignLeft;
@@ -72,7 +72,7 @@ Label {
72 wrapMode: Text.Wrap;
72 wrapMode: Text.Wrap;
73 maximumLineCount: 2;
73 maximumLineCount: 2;
74 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
74 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
75− color: root.scopeStyle ? root.scopeStyle.foreground : Theme.palette.normal.baseText;
75+ color: root.scopeStyle ? root.scopeStyle.foreground : theme.palette.normal.baseText;
76 visible: showHeader ;
76 visible: showHeader ;
77 width: undefined;
77 width: undefined;
78 text: root.title;
78 text: root.title;
@@ -92,7 +92,7 @@ Label {
92 maximumLineCount: 1;
92 maximumLineCount: 1;
93 fontSize: "x-small";
93 fontSize: "x-small";
94 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
94 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
95− color: root.scopeStyle ? root.scopeStyle.foreground : Theme.palette.normal.baseText;
95+ color: root.scopeStyle ? root.scopeStyle.foreground : theme.palette.normal.baseText;
96 visible: titleLabel.visible && titleLabel.text;
96 visible: titleLabel.visible && titleLabel.text;
97 text: cardData && cardData["subtitle"] || "";
97 text: cardData && cardData["subtitle"] || "";
98 font.weight: Font.Light;
98 font.weight: Font.Light;
tests/plugins/Dash/cardcreator/5.res+18−45
@@ -2,7 +2,7 @@ AbstractButton {
2 id: root;
2 id: root;
3 property var components;
3 property var components;
4 property var cardData;
4 property var cardData;
5− property var artShapeBorderSource: undefined;
5+ property string artShapeStyle: "inset";
6 property real fontScale: 1.0;
6 property real fontScale: 1.0;
7 property var scopeStyle: null;
7 property var scopeStyle: null;
8 property int titleAlignment: Text.AlignLeft;
8 property int titleAlignment: Text.AlignLeft;
@@ -14,7 +14,6 @@ AbstractButton {
14 implicitWidth: childrenRect.width;
14 implicitWidth: childrenRect.width;
15 enabled: false;
15 enabled: false;
16
16
17−onArtShapeBorderSourceChanged: { if (artShapeBorderSource !== undefined && artShapeLoader.item) artShapeLoader.item.borderSource = artShapeBorderSource; }
18readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1);
17readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1);
19Item {
18Item {
20 id: artShapeHolder;
19 id: artShapeHolder;
@@ -30,10 +29,9 @@ Item {
30 sourceComponent: Item {
29 sourceComponent: Item {
31 id: artShape;
30 id: artShape;
32 objectName: "artShape";
31 objectName: "artShape";
33− property bool doShapeItem: components["art"]["conciergeMode"] !== true;
32+ readonly property bool doShapeItem: components["art"]["conciergeMode"] !== true;
34 visible: image.status == Image.Ready;
33 visible: image.status == Image.Ready;
35 readonly property alias image: artImage;
34 readonly property alias image: artImage;
36− property alias borderSource: artShapeShape.borderSource;
37 ShaderEffectSource {
35 ShaderEffectSource {
38 id: artShapeSource;
36 id: artShapeSource;
39 sourceItem: artImage;
37 sourceItem: artImage;
@@ -42,16 +40,17 @@ Item {
42 height: 1;
40 height: 1;
43 hideSource: doShapeItem;
41 hideSource: doShapeItem;
44 }
42 }
45− Shape {
43+ UbuntuShape {
46 id: artShapeShape;
44 id: artShapeShape;
47− image: artShapeSource;
45+ source: artShapeSource;
48 anchors.fill: parent;
46 anchors.fill: parent;
49 visible: doShapeItem;
47 visible: doShapeItem;
50 radius: "medium";
48 radius: "medium";
49+ aspect: root.artShapeStyle === "inset" ? UbuntuShape.Inset : UbuntuShape.Flat;
51 }
50 }
52 readonly property real fixedArtShapeSizeAspect: (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) ? root.fixedArtShapeSize.width / root.fixedArtShapeSize.height : -1;
51 readonly property real fixedArtShapeSizeAspect: (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) ? root.fixedArtShapeSize.width / root.fixedArtShapeSize.height : -1;
53 readonly property real aspect: fixedArtShapeSizeAspect > 0 ? fixedArtShapeSizeAspect : components !== undefined ? components["art"]["aspect-ratio"] : 1;
52 readonly property real aspect: fixedArtShapeSizeAspect > 0 ? fixedArtShapeSizeAspect : components !== undefined ? components["art"]["aspect-ratio"] : 1;
54− Component.onCompleted: { updateWidthHeightBindings(); if (artShapeBorderSource !== undefined) borderSource = artShapeBorderSource; }
53+ Component.onCompleted: { updateWidthHeightBindings(); }
55 Connections { target: root; onFixedArtShapeSizeChanged: updateWidthHeightBindings(); }
54 Connections { target: root; onFixedArtShapeSizeChanged: updateWidthHeightBindings(); }
56 function updateWidthHeightBindings() {
55 function updateWidthHeightBindings() {
57 if (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) {
56 if (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) {
@@ -75,44 +74,18 @@ Item {
75 }
74 }
76Loader {
75Loader {
77 id: overlayLoader;
76 id: overlayLoader;
78− anchors {
77+ readonly property real overlayHeight: (fixedHeaderHeight > 0 ? fixedHeaderHeight : headerHeight) + units.gu(2);
79− left: artShapeHolder.left;
80− right: artShapeHolder.right;
78+ anchors.fill: artShapeHolder;
81− bottom: artShapeHolder.bottom;
82− }
83− active: artShapeLoader.active && artShapeLoader.item && artShapeLoader.item.image.status === Image.Ready || false;
79+ active: artShapeLoader.active && artShapeLoader.item && artShapeLoader.item.image.status === Image.Ready || false;
84 asynchronous: root.asynchronous;
80 asynchronous: root.asynchronous;
85 visible: showHeader && status == Loader.Ready;
81 visible: showHeader && status == Loader.Ready;
86− sourceComponent: ShaderEffect {
82+ sourceComponent: UbuntuShapeOverlay {
87 id: overlay;
83 id: overlay;
88− height: (fixedHeaderHeight > 0 ? fixedHeaderHeight : headerHeight) + units.gu(2);
89− property real luminance: Style.luminance(overlayColor);
84+ property real luminance: Style.luminance(overlayColor);
85+ aspect: UbuntuShape.Flat;
86+ radius: "medium";
90− property color overlayColor: cardData && cardData["overlayColor"] || "#99000000";
87+ overlayColor: cardData && cardData["overlayColor"] || "#99000000";
91− property var source: ShaderEffectSource {
88+ overlayRect: Qt.rect(0, 1 - overlayLoader.overlayHeight / height, 1, 1);
92− id: shaderSource;
93− sourceItem: artShapeLoader.item;
94− onVisibleChanged: if (visible) scheduleUpdate();
95− live: false;
96− sourceRect: Qt.rect(0, artShapeLoader.height - overlay.height, artShapeLoader.width, overlay.height);
97− }
98− vertexShader: "
99− uniform highp mat4 qt_Matrix;
100− attribute highp vec4 qt_Vertex;
101− attribute highp vec2 qt_MultiTexCoord0;
102− varying highp vec2 coord;
103− void main() {
104− coord = qt_MultiTexCoord0;
105− gl_Position = qt_Matrix * qt_Vertex;
106− }";
107− fragmentShader: "
108− varying highp vec2 coord;
109− uniform sampler2D source;
110− uniform lowp float qt_Opacity;
111− uniform highp vec4 overlayColor;
112− void main() {
113− lowp vec4 tex = texture2D(source, coord);
114− gl_FragColor = vec4(overlayColor.r, overlayColor.g, overlayColor.b, 1) * qt_Opacity * overlayColor.a * tex.a;
115− }";
116 }
89 }
117 }
90 }
118readonly property int headerHeight: titleLabel.height + subtitleLabel.height + subtitleLabel.anchors.topMargin;
91readonly property int headerHeight: titleLabel.height + subtitleLabel.height + subtitleLabel.anchors.topMargin;
@@ -124,14 +97,14 @@ Label {
124 left: parent.left;
97 left: parent.left;
125 leftMargin: units.gu(1);
98 leftMargin: units.gu(1);
126 top: overlayLoader.top;
99 top: overlayLoader.top;
127− topMargin: units.gu(1);
100+ topMargin: units.gu(1) + overlayLoader.height - overlayLoader.overlayHeight;
128 }
101 }
129 elide: Text.ElideRight;
102 elide: Text.ElideRight;
130 fontSize: "small";
103 fontSize: "small";
131 wrapMode: Text.Wrap;
104 wrapMode: Text.Wrap;
132 maximumLineCount: 2;
105 maximumLineCount: 2;
133 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
106 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
134− color: root.scopeStyle && overlayLoader.item ? root.scopeStyle.getTextColor(overlayLoader.item.luminance) : (overlayLoader.item && overlayLoader.item.luminance > 0.7 ? Theme.palette.normal.baseText : "white");
107+ color: root.scopeStyle && overlayLoader.item ? root.scopeStyle.getTextColor(overlayLoader.item.luminance) : (overlayLoader.item && overlayLoader.item.luminance > 0.7 ? theme.palette.normal.baseText : "white");
135 visible: showHeader && overlayLoader.active;
108 visible: showHeader && overlayLoader.active;
136 width: undefined;
109 width: undefined;
137 text: root.title;
110 text: root.title;
@@ -152,7 +125,7 @@ Label {
152 maximumLineCount: 1;
125 maximumLineCount: 1;
153 fontSize: "x-small";
126 fontSize: "x-small";
154 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
127 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
155− color: root.scopeStyle && overlayLoader.item ? root.scopeStyle.getTextColor(overlayLoader.item.luminance) : (overlayLoader.item && overlayLoader.item.luminance > 0.7 ? Theme.palette.normal.baseText : "white");
128+ color: root.scopeStyle && overlayLoader.item ? root.scopeStyle.getTextColor(overlayLoader.item.luminance) : (overlayLoader.item && overlayLoader.item.luminance > 0.7 ? theme.palette.normal.baseText : "white");
156 visible: titleLabel.visible && titleLabel.text;
129 visible: titleLabel.visible && titleLabel.text;
157 text: cardData && cardData["subtitle"] || "";
130 text: cardData && cardData["subtitle"] || "";
158 font.weight: Font.Light;
131 font.weight: Font.Light;
tests/plugins/Dash/cardcreator/6.res+10−9
@@ -2,7 +2,7 @@ AbstractButton {
2 id: root;
2 id: root;
3 property var components;
3 property var components;
4 property var cardData;
4 property var cardData;
5− property var artShapeBorderSource: undefined;
5+ property string artShapeStyle: "inset";
6 property real fontScale: 1.0;
6 property real fontScale: 1.0;
7 property var scopeStyle: null;
7 property var scopeStyle: null;
8 property int titleAlignment: Text.AlignLeft;
8 property int titleAlignment: Text.AlignLeft;
@@ -23,11 +23,12 @@ Loader {
23 sourceComponent: UbuntuShape {
23 sourceComponent: UbuntuShape {
24 objectName: "background";
24 objectName: "background";
25 radius: "medium";
25 radius: "medium";
26− color: getColor(0) || "white";
26+ backgroundColor: getColor(0) || "white";
27− gradientColor: getColor(1) || color;
27+ secondaryBackgroundColor: getColor(1) || backgroundColor;
28+ backgroundMode: UbuntuShape.VerticalGradient;
28− anchors.fill: parent;
29+ anchors.fill: parent;
29− image: backgroundImage.source ? backgroundImage : null;
30+ source: backgroundImage.source ? backgroundImage : null;
30− property real luminance: Style.luminance(color);
31+ property real luminance: Style.luminance(backgroundColor);
31 property Image backgroundImage: Image {
32 property Image backgroundImage: Image {
32 objectName: "backgroundImage";
33 objectName: "backgroundImage";
33 source: {
34 source: {
@@ -67,7 +68,7 @@ Item {
67 wrapMode: Text.Wrap;
68 wrapMode: Text.Wrap;
68 maximumLineCount: 2;
69 maximumLineCount: 2;
69 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
70 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
70− color: backgroundLoader.active && backgroundLoader.item && root.scopeStyle ? root.scopeStyle.getTextColor(backgroundLoader.item.luminance) : (backgroundLoader.item && backgroundLoader.item.luminance > 0.7 ? Theme.palette.normal.baseText : "white");
71+ color: backgroundLoader.active && backgroundLoader.item && root.scopeStyle ? root.scopeStyle.getTextColor(backgroundLoader.item.luminance) : (backgroundLoader.item && backgroundLoader.item.luminance > 0.7 ? theme.palette.normal.baseText : "white");
71 visible: showHeader ;
72 visible: showHeader ;
72 width: undefined;
73 width: undefined;
73 text: root.title;
74 text: root.title;
@@ -87,7 +88,7 @@ Item {
87 maximumLineCount: 1;
88 maximumLineCount: 1;
88 fontSize: "x-small";
89 fontSize: "x-small";
89 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
90 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
90− color: backgroundLoader.active && backgroundLoader.item && root.scopeStyle ? root.scopeStyle.getTextColor(backgroundLoader.item.luminance) : (backgroundLoader.item && backgroundLoader.item.luminance > 0.7 ? Theme.palette.normal.baseText : "white");
91+ color: backgroundLoader.active && backgroundLoader.item && root.scopeStyle ? root.scopeStyle.getTextColor(backgroundLoader.item.luminance) : (backgroundLoader.item && backgroundLoader.item.luminance > 0.7 ? theme.palette.normal.baseText : "white");
91 visible: titleLabel.visible && titleLabel.text;
92 visible: titleLabel.visible && titleLabel.text;
92 text: cardData && cardData["subtitle"] || "";
93 text: cardData && cardData["subtitle"] || "";
93 font.weight: Font.Light;
94 font.weight: Font.Light;
@@ -101,7 +102,7 @@ Item {
101 rightMargin: units.gu(1);
102 rightMargin: units.gu(1);
102 }
103 }
103 source: cardData && cardData["emblem"] || "";
104 source: cardData && cardData["emblem"] || "";
104− color: backgroundLoader.active && backgroundLoader.item && root.scopeStyle ? root.scopeStyle.getTextColor(backgroundLoader.item.luminance) : (backgroundLoader.item && backgroundLoader.item.luminance > 0.7 ? Theme.palette.normal.baseText : "white");
105+ color: backgroundLoader.active && backgroundLoader.item && root.scopeStyle ? root.scopeStyle.getTextColor(backgroundLoader.item.luminance) : (backgroundLoader.item && backgroundLoader.item.luminance > 0.7 ? theme.palette.normal.baseText : "white");
105 height: source != "" ? titleLabel.font.pixelSize : 0;
106 height: source != "" ? titleLabel.font.pixelSize : 0;
106 width: implicitWidth > 0 && implicitHeight > 0 ? (implicitWidth / implicitHeight * height) : implicitWidth;
107 width: implicitWidth > 0 && implicitHeight > 0 ? (implicitWidth / implicitHeight * height) : implicitWidth;
107 }
108 }
tests/plugins/Dash/cardcreator/7.res+10−9
@@ -2,7 +2,7 @@ AbstractButton {
2 id: root;
2 id: root;
3 property var components;
3 property var components;
4 property var cardData;
4 property var cardData;
5− property var artShapeBorderSource: undefined;
5+ property string artShapeStyle: "inset";
6 property real fontScale: 1.0;
6 property real fontScale: 1.0;
7 property var scopeStyle: null;
7 property var scopeStyle: null;
8 property int titleAlignment: Text.AlignLeft;
8 property int titleAlignment: Text.AlignLeft;
@@ -23,11 +23,12 @@ Loader {
23 sourceComponent: UbuntuShape {
23 sourceComponent: UbuntuShape {
24 objectName: "background";
24 objectName: "background";
25 radius: "medium";
25 radius: "medium";
26− color: getColor(0) || "white";
26+ backgroundColor: getColor(0) || "white";
27− gradientColor: getColor(1) || color;
27+ secondaryBackgroundColor: getColor(1) || backgroundColor;
28+ backgroundMode: UbuntuShape.VerticalGradient;
28− anchors.fill: parent;
29+ anchors.fill: parent;
29− image: backgroundImage.source ? backgroundImage : null;
30+ source: backgroundImage.source ? backgroundImage : null;
30− property real luminance: Style.luminance(color);
31+ property real luminance: Style.luminance(backgroundColor);
31 property Image backgroundImage: Image {
32 property Image backgroundImage: Image {
32 objectName: "backgroundImage";
33 objectName: "backgroundImage";
33 source: {
34 source: {
@@ -89,7 +90,7 @@ CroppedImageMinimumSourceSize {
89 wrapMode: Text.Wrap;
90 wrapMode: Text.Wrap;
90 maximumLineCount: 2;
91 maximumLineCount: 2;
91 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
92 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
92− color: backgroundLoader.active && backgroundLoader.item && root.scopeStyle ? root.scopeStyle.getTextColor(backgroundLoader.item.luminance) : (backgroundLoader.item && backgroundLoader.item.luminance > 0.7 ? Theme.palette.normal.baseText : "white");
93+ color: backgroundLoader.active && backgroundLoader.item && root.scopeStyle ? root.scopeStyle.getTextColor(backgroundLoader.item.luminance) : (backgroundLoader.item && backgroundLoader.item.luminance > 0.7 ? theme.palette.normal.baseText : "white");
93 visible: showHeader ;
94 visible: showHeader ;
94 width: undefined;
95 width: undefined;
95 text: root.title;
96 text: root.title;
@@ -109,7 +110,7 @@ CroppedImageMinimumSourceSize {
109 maximumLineCount: 1;
110 maximumLineCount: 1;
110 fontSize: "x-small";
111 fontSize: "x-small";
111 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
112 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
112− color: backgroundLoader.active && backgroundLoader.item && root.scopeStyle ? root.scopeStyle.getTextColor(backgroundLoader.item.luminance) : (backgroundLoader.item && backgroundLoader.item.luminance > 0.7 ? Theme.palette.normal.baseText : "white");
113+ color: backgroundLoader.active && backgroundLoader.item && root.scopeStyle ? root.scopeStyle.getTextColor(backgroundLoader.item.luminance) : (backgroundLoader.item && backgroundLoader.item.luminance > 0.7 ? theme.palette.normal.baseText : "white");
113 visible: titleLabel.visible && titleLabel.text;
114 visible: titleLabel.visible && titleLabel.text;
114 text: cardData && cardData["subtitle"] || "";
115 text: cardData && cardData["subtitle"] || "";
115 font.weight: Font.Light;
116 font.weight: Font.Light;
@@ -122,7 +123,7 @@ CroppedImageMinimumSourceSize {
122 rightMargin: units.gu(1);
123 rightMargin: units.gu(1);
123 top: subtitleLabel.bottom;
124 top: subtitleLabel.bottom;
124 }
125 }
125− color: backgroundLoader.active && backgroundLoader.item && root.scopeStyle ? root.scopeStyle.getTextColor(backgroundLoader.item.luminance) : (backgroundLoader.item && backgroundLoader.item.luminance > 0.7 ? Theme.palette.normal.baseText : "white");
126+ color: backgroundLoader.active && backgroundLoader.item && root.scopeStyle ? root.scopeStyle.getTextColor(backgroundLoader.item.luminance) : (backgroundLoader.item && backgroundLoader.item.luminance > 0.7 ? theme.palette.normal.baseText : "white");
126 fontScale: root.fontScale;
127 fontScale: root.fontScale;
127 model: cardData && cardData["attributes"];
128 model: cardData && cardData["attributes"];
128 }
129 }
tests/plugins/Dash/cardcreator/8.res+7−6
@@ -2,7 +2,7 @@ AbstractButton {
2 id: root;
2 id: root;
3 property var components;
3 property var components;
4 property var cardData;
4 property var cardData;
5− property var artShapeBorderSource: undefined;
5+ property string artShapeStyle: "inset";
6 property real fontScale: 1.0;
6 property real fontScale: 1.0;
7 property var scopeStyle: null;
7 property var scopeStyle: null;
8 property int titleAlignment: Text.AlignLeft;
8 property int titleAlignment: Text.AlignLeft;
@@ -23,11 +23,12 @@ Loader {
23 sourceComponent: UbuntuShape {
23 sourceComponent: UbuntuShape {
24 objectName: "background";
24 objectName: "background";
25 radius: "medium";
25 radius: "medium";
26− color: getColor(0) || "white";
26+ backgroundColor: getColor(0) || "white";
27− gradientColor: getColor(1) || color;
27+ secondaryBackgroundColor: getColor(1) || backgroundColor;
28+ backgroundMode: UbuntuShape.VerticalGradient;
28 anchors.fill: parent;
29 anchors.fill: parent;
29− image: backgroundImage.source ? backgroundImage : null;
30+ source: backgroundImage.source ? backgroundImage : null;
30− property real luminance: Style.luminance(color);
31+ property real luminance: Style.luminance(backgroundColor);
31 property Image backgroundImage: Image {
32 property Image backgroundImage: Image {
32 objectName: "backgroundImage";
33 objectName: "backgroundImage";
33 source: {
34 source: {
@@ -80,7 +81,7 @@ left: parent.left;
80 wrapMode: Text.Wrap;
81 wrapMode: Text.Wrap;
81 maximumLineCount: 2;
82 maximumLineCount: 2;
82 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
83 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
83− color: backgroundLoader.active && backgroundLoader.item && root.scopeStyle ? root.scopeStyle.getTextColor(backgroundLoader.item.luminance) : (backgroundLoader.item && backgroundLoader.item.luminance > 0.7 ? Theme.palette.normal.baseText : "white");
84+ color: backgroundLoader.active && backgroundLoader.item && root.scopeStyle ? root.scopeStyle.getTextColor(backgroundLoader.item.luminance) : (backgroundLoader.item && backgroundLoader.item.luminance > 0.7 ? theme.palette.normal.baseText : "white");
84 visible: showHeader ;
85 visible: showHeader ;
85 width: parent.width - x;
86 width: parent.width - x;
86 text: root.title;
87 text: root.title;
tests/plugins/Dash/cardcreatortest.qml+1−1
@@ -14,7 +14,7 @@
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.2
17+import QtQuick 2.4
18import "../../../plugins/Dash/CardCreator.js" as CardCreator
18import "../../../plugins/Dash/CardCreator.js" as CardCreator
19
19
20Item {
20Item {
tests/plugins/Dash/horizontaljournaltest.qml+1−1
@@ -14,7 +14,7 @@
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.1
17+import QtQuick 2.4
18import Dash 0.1
18import Dash 0.1
19
19
20Item {
20Item {
tests/plugins/Dash/horizontaljournaltry.qml+1−1
@@ -14,7 +14,7 @@
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.1
17+import QtQuick 2.4
18import Dash 0.1
18import Dash 0.1
19
19
20Item {
20Item {
tests/plugins/Dash/listviewwithpageheadertest.qml+1−1
@@ -14,7 +14,7 @@
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.4
18import Dash 0.1
18import Dash 0.1
19
19
20Rectangle {
20Rectangle {
tests/plugins/Dash/listviewwithpageheadertestsection.qml+1−1
@@ -14,7 +14,7 @@
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.4
18import Dash 0.1
18import Dash 0.1
19
19
20Rectangle {
20Rectangle {
tests/plugins/Dash/listviewwithpageheadertestsectionexternalmodel.qml+1−1
@@ -14,7 +14,7 @@
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.4
18import Dash 0.1
18import Dash 0.1
19
19
20Rectangle {
20Rectangle {
tests/plugins/Dash/organicgridtest.qml+1−1
@@ -14,7 +14,7 @@
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.1
17+import QtQuick 2.4
18import Dash 0.1
18import Dash 0.1
19
19
20Item {
20Item {
tests/plugins/Dash/organicgridtry.qml+1−1
@@ -14,7 +14,7 @@
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.1
17+import QtQuick 2.4
18import Dash 0.1
18import Dash 0.1
19
19
20Item {
20Item {
tests/plugins/Dash/tst_CardAttributes.qml+1−1
@@ -14,7 +14,7 @@
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.4
18import QtTest 1.0
18import QtTest 1.0
19import Dash 0.1
19import Dash 0.1
20
20
tests/plugins/Dash/tst_CroppedImageMinimumSourceSize.qml+2−2
@@ -14,9 +14,9 @@
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.3
17+import QtQuick 2.4
18import QtTest 1.0
18import QtTest 1.0
19−import Ubuntu.Components 1.1
19+import Ubuntu.Components 1.3
20import Dash 0.1
20import Dash 0.1
21
21
22Rectangle {
22Rectangle {
tests/plugins/Dash/tst_ListViewWithPageHeaderQML.qml+1−1
@@ -14,7 +14,7 @@
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.4
18import QtTest 1.0
18import QtTest 1.0
19import Dash 0.1
19import Dash 0.1
20
20
tests/plugins/Dash/tst_ScopeStyle.qml+2−2
@@ -14,10 +14,10 @@
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.2
17+import QtQuick 2.4
18import QtTest 1.0
18import QtTest 1.0
19import Dash 0.1
19import Dash 0.1
20−import Ubuntu.Components 1.1
20+import Ubuntu.Components 1.3
21import Utils 0.1
21import Utils 0.1
22
22
23Rectangle {
23Rectangle {
tests/plugins/Dash/verticaljournaltest.qml+1−1
@@ -14,7 +14,7 @@
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.1
17+import QtQuick 2.4
18import Dash 0.1
18import Dash 0.1
19
19
20Item {
20Item {
tests/plugins/Dash/verticaljournaltry.qml+1−1
@@ -14,7 +14,7 @@
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.1
17+import QtQuick 2.4
18import Dash 0.1
18import Dash 0.1
19
19
20Item {
20Item {
tests/plugins/IntegratedLightDM/greeter.qml+1−1
@@ -14,7 +14,7 @@
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.4
18import IntegratedLightDM 0.1 as LightDM
18import IntegratedLightDM 0.1 as LightDM
19
19
20Item {
20Item {
tests/plugins/Ubuntu/Gestures/DownwardsLauncher.qml+2−2
@@ -14,9 +14,9 @@
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.4
18import Ubuntu.Gestures 0.1
18import Ubuntu.Gestures 0.1
19−import Ubuntu.Components 0.1
19+import Ubuntu.Components 1.3
20
20
21Item {
21Item {
22
22
tests/plugins/Ubuntu/Gestures/LeftwardsLauncher.qml+2−2
@@ -14,9 +14,9 @@
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.4
18import Ubuntu.Gestures 0.1
18import Ubuntu.Gestures 0.1
19−import Ubuntu.Components 0.1
19+import Ubuntu.Components 1.3
20
20
21Item {
21Item {
22 id: root
22 id: root
tests/plugins/Ubuntu/Gestures/RightwardsLauncher.qml+2−2
@@ -14,9 +14,9 @@
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.4
18import Ubuntu.Gestures 0.1
18import Ubuntu.Gestures 0.1
19−import Ubuntu.Components 0.1
19+import Ubuntu.Components 1.3
20
20
21Item {
21Item {
22 objectName: "rightwardsLauncher"
22 objectName: "rightwardsLauncher"
tests/plugins/Ubuntu/Gestures/UpwardsLauncher.qml+2−2
@@ -14,9 +14,9 @@
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.4
18import Ubuntu.Gestures 0.1
18import Ubuntu.Gestures 0.1
19−import Ubuntu.Components 0.1
19+import Ubuntu.Components 1.3
20
20
21Item {
21Item {
22 id: root
22 id: root
tests/plugins/Ubuntu/Gestures/empty.qml+1−1
@@ -14,7 +14,7 @@
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.4
18import Ubuntu.Gestures 0.1
18import Ubuntu.Gestures 0.1
19
19
20Item {
20Item {
tests/plugins/Ubuntu/Gestures/touchGateExample.qml+1−1
@@ -14,7 +14,7 @@
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.4
18import Ubuntu.Gestures 0.1
18import Ubuntu.Gestures 0.1
19
19
20Rectangle {
20Rectangle {
tests/plugins/Ubuntu/Gestures/tst_DirectionalDragArea.qml+2−2
@@ -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.4
18−import Ubuntu.Components 0.1
18+import Ubuntu.Components 1.3
19import Unity.Test 0.1
19import Unity.Test 0.1
20
20
21Rectangle {
21Rectangle {
tests/plugins/Ubuntu/Gestures/tst_FloatingFlickable.qml+2−2
@@ -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.4
18−import Ubuntu.Components 0.1
18+import Ubuntu.Components 1.3
19import Ubuntu.Gestures 0.1
19import Ubuntu.Gestures 0.1
20import Unity.Test 0.1
20import Unity.Test 0.1
21
21
tests/plugins/Ubuntu/Gestures/tst_PressedOutsideNotifier.qml+2−2
@@ -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.4
18−import Ubuntu.Components 0.1
18+import Ubuntu.Components 1.3
19import Ubuntu.Gestures 0.1
19import Ubuntu.Gestures 0.1
20
20
21/*
21/*
tests/plugins/Ubuntu/Gestures/tst_TouchGate.cpp+1−5
@@ -19,9 +19,7 @@
19#include <QQmlEngine>
19#include <QQmlEngine>
20#include <QQuickView>
20#include <QQuickView>
21#include <QSharedPointer>
21#include <QSharedPointer>
22−#if (QT_VERSION >= QT_VERSION_CHECK(5, 4, 0))
23− #include <private/qquickwindow_p.h>
22+#include <private/qquickwindow_p.h>
24−#endif
25
23
26// C++ std lib
24// C++ std lib
27#include <functional>
25#include <functional>
@@ -188,10 +186,8 @@ void tst_TouchGate::holdsEventsUntilGainsOwnership()
188
186
189 if (!ownershipAfterTouchEnd) {
187 if (!ownershipAfterTouchEnd) {
190 touchRegistry->removeCandidateOwnerForTouch(0, candidateItem);
188 touchRegistry->removeCandidateOwnerForTouch(0, candidateItem);
191−#if (QT_VERSION >= QT_VERSION_CHECK(5, 4, 0))
192 QQuickWindowPrivate *wp = QQuickWindowPrivate::get(testItem->window());
189 QQuickWindowPrivate *wp = QQuickWindowPrivate::get(testItem->window());
193 wp->flushDelayedTouchEvent();
190 wp->flushDelayedTouchEvent();
194−#endif
195 // TouchGate should now open its flood gates and let testItem get all
191 // TouchGate should now open its flood gates and let testItem get all
196 // events from touch 0 produced so far
192 // events from touch 0 produced so far
197 QCOMPARE(testItem->touchEventsReceived.count(), 2);
193 QCOMPARE(testItem->touchEventsReceived.count(), 2);
tests/plugins/Utils/tst_UtilsStyle.qml+1−1
@@ -14,7 +14,7 @@
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.2
17+import QtQuick 2.4
18import QtTest 1.0
18import QtTest 1.0
19import Utils 0.1
19import Utils 0.1
20
20
tests/qmltests/CMakeLists.txt+2−1
@@ -27,7 +27,7 @@ add_unity8_qmltest(Dash CardCarousel)
27add_unity8_qmlbenchmark(Dash CardBenchmark 1000)
27add_unity8_qmlbenchmark(Dash CardBenchmark 1000)
28add_unity8_qmltest(Dash CardTool)
28add_unity8_qmltest(Dash CardTool)
29add_unity8_qmltest(Dash GenericScopeView)
29add_unity8_qmltest(Dash GenericScopeView)
30−add_unity8_qmltest(Dash PageHeader)
30+add_unity8_qmltest(Dash DashPageHeader)
31add_unity8_qmltest(Dash PreviewListView)
31add_unity8_qmltest(Dash PreviewListView)
32add_unity8_qmltest(Dash/Previews Preview)
32add_unity8_qmltest(Dash/Previews Preview)
33add_unity8_qmltest(Dash/Previews PreviewActions)
33add_unity8_qmltest(Dash/Previews PreviewActions)
@@ -43,6 +43,7 @@ add_unity8_qmltest(Dash/Previews PreviewProgress)
43add_unity8_qmltest(Dash/Previews PreviewRatingDisplay)
43add_unity8_qmltest(Dash/Previews PreviewRatingDisplay)
44add_unity8_qmltest(Dash/Previews PreviewRatingEdit)
44add_unity8_qmltest(Dash/Previews PreviewRatingEdit)
45add_unity8_qmltest(Dash/Previews PreviewRatingInput)
45add_unity8_qmltest(Dash/Previews PreviewRatingInput)
46+add_unity8_qmltest(Dash/Previews PreviewSharing)
46add_unity8_qmltest(Dash/Previews PreviewTable)
47add_unity8_qmltest(Dash/Previews PreviewTable)
47add_unity8_qmltest(Dash/Previews PreviewTextSummary)
48add_unity8_qmltest(Dash/Previews PreviewTextSummary)
48add_unity8_qmltest(Dash/Previews PreviewVideoPlayback)
49add_unity8_qmltest(Dash/Previews PreviewVideoPlayback)
tests/qmltests/Components/tst_Background.qml+1−1
@@ -14,7 +14,7 @@
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.2
17+import QtQuick 2.4
18import QtTest 1.0
18import QtTest 1.0
19import Unity.Test 0.1
19import Unity.Test 0.1
20
20
tests/qmltests/Components/tst_Carousel.qml+1−1
@@ -14,7 +14,7 @@
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.4
18import QtTest 1.0
18import QtTest 1.0
19import "../../../qml/Components/"
19import "../../../qml/Components/"
20import "../../../qml/Components/carousel.js" as Carousel
20import "../../../qml/Components/carousel.js" as Carousel
tests/qmltests/Components/tst_Dialogs.qml+3−3
@@ -14,9 +14,9 @@
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.2
17+import QtQuick 2.4
18import QtTest 1.0
18import QtTest 1.0
19−import Ubuntu.Components 1.1
19+import Ubuntu.Components 1.3
20import Unity.Test 0.1
20import Unity.Test 0.1
21
21
22import "../../../qml/Components"
22import "../../../qml/Components"
@@ -105,7 +105,7 @@ Rectangle {
105 var dialogsPrivate = findInvisibleChild(dialogs, "dialogsPrivate");
105 var dialogsPrivate = findInvisibleChild(dialogs, "dialogsPrivate");
106 dialogsPrivate.showPowerDialog();
106 dialogsPrivate.showPowerDialog();
107 var dialogLoader = findInvisibleChild(dialogs, "dialogLoader");
107 var dialogLoader = findInvisibleChild(dialogs, "dialogLoader");
108− tryCompare(dialogLoader.item, "focus", true);
108+ tryCompare(dialogLoader.item.__foreground, "focus", true);
109 }
109 }
110 }
110 }
111}
111}
tests/qmltests/Components/tst_DragHandle.qml+2−2
@@ -14,10 +14,10 @@
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.4
18import "../../../qml/Components"
18import "../../../qml/Components"
19import "tst_DragHandle"
19import "tst_DragHandle"
20−import Ubuntu.Components 0.1
20+import Ubuntu.Components 1.3
21import Ubuntu.Gestures 0.1
21import Ubuntu.Gestures 0.1
22import Unity.Test 0.1
22import Unity.Test 0.1
23
23
tests/qmltests/Components/tst_DragHandle/BidirectionalShowable.qml+2−2
@@ -14,9 +14,9 @@
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.4
18import "../../../../qml/Components"
18import "../../../../qml/Components"
19−import Ubuntu.Components 0.1
19+import Ubuntu.Components 1.3
20import Ubuntu.Gestures 0.1
20import Ubuntu.Gestures 0.1
21
21
22Item {
22Item {
tests/qmltests/Components/tst_DragHandle/HorizontalShowable.qml+2−2
@@ -14,9 +14,9 @@
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.4
18import "../../../../qml/Components"
18import "../../../../qml/Components"
19−import Ubuntu.Components 0.1
19+import Ubuntu.Components 1.3
20import Ubuntu.Gestures 0.1
20import Ubuntu.Gestures 0.1
21
21
22Showable {
22Showable {
tests/qmltests/Components/tst_DragHandle/VerticalShowable.qml+2−2
@@ -14,9 +14,9 @@
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.4
18import "../../../../qml/Components"
18import "../../../../qml/Components"
19−import Ubuntu.Components 0.1
19+import Ubuntu.Components 1.3
20import Ubuntu.Gestures 0.1
20import Ubuntu.Gestures 0.1
21
21
22Showable {
22Showable {
tests/qmltests/Components/tst_DraggingArea.qml+1−1
@@ -14,7 +14,7 @@
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.4
18import QtTest 1.0
18import QtTest 1.0
19import "../../../qml/Components"
19import "../../../qml/Components"
20
20
tests/qmltests/Components/tst_EdgeDragEvaluator.qml+1−1
@@ -14,7 +14,7 @@
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.4
18import "../../../qml/Components"
18import "../../../qml/Components"
19
19
20Item {
20Item {
tests/qmltests/Components/tst_LazyImage.qml+4−4
@@ -1,5 +1,5 @@
1/*
1/*
2− * Copyright 2013 Canonical Ltd.
2+ * Copyright 2013,2015 Canonical Ltd.
3 *
3 *
4 * This program is free software; you can redistribute it and/or modify
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
5 * it under the terms of the GNU General Public License as published by
@@ -14,10 +14,10 @@
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.4
18import QtTest 1.0
18import QtTest 1.0
19import "../../../qml/Components"
19import "../../../qml/Components"
20−import Ubuntu.Components 0.1
20+import Ubuntu.Components 1.3
21import Unity.Test 0.1 as UT
21import Unity.Test 0.1 as UT
22import "tst_LazyImage"
22import "tst_LazyImage"
23
23
@@ -32,7 +32,7 @@ Rectangle {
32 rightMargin: 2 * parent.width / 3
32 rightMargin: 2 * parent.width / 3
33 }
33 }
34
34
35− color: Theme.palette.normal.baseText
35+ color: theme.palette.normal.baseText
36
36
37 Column {
37 Column {
38 anchors { fill: parent; margins: units.gu(5) }
38 anchors { fill: parent; margins: units.gu(5) }
tests/qmltests/Components/tst_LazyImage/ImageControls.qml+2−2
@@ -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.4
18−import Ubuntu.Components 0.1
18+import Ubuntu.Components 1.3
19import "../../../../qml/Components"
19import "../../../../qml/Components"
20
20
21Row {
21Row {
tests/qmltests/Components/tst_Lockscreen.qml+2−2
@@ -14,11 +14,11 @@
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.4
18import QtTest 1.0
18import QtTest 1.0
19import ".."
19import ".."
20import "../../../qml/Components"
20import "../../../qml/Components"
21−import Ubuntu.Components 0.1
21+import Ubuntu.Components 1.3
22import Unity.Test 0.1 as UT
22import Unity.Test 0.1 as UT
23
23
24Rectangle {
24Rectangle {
tests/qmltests/Components/tst_PhysicalKeysMapper.qml+11−10
@@ -14,7 +14,7 @@
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.4
18import QtTest 1.0
18import QtTest 1.0
19import "../../../qml/Components"
19import "../../../qml/Components"
20import Powerd 0.1
20import Powerd 0.1
@@ -67,26 +67,27 @@ TestCase {
67 Powerd.setStatus(data.status, Powerd.Unknown);
67 Powerd.setStatus(data.status, Powerd.Unknown);
68 physicalKeysMapper.powerKeyLongPressTime = 500;
68 physicalKeysMapper.powerKeyLongPressTime = 500;
69
69
70− physicalKeysMapper.onKeyPressed({ key: Qt.Key_PowerDown, isAutoRepeat: false });
70+ physicalKeysMapper.onKeyPressed({ key: Qt.Key_PowerDown, isAutoRepeat: false }, 100);
71
71
72 // After the first key press the screen is always on
72 // After the first key press the screen is always on
73 // and the rest of keypresses are auto repeat
73 // and the rest of keypresses are auto repeat
74 Powerd.setStatus(Powerd.On, Powerd.Unknown);
74 Powerd.setStatus(Powerd.On, Powerd.Unknown);
75
75
76− for (var i = 0; i < 3; ++i) {
76+ physicalKeysMapper.onKeyPressed({ key: Qt.Key_PowerDown, isAutoRepeat: true}, 300);
77− wait(10);
77+ physicalKeysMapper.onKeyPressed({ key: Qt.Key_PowerDown, isAutoRepeat: true}, 400);
78− physicalKeysMapper.onKeyPressed({ key: Qt.Key_PowerDown, isAutoRepeat: true});
78+ physicalKeysMapper.onKeyPressed({ key: Qt.Key_PowerDown, isAutoRepeat: true}, 500);
79− }
79+ physicalKeysMapper.onKeyPressed({ key: Qt.Key_PowerDown, isAutoRepeat: true}, 599);
80
80
81 // powerKeyLongPressed should not have been emitted yet.
81 // powerKeyLongPressed should not have been emitted yet.
82 compare(powerSpy.count, 0);
82 compare(powerSpy.count, 0);
83
83
84− for (var i = 0; i < 10; ++i) {
85− wait(50);
86− physicalKeysMapper.onKeyPressed({ key: Qt.Key_PowerDown, isAutoRepeat: true});
84+ physicalKeysMapper.onKeyPressed({ key: Qt.Key_PowerDown, isAutoRepeat: true}, 600);
87− }
88
85
89 compare(powerSpy.count, 1);
86 compare(powerSpy.count, 1);
87+
88+ // Confirm we only emit once
89+ physicalKeysMapper.onKeyPressed({ key: Qt.Key_PowerDown, isAutoRepeat: true}, 601);
90+ compare(powerSpy.count, 1);
90 }
91 }
91
92
92 function test_screenshotButtons_data() {
93 function test_screenshotButtons_data() {
tests/qmltests/Components/tst_Rating.qml+4−4
@@ -1,5 +1,5 @@
1/*
1/*
2− * Copyright 2013 Canonical Ltd.
2+ * Copyright 2013,2015 Canonical Ltd.
3 *
3 *
4 * This program is free software; you can redistribute it and/or modify
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
5 * it under the terms of the GNU General Public License as published by
@@ -14,17 +14,17 @@
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.4
18import QtTest 1.0
18import QtTest 1.0
19import "../../../qml/Components"
19import "../../../qml/Components"
20−import Ubuntu.Components 0.1
20+import Ubuntu.Components 1.3
21import Unity.Test 0.1 as UT
21import Unity.Test 0.1 as UT
22
22
23Rectangle {
23Rectangle {
24 id: root
24 id: root
25 width: units.gu(40)
25 width: units.gu(40)
26 height: units.gu(10)
26 height: units.gu(10)
27− color: Theme.palette.selected.background
27+ color: theme.palette.selected.background
28
28
29 Rating {
29 Rating {
30 id: rating
30 id: rating
tests/qmltests/Components/tst_ResponsiveGridView.qml+3−3
@@ -14,12 +14,12 @@
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.4
18import QtTest 1.0
18import QtTest 1.0
19import ".."
19import ".."
20import "../../../qml/Components"
20import "../../../qml/Components"
21−import Ubuntu.Components.ListItems 0.1 as ListItem
21+import Ubuntu.Components.ListItems 1.3 as ListItem
22−import Ubuntu.Components 0.1
22+import Ubuntu.Components 1.3
23import Unity.Test 0.1 as UT
23import Unity.Test 0.1 as UT
24
24
25Item {
25Item {
tests/qmltests/Components/tst_ResponsiveVerticalJournal.qml+3−3
@@ -14,12 +14,12 @@
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.4
18import QtTest 1.0
18import QtTest 1.0
19import ".."
19import ".."
20import "../../../qml/Components"
20import "../../../qml/Components"
21−import Ubuntu.Components.ListItems 0.1 as ListItem
21+import Ubuntu.Components.ListItems 1.3 as ListItem
22−import Ubuntu.Components 0.1
22+import Ubuntu.Components 1.3
23import Utils 0.1
23import Utils 0.1
24import Unity.Test 0.1 as UT
24import Unity.Test 0.1 as UT
25
25
tests/qmltests/Components/tst_Showable.qml+2−2
@@ -14,9 +14,9 @@
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.4
18import QtTest 1.0
18import QtTest 1.0
19−import Ubuntu.Components 0.1
19+import Ubuntu.Components 1.3
20import Unity.Test 0.1 as UT
20import Unity.Test 0.1 as UT
21import ".."
21import ".."
22import "../../../qml/Components"
22import "../../../qml/Components"
tests/qmltests/Components/tst_ZoomableImage.qml+1−1
@@ -14,7 +14,7 @@
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.4
18import QtTest 1.0
18import QtTest 1.0
19import "../../../qml/Components"
19import "../../../qml/Components"
20import Unity.Test 0.1 as UT
20import Unity.Test 0.1 as UT
tests/qmltests/Dash/Previews/MockPreviewWidget.qml+1−1
@@ -15,7 +15,7 @@
15 *
15 *
16 */
16 */
17
17
18−import QtQuick 2.0
18+import QtQuick 2.4
19import "../../../../qml/Dash/Previews"
19import "../../../../qml/Dash/Previews"
20
20
21PreviewWidget {
21PreviewWidget {
tests/qmltests/Dash/Previews/tst_Preview.qml+3−3
@@ -1,5 +1,5 @@
1/*
1/*
2− * Copyright 2014 Canonical Ltd.
2+ * Copyright 2014,2015 Canonical Ltd.
3 *
3 *
4 * This program is free software; you can redistribute it and/or modify
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
5 * it under the terms of the GNU General Public License as published by
@@ -14,7 +14,7 @@
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.4
18import QtTest 1.0
18import QtTest 1.0
19import "../../../../qml/Dash/Previews"
19import "../../../../qml/Dash/Previews"
20import Unity.Test 0.1 as UT
20import Unity.Test 0.1 as UT
@@ -24,7 +24,7 @@ Rectangle {
24 id: root
24 id: root
25 width: units.gu(60)
25 width: units.gu(60)
26 height: units.gu(60)
26 height: units.gu(60)
27− color: Theme.palette.selected.background
27+ color: theme.palette.selected.background
28
28
29 Item {
29 Item {
30 id: shell
30 id: shell
tests/qmltests/Dash/Previews/tst_PreviewActions.qml+2−2
@@ -14,11 +14,11 @@
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.4
18import QtTest 1.0
18import QtTest 1.0
19import "../../../../qml/Dash/Previews"
19import "../../../../qml/Dash/Previews"
20import Unity.Test 0.1 as UT
20import Unity.Test 0.1 as UT
21−import Ubuntu.Components 0.1
21+import Ubuntu.Components 1.3
22
22
23
23
24Rectangle {
24Rectangle {
tests/qmltests/Dash/Previews/tst_PreviewAudioPlayback.qml+4−4
@@ -1,5 +1,5 @@
1/*
1/*
2− * Copyright 2014 Canonical Ltd.
2+ * Copyright 2014,2015 Canonical Ltd.
3 *
3 *
4 * This program is free software; you can redistribute it and/or modify
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
5 * it under the terms of the GNU General Public License as published by
@@ -14,9 +14,9 @@
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.4
18import QtTest 1.0
18import QtTest 1.0
19−import Ubuntu.Components 0.1
19+import Ubuntu.Components 1.3
20import "../../../../qml/Dash/Previews"
20import "../../../../qml/Dash/Previews"
21import Unity.Test 0.1 as UT
21import Unity.Test 0.1 as UT
22import QtMultimedia 5.0
22import QtMultimedia 5.0
@@ -25,7 +25,7 @@ Rectangle {
25 id: root
25 id: root
26 width: units.gu(60)
26 width: units.gu(60)
27 height: units.gu(80)
27 height: units.gu(80)
28− color: Theme.palette.selected.background
28+ color: theme.palette.selected.background
29
29
30 property var tracksModel0: {
30 property var tracksModel0: {
31 "tracks": [ ]
31 "tracks": [ ]
tests/qmltests/Dash/Previews/tst_PreviewComment.qml+2−2
@@ -14,9 +14,9 @@
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.4
18import QtTest 1.0
18import QtTest 1.0
19−import Ubuntu.Components 1.1
19+import Ubuntu.Components 1.3
20import "../../../../qml/Dash/Previews"
20import "../../../../qml/Dash/Previews"
21import Unity.Test 0.1 as UT
21import Unity.Test 0.1 as UT
22
22
tests/qmltests/Dash/Previews/tst_PreviewCommentInput.qml+2−2
@@ -14,9 +14,9 @@
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.4
18import QtTest 1.0
18import QtTest 1.0
19−import Ubuntu.Components 1.1
19+import Ubuntu.Components 1.3
20import "../../../../qml/Dash/Previews"
20import "../../../../qml/Dash/Previews"
21import Unity.Test 0.1 as UT
21import Unity.Test 0.1 as UT
22
22
tests/qmltests/Dash/Previews/tst_PreviewExpandable.qml+6−6
@@ -1,5 +1,5 @@
1/*
1/*
2− * Copyright 2014 Canonical Ltd.
2+ * Copyright 2014,2015 Canonical Ltd.
3 *
3 *
4 * This program is free software; you can redistribute it and/or modify
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
5 * it under the terms of the GNU General Public License as published by
@@ -14,9 +14,9 @@
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.4
18import QtTest 1.0
18import QtTest 1.0
19−import Ubuntu.Components 0.1
19+import Ubuntu.Components 1.3
20import "../../../../qml/Dash/Previews"
20import "../../../../qml/Dash/Previews"
21import Unity.Test 0.1 as UT
21import Unity.Test 0.1 as UT
22
22
@@ -24,7 +24,7 @@ Rectangle {
24 id: root
24 id: root
25 width: units.gu(40)
25 width: units.gu(40)
26 height: units.gu(80)
26 height: units.gu(80)
27− color: Theme.palette.selected.background
27+ color: theme.palette.selected.background
28
28
29 property string longText: "Lorem ipsum dolor sit amet, consectetur adipiscing elit.\nPhasellus a mi vitae augue rhoncus lobortis ut rutrum metus.\nCurabitur tortor leo, tristique sed mollis quis, condimentum venenatis nibh.\nLorem ipsum dolor sit amet, consectetur adipiscing elit.\nPhasellus a mi vitae augue rhoncus lobortis ut rutrum metus.\nCurabitur tortor leo, tristique sed mollis quis, condimentum venenatis nibh."
29 property string longText: "Lorem ipsum dolor sit amet, consectetur adipiscing elit.\nPhasellus a mi vitae augue rhoncus lobortis ut rutrum metus.\nCurabitur tortor leo, tristique sed mollis quis, condimentum venenatis nibh.\nLorem ipsum dolor sit amet, consectetur adipiscing elit.\nPhasellus a mi vitae augue rhoncus lobortis ut rutrum metus.\nCurabitur tortor leo, tristique sed mollis quis, condimentum venenatis nibh."
30 property string longText2: "This is a very very very long text. 1 This is a very very very long text. 2 This is a very very very long text. 3 This is a very very very long text. 4 This is a very very very long text. 5 This is a very very very long text. 6 This is a very very very long text. 7 This is a very very very long text. 8 This is a very very very long text. 9 This is a very very very long text. 10 This is a very very very long text. 11 This is a very very very long text."
30 property string longText2: "This is a very very very long text. 1 This is a very very very long text. 2 This is a very very very long text. 3 This is a very very very long text. 4 This is a very very very long text. 5 This is a very very very long text. 6 This is a very very very long text. 7 This is a very very very long text. 8 This is a very very very long text. 9 This is a very very very long text. 10 This is a very very very long text. 11 This is a very very very long text."
@@ -319,9 +319,9 @@ Rectangle {
319 previewWidgetFactory.widgetType = allWidgetsModel.get(i).type;
319 previewWidgetFactory.widgetType = allWidgetsModel.get(i).type;
320 previewWidgetFactory.active = true;
320 previewWidgetFactory.active = true;
321
321
322− // Wait for the height ot settle by waiting twice the time of the
322+ // Wait for the height ot settle by waiting four times the time of the
323 // longest of the height behaviour animations
323 // longest of the height behaviour animations
324− wait(UbuntuAnimation.SnapDuration * 2);
324+ wait(UbuntuAnimation.SnapDuration * 4);
325
325
326 // Check the item inside the expandable has the same height
326 // Check the item inside the expandable has the same height
327 // as the one straight from the factory
327 // as the one straight from the factory
tests/qmltests/Dash/Previews/tst_PreviewHeader.qml+2−2
@@ -14,7 +14,7 @@
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.4
18import QtTest 1.0
18import QtTest 1.0
19import "../../../../qml/Dash/Previews"
19import "../../../../qml/Dash/Previews"
20import Unity.Test 0.1 as UT
20import Unity.Test 0.1 as UT
@@ -149,7 +149,7 @@ Rectangle {
149 tryCompareFunction(function() { return findChild(previewHeader, "mascotShape") != null }, true);
149 tryCompareFunction(function() { return findChild(previewHeader, "mascotShape") != null }, true);
150 var mascot = findChild(previewHeader, "mascotShape");
150 var mascot = findChild(previewHeader, "mascotShape");
151 tryCompare(mascot, "visible", true);
151 tryCompare(mascot, "visible", true);
152− tryCompare(mascot.image, "status", Image.Ready);
152+ tryCompare(mascot.source, "status", Image.Ready);
153 }
153 }
154 }
154 }
155}
155}
tests/qmltests/Dash/Previews/tst_PreviewIconActions.qml+3−3
@@ -14,11 +14,11 @@
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.4
18import QtTest 1.0
18import QtTest 1.0
19import "../../../../qml/Dash/Previews"
19import "../../../../qml/Dash/Previews"
20import Unity.Test 0.1 as UT
20import Unity.Test 0.1 as UT
21−import Ubuntu.Components 0.1
21+import Ubuntu.Components 1.3
22
22
23
23
24Rectangle {
24Rectangle {
@@ -104,7 +104,7 @@ Rectangle {
104
104
105 var button = findChild(root, "button" + buttonId);
105 var button = findChild(root, "button" + buttonId);
106 var image = findChildsByType(button, "QQuickImage")[0];
106 var image = findChildsByType(button, "QQuickImage")[0];
107− var label = findChildsByType(button, "Label")[0];
107+ var label = findChildsByType(button, "UCLabel")[0];
108
108
109 compare(image.source, buttonIcon);
109 compare(image.source, buttonIcon);
110 compare(label.text, buttonLabel);
110 compare(label.text, buttonLabel);
tests/qmltests/Dash/Previews/tst_PreviewImageGallery.qml+1−1
@@ -14,7 +14,7 @@
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.4
18import QtTest 1.0
18import QtTest 1.0
19import "../../../../qml/Dash/Previews"
19import "../../../../qml/Dash/Previews"
20import Unity.Test 0.1 as UT
20import Unity.Test 0.1 as UT
tests/qmltests/Dash/Previews/tst_PreviewPayments.qml+2−2
@@ -14,11 +14,11 @@
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.4
18import QtTest 1.0
18import QtTest 1.0
19import "../../../../qml/Dash/Previews"
19import "../../../../qml/Dash/Previews"
20import Unity.Test 0.1 as UT
20import Unity.Test 0.1 as UT
21−import Ubuntu.Components 0.1
21+import Ubuntu.Components 1.3
22
22
23Rectangle {
23Rectangle {
24 id: root
24 id: root
tests/qmltests/Dash/Previews/tst_PreviewProgress.qml+2−2
@@ -14,11 +14,11 @@
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.4
18import QtTest 1.0
18import QtTest 1.0
19import "../../../../qml/Dash/Previews"
19import "../../../../qml/Dash/Previews"
20import Unity.Test 0.1 as UT
20import Unity.Test 0.1 as UT
21−import Ubuntu.Components 0.1
21+import Ubuntu.Components 1.3
22
22
23Rectangle {
23Rectangle {
24 id: root
24 id: root
tests/qmltests/Dash/Previews/tst_PreviewRatingDisplay.qml+4−4
@@ -1,5 +1,5 @@
1/*
1/*
2− * Copyright 2014 Canonical Ltd.
2+ * Copyright 2014,2015 Canonical Ltd.
3 *
3 *
4 * This program is free software; you can redistribute it and/or modify
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
5 * it under the terms of the GNU General Public License as published by
@@ -14,9 +14,9 @@
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.4
18import QtTest 1.0
18import QtTest 1.0
19−import Ubuntu.Components 0.1
19+import Ubuntu.Components 1.3
20import "../../../../qml/Dash/Previews"
20import "../../../../qml/Dash/Previews"
21import Unity.Test 0.1 as UT
21import Unity.Test 0.1 as UT
22
22
@@ -24,7 +24,7 @@ Rectangle {
24 id: root
24 id: root
25 width: units.gu(40)
25 width: units.gu(40)
26 height: units.gu(80)
26 height: units.gu(80)
27− color: Theme.palette.selected.background
27+ color: theme.palette.selected.background
28
28
29 property var reviewsModel0: {
29 property var reviewsModel0: {
30 "reviews": [ ]
30 "reviews": [ ]
tests/qmltests/Dash/Previews/tst_PreviewRatingEdit.qml+4−4
@@ -1,5 +1,5 @@
1/*
1/*
2− * Copyright 2014 Canonical Ltd.
2+ * Copyright 2014,2015 Canonical Ltd.
3 *
3 *
4 * This program is free software; you can redistribute it and/or modify
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
5 * it under the terms of the GNU General Public License as published by
@@ -14,9 +14,9 @@
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.4
18import QtTest 1.0
18import QtTest 1.0
19−import Ubuntu.Components 0.1
19+import Ubuntu.Components 1.3
20import "../../../../qml/Dash/Previews"
20import "../../../../qml/Dash/Previews"
21import Unity.Test 0.1 as UT
21import Unity.Test 0.1 as UT
22
22
@@ -24,7 +24,7 @@ Rectangle {
24 id: root
24 id: root
25 width: units.gu(40)
25 width: units.gu(40)
26 height: units.gu(80)
26 height: units.gu(80)
27− color: Theme.palette.selected.background
27+ color: theme.palette.selected.background
28
28
29 property var widgetData0: { "visible": "both", "required": "both", author: "Some dude", rating: 4.5, review: "Very cool app" }
29 property var widgetData0: { "visible": "both", "required": "both", author: "Some dude", rating: 4.5, review: "Very cool app" }
30
30
tests/qmltests/Dash/Previews/tst_PreviewRatingInput.qml+4−4
@@ -1,5 +1,5 @@
1/*
1/*
2− * Copyright 2014 Canonical Ltd.
2+ * Copyright 2014,2015 Canonical Ltd.
3 *
3 *
4 * This program is free software; you can redistribute it and/or modify
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
5 * it under the terms of the GNU General Public License as published by
@@ -14,9 +14,9 @@
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.4
18import QtTest 1.0
18import QtTest 1.0
19−import Ubuntu.Components 0.1
19+import Ubuntu.Components 1.3
20import "../../../../qml/Dash/Previews"
20import "../../../../qml/Dash/Previews"
21import Unity.Test 0.1 as UT
21import Unity.Test 0.1 as UT
22
22
@@ -24,7 +24,7 @@ Rectangle {
24 id: root
24 id: root
25 width: units.gu(40)
25 width: units.gu(40)
26 height: units.gu(80)
26 height: units.gu(80)
27− color: Theme.palette.selected.background
27+ color: theme.palette.selected.background
28
28
29 property real validInputRating: 1
29 property real validInputRating: 1
30 property real invalidInputRating: -1
30 property real invalidInputRating: -1
tests/qmltests/Dash/Previews/tst_PreviewSharing.qmlnew file+71
@@ -0,0 +1,71 @@
1+/*
2+ * Copyright 2014 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.4
18+import QtTest 1.0
19+import Ubuntu.Components 1.3
20+import "../../../../qml/Dash/Previews"
21+import Unity.Test 0.1 as UT
22+
23+Rectangle {
24+ id: root
25+ width: units.gu(40)
26+ height: units.gu(80)
27+ color: "black"
28+
29+ property var shareData: {
30+ "uri": [
31+ "Text here",
32+ "text here 2",
33+ "text here 3"
34+ ],
35+ "contentType": "text"
36+ }
37+
38+ property var shareDataNoUri: {
39+ "uri": "",
40+ "contentType": "text"
41+ }
42+
43+ PreviewSharing {
44+ id: previewSharing
45+ anchors { left: parent.left; bottom: parent.bottom; }
46+ shareData: root.shareData
47+ }
48+
49+ UT.UnityTestCase {
50+ name: "PreviewSharingTest"
51+ when: windowShown
52+
53+ property Item peerPicker: findChild(previewSharing.rootItem, "peerPicker")
54+
55+ function cleanup() {
56+ peerPicker.visible = false;
57+ previewSharing.shareData = root.shareData;
58+ }
59+
60+ function test_visible() {
61+ compare(previewSharing.visible, true);
62+ previewSharing.shareData = shareDataNoUri;
63+ compare(previewSharing.visible, false);
64+ }
65+
66+ function test_open_picker() {
67+ mouseClick(previewSharing);
68+ compare(peerPicker.visible, true);
69+ }
70+ }
71+}
tests/qmltests/Dash/Previews/tst_PreviewTable.qml+4−4
@@ -1,5 +1,5 @@
1/*
1/*
2− * Copyright 2014 Canonical Ltd.
2+ * Copyright 2014,2015 Canonical Ltd.
3 *
3 *
4 * This program is free software; you can redistribute it and/or modify
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
5 * it under the terms of the GNU General Public License as published by
@@ -14,9 +14,9 @@
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.4
18import QtTest 1.0
18import QtTest 1.0
19−import Ubuntu.Components 0.1
19+import Ubuntu.Components 1.3
20import "../../../../qml/Dash/Previews"
20import "../../../../qml/Dash/Previews"
21import Unity.Test 0.1 as UT
21import Unity.Test 0.1 as UT
22
22
@@ -24,7 +24,7 @@ Rectangle {
24 id: root
24 id: root
25 width: units.gu(40)
25 width: units.gu(40)
26 height: units.gu(80)
26 height: units.gu(80)
27− color: Theme.palette.selected.background
27+ color: theme.palette.selected.background
28
28
29 property var widgetDataComplete: {
29 property var widgetDataComplete: {
30 "title": "Title here longa long long long long long long long long long long",
30 "title": "Title here longa long long long long long long long long long long",
tests/qmltests/Dash/Previews/tst_PreviewTextSummary.qml+4−4
@@ -1,5 +1,5 @@
1/*
1/*
2− * Copyright 2014 Canonical Ltd.
2+ * Copyright 2014,2015 Canonical Ltd.
3 *
3 *
4 * This program is free software; you can redistribute it and/or modify
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
5 * it under the terms of the GNU General Public License as published by
@@ -14,9 +14,9 @@
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.4
18import QtTest 1.0
18import QtTest 1.0
19−import Ubuntu.Components 0.1
19+import Ubuntu.Components 1.3
20import "../../../../qml/Dash/Previews"
20import "../../../../qml/Dash/Previews"
21import Unity.Test 0.1 as UT
21import Unity.Test 0.1 as UT
22
22
@@ -24,7 +24,7 @@ Rectangle {
24 id: root
24 id: root
25 width: units.gu(40)
25 width: units.gu(40)
26 height: units.gu(80)
26 height: units.gu(80)
27− color: Theme.palette.selected.background
27+ color: theme.palette.selected.background
28
28
29 property var widgetDataComplete: {
29 property var widgetDataComplete: {
30 "title": "Title here",
30 "title": "Title here",
tests/qmltests/Dash/Previews/tst_PreviewVideoPlayback.qml+1−1
@@ -14,7 +14,7 @@
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.4
18import QtTest 1.0
18import QtTest 1.0
19import "../../../../qml/Dash/Previews"
19import "../../../../qml/Dash/Previews"
20import Unity.Test 0.1 as UT
20import Unity.Test 0.1 as UT
tests/qmltests/Dash/Previews/tst_PreviewWidgetFactory.qml+3−3
@@ -1,5 +1,5 @@
1/*
1/*
2− * Copyright 2014 Canonical Ltd.
2+ * Copyright 2014,2015 Canonical Ltd.
3 *
3 *
4 * This program is free software; you can redistribute it and/or modify
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
5 * it under the terms of the GNU General Public License as published by
@@ -14,7 +14,7 @@
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.4
18import QtTest 1.0
18import QtTest 1.0
19import "../../../../qml/Dash/Previews"
19import "../../../../qml/Dash/Previews"
20import Unity.Test 0.1 as UT
20import Unity.Test 0.1 as UT
@@ -23,7 +23,7 @@ Rectangle {
23 id: root
23 id: root
24 width: units.gu(60)
24 width: units.gu(60)
25 height: units.gu(80)
25 height: units.gu(80)
26− color: Theme.palette.selected.background
26+ color: theme.palette.selected.background
27
27
28 PreviewWidgetFactory {
28 PreviewWidgetFactory {
29 id: factory
29 id: factory
tests/qmltests/Dash/Previews/tst_PreviewZoomableImage.qml+2−2
@@ -14,7 +14,7 @@
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.4
18import QtTest 1.0
18import QtTest 1.0
19import "../../../../qml/Dash/Previews"
19import "../../../../qml/Dash/Previews"
20import Unity.Test 0.1 as UT
20import Unity.Test 0.1 as UT
@@ -41,7 +41,7 @@ Rectangle {
41
41
42 Loader {
42 Loader {
43 id: loader
43 id: loader
44− anchors.centerIn: parent
44+ width: parent.width
45 sourceComponent: PreviewZoomableImage {
45 sourceComponent: PreviewZoomableImage {
46 widgetData: widgetData0
46 widgetData: widgetData0
47 }
47 }
tests/qmltests/Dash/ScopeSettings/tst_ScopeSettingBoolean.qml+2−2
@@ -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.4
18−import Ubuntu.Components 1.1
18+import Ubuntu.Components 1.3
19import QtTest 1.0
19import QtTest 1.0
20import "../../../../qml/Dash/ScopeSettings"
20import "../../../../qml/Dash/ScopeSettings"
21import Unity.Test 0.1 as UT
21import Unity.Test 0.1 as UT
tests/qmltests/Dash/ScopeSettings/tst_ScopeSettingList.qml+2−2
@@ -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.4
18−import Ubuntu.Components 1.1
18+import Ubuntu.Components 1.3
19import QtTest 1.0
19import QtTest 1.0
20import "../../../../qml/Dash/ScopeSettings"
20import "../../../../qml/Dash/ScopeSettings"
21import Unity.Test 0.1 as UT
21import Unity.Test 0.1 as UT
tests/qmltests/Dash/ScopeSettings/tst_ScopeSettingNumber.qml+2−2
@@ -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.4
18−import Ubuntu.Components 1.1
18+import Ubuntu.Components 1.3
19import QtTest 1.0
19import QtTest 1.0
20import "../../../../qml/Dash/ScopeSettings"
20import "../../../../qml/Dash/ScopeSettings"
21import Unity.Test 0.1 as UT
21import Unity.Test 0.1 as UT
tests/qmltests/Dash/ScopeSettings/tst_ScopeSettingString.qml+2−2
@@ -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.4
18−import Ubuntu.Components 1.1
18+import Ubuntu.Components 1.3
19import QtTest 1.0
19import QtTest 1.0
20import "../../../../qml/Dash/ScopeSettings"
20import "../../../../qml/Dash/ScopeSettings"
21import Unity.Test 0.1 as UT
21import Unity.Test 0.1 as UT
tests/qmltests/Dash/ScopeSettings/tst_ScopeSettingsWidgetFactory.qml+2−2
@@ -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.4
18−import Ubuntu.Components 1.1
18+import Ubuntu.Components 1.3
19import QtTest 1.0
19import QtTest 1.0
20import "../../../../qml/Dash/ScopeSettings"
20import "../../../../qml/Dash/ScopeSettings"
21import Unity.Test 0.1 as UT
21import Unity.Test 0.1 as UT
tests/qmltests/Dash/tst_Card.qml+7−7
@@ -1,5 +1,5 @@
1/*
1/*
2− * Copyright (C) 2013 Canonical, Ltd.
2+ * Copyright (C) 2013,2015 Canonical, Ltd.
3 *
3 *
4 * This program is free software; you can redistribute it and/or modify
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
5 * it under the terms of the GNU General Public License as published by
@@ -14,9 +14,9 @@
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.4
18import QtTest 1.0
18import QtTest 1.0
19−import Ubuntu.Components 0.1
19+import Ubuntu.Components 1.3
20import Unity.Test 0.1 as UT
20import Unity.Test 0.1 as UT
21import "../../../qml/Dash"
21import "../../../qml/Dash"
22import "CardHelpers.js" as Helpers
22import "CardHelpers.js" as Helpers
@@ -443,11 +443,11 @@ Rectangle {
443 }
443 }
444
444
445 if (data.hasOwnProperty("color")) {
445 if (data.hasOwnProperty("color")) {
446− tryCompare(background, "color", data.color);
446+ tryCompare(background, "backgroundColor", data.color);
447 }
447 }
448
448
449 if (data.hasOwnProperty("gradientColor")) {
449 if (data.hasOwnProperty("gradientColor")) {
450− tryCompare(background, "gradientColor", data.gradientColor);
450+ tryCompare(background, "secondaryBackgroundColor", data.gradientColor);
451 }
451 }
452
452
453 if (data.hasOwnProperty("image")) {
453 if (data.hasOwnProperty("image")) {
@@ -520,9 +520,9 @@ Rectangle {
520 waitForRendering(selector);
520 waitForRendering(selector);
521 waitForRendering(card);
521 waitForRendering(card);
522
522
523− background.color = data.tag;
523+ background.backgroundColor = data.tag;
524
524
525− var fontColor = data.dark ? Theme.palette.normal.baseText : "white";
525+ var fontColor = data.dark ? theme.palette.normal.baseText : "white";
526
526
527 tryCompareFunction(function() { return Qt.colorEqual(summary.color, fontColor); }, true);
527 tryCompareFunction(function() { return Qt.colorEqual(summary.color, fontColor); }, true);
528 tryCompareFunction(function() { return Qt.colorEqual(title.color, fontColor); }, true);
528 tryCompareFunction(function() { return Qt.colorEqual(title.color, fontColor); }, true);
tests/qmltests/Dash/tst_CardBenchmark.qml+2−2
@@ -14,9 +14,9 @@
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.4
18import QtTest 1.0
18import QtTest 1.0
19−import Ubuntu.Components 0.1
19+import Ubuntu.Components 1.3
20import Unity.Test 0.1 as UT
20import Unity.Test 0.1 as UT
21import "../../../qml/Dash"
21import "../../../qml/Dash"
22import "CardHelpers.js" as Helpers
22import "CardHelpers.js" as Helpers
tests/qmltests/Dash/tst_CardTool.qml+2−2
@@ -14,9 +14,9 @@
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.4
18import QtTest 1.0
18import QtTest 1.0
19−import Ubuntu.Components 0.1
19+import Ubuntu.Components 1.3
20import Unity.Test 0.1 as UT
20import Unity.Test 0.1 as UT
21import "../../../qml/Dash"
21import "../../../qml/Dash"
22import "CardHelpers.js" as Helpers
22import "CardHelpers.js" as Helpers
tests/qmltests/Dash/tst_Dash.qml+3−3
@@ -14,10 +14,10 @@
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.4
18import QtTest 1.0
18import QtTest 1.0
19import "../../../qml/Dash"
19import "../../../qml/Dash"
20−import Ubuntu.Components 0.1
20+import Ubuntu.Components 1.3
21import Unity.Test 0.1 as UT
21import Unity.Test 0.1 as UT
22
22
23Item {
23Item {
@@ -319,7 +319,7 @@ Item {
319
319
320 // Click on the store
320 // Click on the store
321 var scopesListPageHeader = findChild(scopesList, "pageHeader");
321 var scopesListPageHeader = findChild(scopesList, "pageHeader");
322− var searchButton = findChild(scopesListPageHeader, "store_header_button");
322+ var searchButton = findChild(scopesListPageHeader, "store_action_button");
323 mouseClick(searchButton);
323 mouseClick(searchButton);
324
324
325 spy.wait();
325 spy.wait();
tests/qmltests/Dash/tst_DashContent.qml+6−6
@@ -14,11 +14,11 @@
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.4
18import QtTest 1.0
18import QtTest 1.0
19import "../../../qml/Dash"
19import "../../../qml/Dash"
20import "../../../qml/Components"
20import "../../../qml/Components"
21−import Ubuntu.Components 0.1
21+import Ubuntu.Components 1.3
22import Unity 0.2
22import Unity 0.2
23import Unity.Test 0.1 as UT
23import Unity.Test 0.1 as UT
24import Utils 0.1
24import Utils 0.1
@@ -215,7 +215,7 @@ Item {
215 verify(pageHeader, "Could not find the scope page header.");
215 verify(pageHeader, "Could not find the scope page header.");
216 var innerHeader = findChild(pageHeader, "innerPageHeader");
216 var innerHeader = findChild(pageHeader, "innerPageHeader");
217 verify(innerHeader, "Could not find the scope page header.");
217 verify(innerHeader, "Could not find the scope page header.");
218− compare(innerHeader.title, scopesModel.getScope(data.index).name);
218+ compare(innerHeader.config.title, scopesModel.getScope(data.index).name);
219 }
219 }
220
220
221 function test_is_active_data() {
221 function test_is_active_data() {
@@ -552,13 +552,13 @@ Item {
552 }
552 }
553
553
554 function getSettledButtons() {
554 function getSettledButtons() {
555− var buttons = findChildsByType(dashContent, "AbstractButton");
555+ var buttons = findChildsByType(dashContent, "UCAbstractButton");
556 wait(2500);
556 wait(2500);
557− var aux = findChildsByType(dashContent, "AbstractButton");
557+ var aux = findChildsByType(dashContent, "UCAbstractButton");
558 while (!compareArrays(aux, buttons)) {
558 while (!compareArrays(aux, buttons)) {
559 buttons = aux;
559 buttons = aux;
560 wait(2500);
560 wait(2500);
561− aux = findChildsByType(dashContent, "AbstractButton");
561+ aux = findChildsByType(dashContent, "UCAbstractButton");
562 }
562 }
563 return buttons;
563 return buttons;
564 }
564 }
tests/qmltests/Dash/tst_PageHeader.qml → tests/qmltests/Dash/tst_DashPageHeader.qmlrenamed+5−5
@@ -1,5 +1,5 @@
1/*
1/*
2− * Copyright 2013 Canonical Ltd.
2+ * Copyright 2013,2015 Canonical Ltd.
3 *
3 *
4 * This program is free software; you can redistribute it and/or modify
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
5 * it under the terms of the GNU General Public License as published by
@@ -14,11 +14,11 @@
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.4
18import QtTest 1.0
18import QtTest 1.0
19import ".."
19import ".."
20import "../../../qml/Dash"
20import "../../../qml/Dash"
21−import Ubuntu.Components 0.1
21+import Ubuntu.Components 1.3
22import Unity 0.2
22import Unity 0.2
23import Unity.Test 0.1 as UT
23import Unity.Test 0.1 as UT
24
24
@@ -244,7 +244,7 @@ Item {
244 anchors.fill: parent
244 anchors.fill: parent
245 spacing: units.gu(1)
245 spacing: units.gu(1)
246
246
247− PageHeader {
247+ DashPageHeader {
248 id: pageHeader
248 id: pageHeader
249 anchors {
249 anchors {
250 left: parent.left
250 left: parent.left
@@ -254,7 +254,7 @@ Item {
254 searchEntryEnabled: true
254 searchEntryEnabled: true
255 title: "%^$%^%^&%^&%^$%GHR%"
255 title: "%^$%^%^&%^&%^$%GHR%"
256 scopeStyle: QtObject {
256 scopeStyle: QtObject {
257− readonly property color foreground: Theme.palette.normal.baseText
257+ readonly property color foreground: theme.palette.normal.baseText
258 readonly property url headerLogo: showImageCheckBox.checked ? pageHeader.titleImageSource : ""
258 readonly property url headerLogo: showImageCheckBox.checked ? pageHeader.titleImageSource : ""
259 }
259 }
260 showBackButton: showBackButtonCheckBox.checked
260 showBackButton: showBackButtonCheckBox.checked
tests/qmltests/Dash/tst_GenericScopeView.qml+5−5
@@ -14,13 +14,13 @@
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.4
18import QtTest 1.0
18import QtTest 1.0
19import Unity 0.2
19import Unity 0.2
20import ".."
20import ".."
21import "../../../qml/Dash"
21import "../../../qml/Dash"
22import "../../../qml/Components"
22import "../../../qml/Components"
23−import Ubuntu.Components 1.1
23+import Ubuntu.Components 1.3
24import Unity.Test 0.1 as UT
24import Unity.Test 0.1 as UT
25
25
26Item {
26Item {
@@ -429,7 +429,7 @@ Item {
429 // open
429 // open
430 tryCompare(testCase.subPageLoader, "open", false);
430 tryCompare(testCase.subPageLoader, "open", false);
431 tryCompare(testCase.subPageLoader, "visible", false);
431 tryCompare(testCase.subPageLoader, "visible", false);
432− var settings = findChild(innerHeader, "settings_header_button");
432+ var settings = findChild(innerHeader, "settings_action_button");
433 mouseClick(settings);
433 mouseClick(settings);
434 tryCompare(testCase.subPageLoader, "open", true);
434 tryCompare(testCase.subPageLoader, "open", true);
435 tryCompareFunction(function() { return (String(subPageLoader.source)).indexOf("ScopeSettingsPage.qml") != -1; }, true);
435 tryCompareFunction(function() { return (String(subPageLoader.source)).indexOf("ScopeSettingsPage.qml") != -1; }, true);
@@ -500,7 +500,7 @@ Item {
500 mouseClick(seeAll0);
500 mouseClick(seeAll0);
501 verify(category0.expanded);
501 verify(category0.expanded);
502 tryCompare(category0, "height", category0.item.expandedHeight + seeAll0.height);
502 tryCompare(category0, "height", category0.item.expandedHeight + seeAll0.height);
503− tryCompare(genericScopeView.categoryView, "contentY", units.gu(14));
503+ tryCompare(genericScopeView.categoryView, "contentY", units.gu(13));
504
504
505 scrollToEnd();
505 scrollToEnd();
506
506
@@ -577,7 +577,7 @@ Item {
577 verify(innerHeader, "Could not find the inner header");
577 verify(innerHeader, "Could not find the inner header");
578
578
579 expectFail("Apps", "Click scope should not have a favorite button");
579 expectFail("Apps", "Click scope should not have a favorite button");
580− var favoriteAction = findChild(innerHeader, "favorite_header_button");
580+ var favoriteAction = findChild(innerHeader, "favorite_action_button");
581 verify(favoriteAction, "Could not find the favorite action.");
581 verify(favoriteAction, "Could not find the favorite action.");
582 mouseClick(favoriteAction);
582 mouseClick(favoriteAction);
583
583
tests/qmltests/Dash/tst_PreviewListView.qml+5−5
@@ -1,5 +1,5 @@
1/*
1/*
2− * Copyright 2014 Canonical Ltd.
2+ * Copyright 2014,2015 Canonical Ltd.
3 *
3 *
4 * This program is free software; you can redistribute it and/or modify
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
5 * it under the terms of the GNU General Public License as published by
@@ -14,9 +14,9 @@
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.4
18import QtTest 1.0
18import QtTest 1.0
19−import Ubuntu.Components 1.1
19+import Ubuntu.Components 1.3
20import "../../../qml/Dash"
20import "../../../qml/Dash"
21import Unity.Test 0.1 as UT
21import Unity.Test 0.1 as UT
22import Unity 0.2 as Unity
22import Unity 0.2 as Unity
@@ -26,7 +26,7 @@ Rectangle {
26 id: root
26 id: root
27 width: units.gu(60)
27 width: units.gu(60)
28 height: units.gu(60)
28 height: units.gu(60)
29− color: Theme.palette.selected.background
29+ color: theme.palette.selected.background
30
30
31 Unity.MockScope {
31 Unity.MockScope {
32 id: mockScope
32 id: mockScope
@@ -91,7 +91,7 @@ Rectangle {
91 var header = findChild(listView, "innerPageHeader");
91 var header = findChild(listView, "innerPageHeader");
92 verify(header, "Could not find the preview header");
92 verify(header, "Could not find the preview header");
93
93
94− compare(header.title, "Mock Scope");
94+ compare(header.config.title, "Mock Scope");
95 }
95 }
96
96
97 function test_header_style() {
97 function test_header_style() {
tests/qmltests/Greeter/TestView.qml+2−2
@@ -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.3
17+import QtQuick 2.4
18−import Ubuntu.Components 1.1
18+import Ubuntu.Components 1.3
19import "../Components"
19import "../Components"
20
20
21Item {
21Item {
tests/qmltests/Greeter/tst_Clock.qml+2−2
@@ -14,11 +14,11 @@
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.4
18import QtTest 1.0
18import QtTest 1.0
19import ".."
19import ".."
20import "../../../qml/Greeter"
20import "../../../qml/Greeter"
21−import Ubuntu.Components 0.1
21+import Ubuntu.Components 1.3
22import Unity.Indicators 0.1 as Indicators
22import Unity.Indicators 0.1 as Indicators
23import Unity.Test 0.1 as UT
23import Unity.Test 0.1 as UT
24
24
tests/qmltests/Greeter/tst_Greeter.qml+2−2
@@ -14,11 +14,11 @@
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.4
18import QtTest 1.0
18import QtTest 1.0
19import ".."
19import ".."
20import "../../../qml/Greeter"
20import "../../../qml/Greeter"
21−import Ubuntu.Components 0.1
21+import Ubuntu.Components 1.3
22import AccountsService 0.1
22import AccountsService 0.1
23import GSettings 1.0
23import GSettings 1.0
24import IntegratedLightDM 0.1 as LightDM
24import IntegratedLightDM 0.1 as LightDM
tests/qmltests/Greeter/tst_Infographics.qml+2−2
@@ -14,11 +14,11 @@
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.4
18import QtTest 1.0
18import QtTest 1.0
19import ".."
19import ".."
20import "../../../qml/Greeter"
20import "../../../qml/Greeter"
21−import Ubuntu.Components 0.1
21+import Ubuntu.Components 1.3
22import Unity.Test 0.1 as UT
22import Unity.Test 0.1 as UT
23import IntegratedLightDM 0.1 as LightDM
23import IntegratedLightDM 0.1 as LightDM
24
24
tests/qmltests/Greeter/tst_NarrowView.qml+2−2
@@ -14,12 +14,12 @@
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.4
18import QtTest 1.0
18import QtTest 1.0
19import ".."
19import ".."
20import "../../../qml/Greeter"
20import "../../../qml/Greeter"
21import IntegratedLightDM 0.1 as LightDM
21import IntegratedLightDM 0.1 as LightDM
22−import Ubuntu.Components 0.1
22+import Ubuntu.Components 1.3
23import Unity.Test 0.1 as UT
23import Unity.Test 0.1 as UT
24
24
25Item {
25Item {
tests/qmltests/Greeter/tst_WideView.qml+2−2
@@ -14,12 +14,12 @@
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.4
18import QtTest 1.0
18import QtTest 1.0
19import ".."
19import ".."
20import "../../../qml/Greeter"
20import "../../../qml/Greeter"
21import IntegratedLightDM 0.1 as LightDM
21import IntegratedLightDM 0.1 as LightDM
22−import Ubuntu.Components 0.1
22+import Ubuntu.Components 1.3
23import Unity.Test 0.1 as UT
23import Unity.Test 0.1 as UT
24
24
25Item {
25Item {
tests/qmltests/Launcher/tst_Launcher.qml+2−2
@@ -14,11 +14,11 @@
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.4
18import QtQuick.Layouts 1.1
18import QtQuick.Layouts 1.1
19import QtTest 1.0
19import QtTest 1.0
20import Unity.Test 0.1
20import Unity.Test 0.1
21−import Ubuntu.Components 1.1
21+import Ubuntu.Components 1.3
22import ".."
22import ".."
23import "../../../qml/Launcher"
23import "../../../qml/Launcher"
24import Unity.Launcher 0.1
24import Unity.Launcher 0.1
tests/qmltests/Notifications/tst_Notifications.qml+1−1
@@ -20,7 +20,7 @@ import QtTest 1.0
20import ".."
20import ".."
21import "../../../qml/Notifications"
21import "../../../qml/Notifications"
22import "../../../qml/Components/UnityInputInfo"
22import "../../../qml/Components/UnityInputInfo"
23−import Ubuntu.Components 1.2
23+import Ubuntu.Components 1.3
24import Unity.Test 0.1
24import Unity.Test 0.1
25import Unity.Notifications 1.0
25import Unity.Notifications 1.0
26import QtMultimedia 5.0
26import QtMultimedia 5.0
tests/qmltests/Notifications/tst_OptionToggle.qml+2−3
@@ -17,14 +17,13 @@
17 * Mirco Mueller <mirco.mueller@canonical.com>
17 * Mirco Mueller <mirco.mueller@canonical.com>
18 */
18 */
19
19
20−import QtQuick 2.0
20+import QtQuick 2.4
21import QtTest 1.0
21import QtTest 1.0
22import ".."
22import ".."
23import "../../../qml/Notifications"
23import "../../../qml/Notifications"
24−import Ubuntu.Components 0.1
24+import Ubuntu.Components 1.3
25import Unity.Test 0.1
25import Unity.Test 0.1
26import Unity.Notifications 1.0
26import Unity.Notifications 1.0
27−import QtMultimedia 5.0
28
27
29Row {
28Row {
30 id: rootRow
29 id: rootRow
tests/qmltests/Notifications/tst_SwipeToAct.qml+1−1
@@ -20,7 +20,7 @@ import QtTest 1.0
20import ".."
20import ".."
21import "../../../qml/Notifications"
21import "../../../qml/Notifications"
22import "../../../qml/Components/UnityInputInfo"
22import "../../../qml/Components/UnityInputInfo"
23−import Ubuntu.Components 0.1
23+import Ubuntu.Components 1.3
24import Unity.Test 0.1
24import Unity.Test 0.1
25import Unity.Notifications 1.0
25import Unity.Notifications 1.0
26
26
tests/qmltests/Notifications/tst_VisualSnapDecisionsQueue.qml+2−2
@@ -14,11 +14,11 @@
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.4
18import QtTest 1.0
18import QtTest 1.0
19import ".."
19import ".."
20import "../../../qml/Notifications"
20import "../../../qml/Notifications"
21−import Ubuntu.Components 0.1
21+import Ubuntu.Components 1.3
22import Unity.Test 0.1
22import Unity.Test 0.1
23import Unity.Notifications 1.0
23import Unity.Notifications 1.0
24
24
tests/qmltests/Panel/IndicatorTest.qml+2−2
@@ -14,11 +14,11 @@
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.1
17+import QtQuick 2.4
18import QtQuick.Layouts 1.1
18import QtQuick.Layouts 1.1
19import QtTest 1.0
19import QtTest 1.0
20import "../../../qml/Panel"
20import "../../../qml/Panel"
21−import Ubuntu.Components 0.1
21+import Ubuntu.Components 1.3
22import Unity.Test 0.1 as UT
22import Unity.Test 0.1 as UT
23import Unity.Indicators 0.1 as Indicators
23import Unity.Indicators 0.1 as Indicators
24
24
tests/qmltests/Panel/Indicators/tst_IndicatorsLight.qml+2−2
@@ -14,11 +14,11 @@
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.4
18import QtQuick.Layouts 1.1
18import QtQuick.Layouts 1.1
19import Unity.Test 0.1 as UT
19import Unity.Test 0.1 as UT
20import Unity.Indicators 0.1 as Indicators
20import Unity.Indicators 0.1 as Indicators
21−import Ubuntu.Components 1.1
21+import Ubuntu.Components 1.3
22import Powerd 0.1
22import Powerd 0.1
23import Lights 0.1
23import Lights 0.1
24import QMenuModel 0.1
24import QMenuModel 0.1
tests/qmltests/Panel/Indicators/tst_MenuItemFactory.qml+1−1
@@ -14,7 +14,7 @@
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.4
18import QtTest 1.0
18import QtTest 1.0
19import Unity.Test 0.1 as UT
19import Unity.Test 0.1 as UT
20import Ubuntu.Settings.Menus 0.1 as Menus
20import Ubuntu.Settings.Menus 0.1 as Menus
tests/qmltests/Panel/Indicators/tst_MessageMenuItemFactory.qml+1−1
@@ -14,7 +14,7 @@
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.4
18import QtTest 1.0
18import QtTest 1.0
19import Unity.Test 0.1 as UT
19import Unity.Test 0.1 as UT
20import QMenuModel 0.1
20import QMenuModel 0.1
tests/qmltests/Panel/tst_ActiveCallHint.qml+1−1
@@ -14,7 +14,7 @@
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.4
18import QtTest 1.0
18import QtTest 1.0
19import Unity.Test 0.1 as UT
19import Unity.Test 0.1 as UT
20import Ubuntu.Telephony 0.1 as Telephony
20import Ubuntu.Telephony 0.1 as Telephony
tests/qmltests/Panel/tst_IndicatorItem.qml+2−2
@@ -14,10 +14,10 @@
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.1
17+import QtQuick 2.4
18import QtQuick.Layouts 1.1
18import QtQuick.Layouts 1.1
19import QtTest 1.0
19import QtTest 1.0
20−import Ubuntu.Components 0.1
20+import Ubuntu.Components 1.3
21import Unity.Test 0.1 as UT
21import Unity.Test 0.1 as UT
22import "../../../qml/Panel"
22import "../../../qml/Panel"
23
23
tests/qmltests/Panel/tst_IndicatorItemRow.qml+2−2
@@ -14,11 +14,11 @@
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.1
17+import QtQuick 2.4
18import QtQuick.Layouts 1.1
18import QtQuick.Layouts 1.1
19import QtTest 1.0
19import QtTest 1.0
20import "../../../qml/Panel"
20import "../../../qml/Panel"
21−import Ubuntu.Components 0.1
21+import Ubuntu.Components 1.3
22import Unity.Test 0.1 as UT
22import Unity.Test 0.1 as UT
23import Unity.Indicators 0.1 as Indicators
23import Unity.Indicators 0.1 as Indicators
24
24
tests/qmltests/Panel/tst_IndicatorPage.qml+1−1
@@ -14,7 +14,7 @@
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.4
18import QtTest 1.0
18import QtTest 1.0
19import Unity.Test 0.1 as UT
19import Unity.Test 0.1 as UT
20import Unity.Indicators 0.1 as Indicators
20import Unity.Indicators 0.1 as Indicators
tests/qmltests/Panel/tst_IndicatorsBar.qml+2−2
@@ -14,11 +14,11 @@
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.1
17+import QtQuick 2.4
18import QtQuick.Layouts 1.1
18import QtQuick.Layouts 1.1
19import QtTest 1.0
19import QtTest 1.0
20import "../../../qml/Panel"
20import "../../../qml/Panel"
21−import Ubuntu.Components 0.1
21+import Ubuntu.Components 1.3
22import Unity.Test 0.1 as UT
22import Unity.Test 0.1 as UT
23import Unity.Indicators 0.1 as Indicators
23import Unity.Indicators 0.1 as Indicators
24
24
tests/qmltests/Panel/tst_IndicatorsMenu.qml+2−2
@@ -14,11 +14,11 @@
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.1
17+import QtQuick 2.4
18import QtQuick.Layouts 1.1
18import QtQuick.Layouts 1.1
19import QtTest 1.0
19import QtTest 1.0
20import "../../../qml/Panel"
20import "../../../qml/Panel"
21−import Ubuntu.Components 0.1
21+import Ubuntu.Components 1.3
22import Unity.Test 0.1 as UT
22import Unity.Test 0.1 as UT
23import Unity.Indicators 0.1 as Indicators
23import Unity.Indicators 0.1 as Indicators
24
24
tests/qmltests/Panel/tst_MenuContent.qml+1−1
@@ -14,7 +14,7 @@
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.4
18import QtTest 1.0
18import QtTest 1.0
19import Unity.Test 0.1 as UT
19import Unity.Test 0.1 as UT
20import "../../../qml/Panel"
20import "../../../qml/Panel"
tests/qmltests/Panel/tst_Panel.qml+2−2
@@ -14,11 +14,11 @@
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.1
17+import QtQuick 2.4
18import QtQuick.Layouts 1.1
18import QtQuick.Layouts 1.1
19import QtTest 1.0
19import QtTest 1.0
20import Unity.Test 0.1
20import Unity.Test 0.1
21−import Ubuntu.Components 0.1
21+import Ubuntu.Components 1.3
22import Unity.Application 0.1
22import Unity.Application 0.1
23import Unity.Indicators 0.1 as Indicators
23import Unity.Indicators 0.1 as Indicators
24import Ubuntu.Telephony 0.1 as Telephony
24import Ubuntu.Telephony 0.1 as Telephony
tests/qmltests/Stages/ApplicationCheckBox.qml+2−2
@@ -14,9 +14,9 @@
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.4
18import QtQuick.Layouts 1.1
18import QtQuick.Layouts 1.1
19−import Ubuntu.Components 1.1
19+import Ubuntu.Components 1.3
20import Unity.Application 0.1
20import Unity.Application 0.1
21
21
22RowLayout {
22RowLayout {
tests/qmltests/Stages/RecursingChildSessionControl.qml+2−2
@@ -14,9 +14,9 @@
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.1
17+import QtQuick 2.4
18import QtQuick.Layouts 1.1
18import QtQuick.Layouts 1.1
19−import Ubuntu.Components 0.1
19+import Ubuntu.Components 1.3
20import Unity.Application 0.1
20import Unity.Application 0.1
21
21
22ColumnLayout {
22ColumnLayout {
tests/qmltests/Stages/tst_ApplicationWindow.qml+3−3
@@ -14,14 +14,14 @@
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.1
17+import QtQuick 2.4
18import QtQuick.Layouts 1.1
18import QtQuick.Layouts 1.1
19import QtTest 1.0
19import QtTest 1.0
20import Unity.Test 0.1 as UT
20import Unity.Test 0.1 as UT
21import ".."
21import ".."
22import "../../../qml/Stages"
22import "../../../qml/Stages"
23−import Ubuntu.Components 0.1
23+import Ubuntu.Components 1.3
24−import Ubuntu.Components.ListItems 1.0 as ListItem
24+import Ubuntu.Components.ListItems 1.3 as ListItem
25import Unity.Application 0.1
25import Unity.Application 0.1
26
26
27Rectangle {
27Rectangle {
tests/qmltests/Stages/tst_DesktopStage.qml+84−8
@@ -14,33 +14,40 @@
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.4
18import QtTest 1.0
18import QtTest 1.0
19−import Ubuntu.Components 1.1
19+import Ubuntu.Components 1.3
20−import Ubuntu.Components.ListItems 1.0 as ListItem
20+import Ubuntu.Components.ListItems 1.3 as ListItem
21import Unity.Application 0.1
21import Unity.Application 0.1
22import Unity.Test 0.1
22import Unity.Test 0.1
23import Utils 0.1
23import Utils 0.1
24
24
25import "../../../qml/Stages"
25import "../../../qml/Stages"
26+import "../../../qml/Components"
26
27
27Item {
28Item {
28 id: root
29 id: root
29 width: desktopStageLoader.width + controls.width
30 width: desktopStageLoader.width + controls.width
30 height: desktopStageLoader.height
31 height: desktopStageLoader.height
31
32
33+ property var greeter: { fullyShown: true }
34+
32 Binding {
35 Binding {
33 target: MouseTouchAdaptor
36 target: MouseTouchAdaptor
34 property: "enabled"
37 property: "enabled"
35 value: false
38 value: false
36 }
39 }
37
40
38− Component.onCompleted: {
41+ Component.onCompleted: resetGeometry()
42+
43+ function resetGeometry() {
39 // ensures apps which are tested decorations are in view.
44 // ensures apps which are tested decorations are in view.
45+ WindowStateStorage.clear();
40 WindowStateStorage.geometry = {
46 WindowStateStorage.geometry = {
41 'unity8-dash': Qt.rect(0, units.gu(3), units.gu(50), units.gu(40)),
47 'unity8-dash': Qt.rect(0, units.gu(3), units.gu(50), units.gu(40)),
42 'dialer-app': Qt.rect(units.gu(51), units.gu(3), units.gu(50), units.gu(40)),
48 'dialer-app': Qt.rect(units.gu(51), units.gu(3), units.gu(50), units.gu(40)),
43 'camera-app': Qt.rect(0, units.gu(44), units.gu(50), units.gu(40)),
49 'camera-app': Qt.rect(0, units.gu(44), units.gu(50), units.gu(40)),
50+ 'gallery-app': Qt.rect(units.gu(51), units.gu(44), units.gu(50), units.gu(40))
44 }
51 }
45 }
52 }
46
53
@@ -61,6 +68,7 @@ Item {
61 Component.onDestruction: {
68 Component.onDestruction: {
62 desktopStageLoader.itemDestroyed = true;
69 desktopStageLoader.itemDestroyed = true;
63 }
70 }
71+ orientations: Orientations {}
64 }
72 }
65 }
73 }
66 }
74 }
@@ -110,14 +118,14 @@ Item {
110
118
111 desktopStageLoader.active = true;
119 desktopStageLoader.active = true;
112 tryCompare(desktopStageLoader, "status", Loader.Ready);
120 tryCompare(desktopStageLoader, "status", Loader.Ready);
121+ root.resetGeometry();
113 }
122 }
114
123
115 function killAllRunningApps() {
124 function killAllRunningApps() {
116− while (ApplicationManager.count > 1) {
125+ while (ApplicationManager.count > 0) {
117− var appIndex = ApplicationManager.get(0).appId == "unity8-dash" ? 1 : 0
118− ApplicationManager.stopApplication(ApplicationManager.get(appIndex).appId);
126+ ApplicationManager.stopApplication(ApplicationManager.get(0).appId);
119 }
127 }
120− compare(ApplicationManager.count, 1)
128+ compare(ApplicationManager.count, 0)
121 }
129 }
122
130
123 function waitUntilAppSurfaceShowsUp(appId) {
131 function waitUntilAppSurfaceShowsUp(appId) {
@@ -210,5 +218,73 @@ Item {
210 tap(toAppDecoration);
218 tap(toAppDecoration);
211 tryCompare(ApplicationManager.findApplication(data.apps[data.focusTo]).session.surface, "activeFocus", true);
219 tryCompare(ApplicationManager.findApplication(data.apps[data.focusTo]).session.surface, "activeFocus", true);
212 }
220 }
221+
222+ function test_minimizeApplicationHidesSurface() {
223+ var dashApp = startApplication("unity8-dash");
224+
225+ var dashDelegate = findChild(desktopStage, "stageDelegate_unity8-dash");
226+ verify(dashDelegate);
227+
228+ findChild(dashDelegate, "decoratedWindow").minimize();
229+ tryCompare(dashApp.session.surface, "visible", false);
230+ }
231+
232+ function test_maximizeApplicationHidesSurfacesBehindIt() {
233+ var dashApp = startApplication("unity8-dash");
234+ var dialerApp = startApplication("dialer-app");
235+ var cameraApp = startApplication("camera-app");
236+
237+ var dashDelegate = findChild(desktopStage, "stageDelegate_unity8-dash");
238+ verify(dashDelegate);
239+ var dialerDelegate = findChild(desktopStage, "stageDelegate_dialer-app");
240+ verify(dialerDelegate);
241+ var cameraDelegate = findChild(desktopStage, "stageDelegate_camera-app");
242+ verify(cameraDelegate);
243+
244+ // maximize
245+ findChild(dialerDelegate, "decoratedWindow").maximize();
246+ tryCompare(dialerDelegate, "visuallyMaximized", true);
247+
248+ tryCompare(dashApp.session.surface, "visible", false);
249+ compare(cameraApp.session.surface.visible, true);
250+
251+ // restore
252+ findChild(dialerDelegate, "decoratedWindow").maximize();
253+ compare(dashApp.session.surface.visible, true);
254+ compare(cameraApp.session.surface.visible, true);
255+ }
256+
257+ function test_applicationsBecomeVisibleWhenOccludingAppRemoved() {
258+ var dashApp = startApplication("unity8-dash");
259+ var dashDelegate = findChild(desktopStage, "stageDelegate_unity8-dash");
260+ verify(dashDelegate);
261+
262+ var dialerApp = startApplication("dialer-app");
263+ var dialerDelegate = findChild(desktopStage, "stageDelegate_dialer-app");
264+ verify(dialerDelegate);
265+
266+ var cameraApp = startApplication("camera-app");
267+ var cameraDelegate = findChild(desktopStage, "stageDelegate_camera-app");
268+ verify(cameraDelegate);
269+ findChild(dialerDelegate, "decoratedWindow").maximize();
270+
271+ var galleryApp = startApplication("gallery-app");
272+ var galleryDelegate = findChild(desktopStage, "stageDelegate_gallery-app");
273+ verify(galleryDelegate);
274+ findChild(galleryDelegate, "decoratedWindow").maximize();
275+
276+ tryCompare(dialerDelegate, "visuallyMaximized", true);
277+ tryCompare(galleryDelegate, "visuallyMaximized", true);
278+
279+ tryCompare(dashApp.session.surface, "visible", false);
280+ tryCompare(dialerApp.session.surface, "visible", false);
281+ tryCompare(cameraApp.session.surface, "visible", false);
282+
283+ ApplicationManager.stopApplication("gallery-app");
284+
285+ compare(cameraApp.session.surface.visible, true);
286+ tryCompare(dialerApp.session.surface, "visible", true);
287+ tryCompare(dashApp.session.surface, "visible", false); // still occluded by maximised dialer
288+ }
213 }
289 }
214}
290}
tests/qmltests/Stages/tst_PhoneStage.qml+6−2
@@ -14,18 +14,21 @@
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.4
18import QtTest 1.0
18import QtTest 1.0
19import Unity.Test 0.1 as UT
19import Unity.Test 0.1 as UT
20import ".."
20import ".."
21+import "../../../qml/Components"
21import "../../../qml/Stages"
22import "../../../qml/Stages"
22−import Ubuntu.Components 0.1
23+import Ubuntu.Components 1.3
23import Unity.Application 0.1
24import Unity.Application 0.1
24
25
25Item {
26Item {
26 width: units.gu(70)
27 width: units.gu(70)
27 height: units.gu(70)
28 height: units.gu(70)
28
29
30+ property var greeter: { fullyShown: true }
31+
29 PhoneStage {
32 PhoneStage {
30 id: phoneStage
33 id: phoneStage
31 anchors { fill: parent; rightMargin: units.gu(30) }
34 anchors { fill: parent; rightMargin: units.gu(30) }
@@ -34,6 +37,7 @@ Item {
34 maximizedAppTopMargin: units.gu(3) + units.dp(2)
37 maximizedAppTopMargin: units.gu(3) + units.dp(2)
35 interactive: true
38 interactive: true
36 shellOrientation: Qt.PortraitOrientation
39 shellOrientation: Qt.PortraitOrientation
40+ orientations: Orientations {}
37 }
41 }
38
42
39 Binding {
43 Binding {
tests/qmltests/Stages/tst_SessionContainer.qml+2−2
@@ -14,11 +14,11 @@
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.1
17+import QtQuick 2.4
18import QtQuick.Layouts 1.1
18import QtQuick.Layouts 1.1
19import QtTest 1.0
19import QtTest 1.0
20import Unity.Test 0.1 as UT
20import Unity.Test 0.1 as UT
21−import Ubuntu.Components 0.1
21+import Ubuntu.Components 1.3
22import Unity.Application 0.1
22import Unity.Application 0.1
23import "../../../qml/Stages"
23import "../../../qml/Stages"
24
24
tests/qmltests/Stages/tst_Splash.qml+2−2
@@ -14,12 +14,12 @@
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.4
18import QtTest 1.0
18import QtTest 1.0
19import Unity.Test 0.1 as UT
19import Unity.Test 0.1 as UT
20import ".."
20import ".."
21import "../../../qml/Stages"
21import "../../../qml/Stages"
22−import Ubuntu.Components 0.1
22+import Ubuntu.Components 1.3
23import Unity.Application 0.1
23import Unity.Application 0.1
24
24
25Rectangle {
25Rectangle {
tests/qmltests/Stages/tst_SpreadDelegate.qml+3−3
@@ -14,14 +14,14 @@
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.4
18import QtTest 1.0
18import QtTest 1.0
19import Unity.Test 0.1 as UT
19import Unity.Test 0.1 as UT
20import ".."
20import ".."
21import "../../../qml/Components"
21import "../../../qml/Components"
22import "../../../qml/Stages"
22import "../../../qml/Stages"
23−import Ubuntu.Components 0.1
23+import Ubuntu.Components 1.3
24−import Ubuntu.Components.ListItems 1.0 as ListItem
24+import Ubuntu.Components.ListItems 1.3 as ListItem
25import Unity.Application 0.1
25import Unity.Application 0.1
26
26
27Rectangle {
27Rectangle {
tests/qmltests/Stages/tst_SurfaceContainer.qml+2−2
@@ -14,12 +14,12 @@
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.4
18import QtTest 1.0
18import QtTest 1.0
19import Unity.Test 0.1
19import Unity.Test 0.1
20import ".."
20import ".."
21import "../../../qml/Stages"
21import "../../../qml/Stages"
22−import Ubuntu.Components 0.1
22+import Ubuntu.Components 1.3
23import Unity.Application 0.1
23import Unity.Application 0.1
24
24
25Rectangle {
25Rectangle {
tests/qmltests/Stages/tst_TabletStage.qml+9−4
@@ -14,10 +14,10 @@
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.4
18import QtTest 1.0
18import QtTest 1.0
19−import Ubuntu.Components 1.1
19+import Ubuntu.Components 1.3
20−import Ubuntu.Components.ListItems 1.0 as ListItem
20+import Ubuntu.Components.ListItems 1.3 as ListItem
21import Unity.Application 0.1
21import Unity.Application 0.1
22import Unity.Test 0.1
22import Unity.Test 0.1
23
23
@@ -30,6 +30,8 @@ Rectangle {
30 width: tabletStageLoader.width + controls.width
30 width: tabletStageLoader.width + controls.width
31 height: tabletStageLoader.height
31 height: tabletStageLoader.height
32
32
33+ property var greeter: { fullyShown: true }
34+
33 Loader {
35 Loader {
34 id: tabletStageLoader
36 id: tabletStageLoader
35
37
@@ -53,7 +55,10 @@ Rectangle {
53 shellOrientation: Qt.LandscapeOrientation
55 shellOrientation: Qt.LandscapeOrientation
54 nativeWidth: width
56 nativeWidth: width
55 nativeHeight: height
57 nativeHeight: height
56− orientations: Orientations{} // Defaults are fine for testing
58+ orientations: Orientations {
59+ native_: Qt.LandscapeOrientation
60+ primary: Qt.LandscapeOrientation
61+ }
57 focus: true
62 focus: true
58 }
63 }
59 }
64 }
tests/qmltests/Stages/tst_WindowResizeArea.qml+3−3
@@ -14,14 +14,14 @@
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.1
17+import QtQuick 2.4
18import QtQuick.Layouts 1.1
18import QtQuick.Layouts 1.1
19import QtTest 1.0
19import QtTest 1.0
20import Unity.Test 0.1
20import Unity.Test 0.1
21import ".."
21import ".."
22import "../../../qml/Stages"
22import "../../../qml/Stages"
23−import Ubuntu.Components 0.1
23+import Ubuntu.Components 1.3
24−import Ubuntu.Components.ListItems 1.0 as ListItem
24+import Ubuntu.Components.ListItems 1.3 as ListItem
25import Unity.Application 0.1
25import Unity.Application 0.1
26
26
27Item {
27Item {
tests/qmltests/Tutorial/tst_Tutorial.qml+2−2
@@ -14,11 +14,11 @@
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.4
18import QtTest 1.0
18import QtTest 1.0
19import AccountsService 0.1
19import AccountsService 0.1
20import IntegratedLightDM 0.1 as LightDM
20import IntegratedLightDM 0.1 as LightDM
21−import Ubuntu.Components 1.1
21+import Ubuntu.Components 1.3
22import Unity.Application 0.1
22import Unity.Application 0.1
23import Unity.Test 0.1 as UT
23import Unity.Test 0.1 as UT
24
24
tests/qmltests/Wizard/tst_Wizard.qml+3−3
@@ -14,12 +14,12 @@
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.3
17+import QtQuick 2.4
18import QtTest 1.0
18import QtTest 1.0
19import AccountsService 0.1
19import AccountsService 0.1
20import MeeGo.QOfono 0.2
20import MeeGo.QOfono 0.2
21import QMenuModel 0.1
21import QMenuModel 0.1
22−import Ubuntu.Components 1.1
22+import Ubuntu.Components 1.3
23import Ubuntu.SystemSettings.SecurityPrivacy 1.0
23import Ubuntu.SystemSettings.SecurityPrivacy 1.0
24import Unity.Test 0.1 as UT
24import Unity.Test 0.1 as UT
25import Wizard 0.1
25import Wizard 0.1
@@ -96,7 +96,7 @@ Item {
96 }
96 }
97
97
98 Component.onCompleted: {
98 Component.onCompleted: {
99− Theme.name = "Ubuntu.Components.Themes.SuruGradient";
99+ theme.name = "Ubuntu.Components.Themes.SuruGradient";
100 setup();
100 setup();
101 }
101 }
102
102
tests/qmltests/tst_OrientedShell.qml+3−3
@@ -14,11 +14,11 @@
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.4
18import QtQuick.Layouts 1.1
18import QtQuick.Layouts 1.1
19import QtTest 1.0
19import QtTest 1.0
20−import Ubuntu.Components 1.1
20+import Ubuntu.Components 1.3
21−import Ubuntu.Components.ListItems 1.0 as ListItem
21+import Ubuntu.Components.ListItems 1.3 as ListItem
22import Unity.Application 0.1
22import Unity.Application 0.1
23import Unity.Test 0.1
23import Unity.Test 0.1
24import IntegratedLightDM 0.1 as LightDM
24import IntegratedLightDM 0.1 as LightDM
tests/qmltests/tst_Shell.qml+33−7
@@ -14,13 +14,13 @@
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.4
18import QtTest 1.0
18import QtTest 1.0
19import AccountsService 0.1
19import AccountsService 0.1
20import GSettings 1.0
20import GSettings 1.0
21import IntegratedLightDM 0.1 as LightDM
21import IntegratedLightDM 0.1 as LightDM
22−import Ubuntu.Components 1.1
22+import Ubuntu.Components 1.3
23−import Ubuntu.Components.ListItems 1.0 as ListItem
23+import Ubuntu.Components.ListItems 1.3 as ListItem
24import Ubuntu.Telephony 0.1 as Telephony
24import Ubuntu.Telephony 0.1 as Telephony
25import Unity.Application 0.1
25import Unity.Application 0.1
26import Unity.Connectivity 0.1
26import Unity.Connectivity 0.1
@@ -61,6 +61,10 @@ Rectangle {
61
61
62 anchors.centerIn: parent
62 anchors.centerIn: parent
63
63
64+ property int shellOrientation: Qt.PortraitOrientation
65+ property int nativeOrientation: Qt.PortraitOrientation
66+ property int primaryOrientation: Qt.PortraitOrientation
67+
64 state: "phone"
68 state: "phone"
65 states: [
69 states: [
66 State {
70 State {
@@ -77,6 +81,9 @@ Rectangle {
77 target: shellLoader
81 target: shellLoader
78 width: units.gu(100)
82 width: units.gu(100)
79 height: units.gu(71)
83 height: units.gu(71)
84+ shellOrientation: Qt.LandscapeOrientation
85+ nativeOrientation: Qt.LandscapeOrientation
86+ primaryOrientation: Qt.LandscapeOrientation
80 }
87 }
81 },
88 },
82 State {
89 State {
@@ -99,8 +106,13 @@ Rectangle {
99 Shell {
106 Shell {
100 id: __shell
107 id: __shell
101 usageScenario: usageScenarioSelector.model[usageScenarioSelector.selectedIndex]
108 usageScenario: usageScenarioSelector.model[usageScenarioSelector.selectedIndex]
102− orientation: Qt.PortraitOrientation
109+ nativeWidth: width
110+ nativeHeight: height
111+ orientation: shellLoader.shellOrientation
103− orientations: Orientations{} // Defaults are fine for testing
112+ orientations: Orientations {
113+ native_: shellLoader.nativeOrientation
114+ primary: shellLoader.primaryOrientation
115+ }
104 Component.onDestruction: {
116 Component.onDestruction: {
105 shellLoader.itemDestroyed = true;
117 shellLoader.itemDestroyed = true;
106 }
118 }
@@ -1722,11 +1734,9 @@ Rectangle {
1722 var appDelegate = appRepeater.itemAt(0);
1734 var appDelegate = appRepeater.itemAt(0);
1723 var maximizeButton = findChild(appDelegate, "maximizeWindowButton");
1735 var maximizeButton = findChild(appDelegate, "maximizeWindowButton");
1724
1736
1725− wait(5000)
1726 tryCompare(appDelegate, "state", "normal");
1737 tryCompare(appDelegate, "state", "normal");
1727 tryCompare(PanelState, "buttonsVisible", false)
1738 tryCompare(PanelState, "buttonsVisible", false)
1728
1739
1729− wait(5000)
1730 mouseClick(maximizeButton, maximizeButton.width / 2, maximizeButton.height / 2);
1740 mouseClick(maximizeButton, maximizeButton.width / 2, maximizeButton.height / 2);
1731 tryCompare(appDelegate, "state", "maximized");
1741 tryCompare(appDelegate, "state", "maximized");
1732 tryCompare(PanelState, "buttonsVisible", true)
1742 tryCompare(PanelState, "buttonsVisible", true)
@@ -1738,6 +1748,22 @@ Rectangle {
1738 tryCompare(PanelState, "buttonsVisible", true)
1748 tryCompare(PanelState, "buttonsVisible", true)
1739 }
1749 }
1740
1750
1751+ function test_newAppHasValidGeometry() {
1752+ loadDesktopShellWithApps();
1753+ var appRepeater = findChild(shell, "appRepeater");
1754+ var appId = ApplicationManager.get(0).appId;
1755+ var appDelegate = appRepeater.itemAt(0);
1756+
1757+ var resizeArea = findChild(appDelegate, "windowResizeArea");
1758+ var priv = findInvisibleChild(resizeArea, "priv");
1759+
1760+ // Make sure windows are at 0,0 or greater and they have a size that's > 0
1761+ compare(priv.normalX >= 0, true)
1762+ compare(priv.normalY >= 0, true)
1763+ compare(priv.normalWidth > 0, true)
1764+ compare(priv.normalHeight > 0, true)
1765+ }
1766+
1741 // bug http://pad.lv/1431566
1767 // bug http://pad.lv/1431566
1742 function test_switchToStagedHidesPanelButtons() {
1768 function test_switchToStagedHidesPanelButtons() {
1743 loadDesktopShellWithApps();
1769 loadDesktopShellWithApps();
tests/qmltests/tst_ShellWithPin.qml+2−2
@@ -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.4
18−import Ubuntu.Components 1.0
18+import Ubuntu.Components 1.3
19import QtTest 1.0
19import QtTest 1.0
20import AccountsService 0.1
20import AccountsService 0.1
21import GSettings 1.0
21import GSettings 1.0
tests/qmltests/utils/Unity/Test/MockObjectForInstanceOfTest.qml+1−1
@@ -14,7 +14,7 @@
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.4
18
18
19Rectangle {
19Rectangle {
20 property int dummy
20 property int dummy
tests/qmltests/utils/Unity/Test/MockObjectForInstanceOfTestChild.qml+1−1
@@ -14,7 +14,7 @@
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.4
18
18
19MockObjectForInstanceOfTest {
19MockObjectForInstanceOfTest {
20 property int dummy2
20 property int dummy2
tests/qmltests/utils/Unity/Test/tst_UnityTest.qml+1−1
@@ -15,7 +15,7 @@
15 */
15 */
16
16
17
17
18−import QtQuick 2.0
18+import QtQuick 2.4
19import QtTest 1.0
19import QtTest 1.0
20import Unity.Test 0.1
20import Unity.Test 0.1
21
21
tests/utils/modules/Unity/Test/MouseTouchEmulationCheckbox.qml+2−2
@@ -14,9 +14,9 @@
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.4
18import QtQuick.Layouts 1.1
18import QtQuick.Layouts 1.1
19−import Ubuntu.Components 1.1
19+import Ubuntu.Components 1.3
20import Unity.Test 0.1
20import Unity.Test 0.1
21
21
22RowLayout {
22RowLayout {
tests/utils/modules/Unity/Test/TouchEventSequenceWrapper.cpp−2
@@ -27,12 +27,10 @@ TouchEventSequenceWrapper::TouchEventSequenceWrapper(QTest::QTouchEventSequence
27void TouchEventSequenceWrapper::commit(bool processEvents)
27void TouchEventSequenceWrapper::commit(bool processEvents)
28{
28{
29 m_eventSequence.commit(processEvents);
29 m_eventSequence.commit(processEvents);
30−#if (QT_VERSION >= QT_VERSION_CHECK(5, 4, 0))
31 if (m_item->window()) {
30 if (m_item->window()) {
32 QQuickWindowPrivate *wp = QQuickWindowPrivate::get(m_item->window());
31 QQuickWindowPrivate *wp = QQuickWindowPrivate::get(m_item->window());
33 wp->flushDelayedTouchEvent();
32 wp->flushDelayedTouchEvent();
34 }
33 }
35−#endif
36}
34}
37
35
38void TouchEventSequenceWrapper::move(int touchId, int x, int y)
36void TouchEventSequenceWrapper::move(int touchId, int x, int y)
tests/utils/modules/Unity/Test/UnityTestCase.qml+2−2
@@ -14,9 +14,9 @@
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.4
18import QtTest 1.0
18import QtTest 1.0
19−import Ubuntu.Components 0.1
19+import Ubuntu.Components 1.3
20import Unity.Test 0.1 as UT
20import Unity.Test 0.1 as UT
21
21
22TestCase {
22TestCase {