Merge lp:~unity-team/unity8/rtm-20150113 into lp:unity8/rtm-14.09

Proposed by Michał Sawicz
Status: Merged
Approved by: Michael Zanetti
Approved revision: 1425
Merged at revision: 1413
Proposed branch: lp:~unity-team/unity8/rtm-20150113
Merge into: lp:unity8/rtm-14.09
Prerequisite: lp:~unity-team/unity8/rtm-20150108
Diff against target: 298 lines (+63/-55)
7 files modified
debian/changelog (+16/-2)
qml/Dash/Dash.qml (+1/-2)
qml/Stages/PhoneStage.qml (+17/-33)
qml/Stages/TabletStage.qml (+5/-14)
tests/autopilot/unity8/application_lifecycle/tests/test_application_lifecycle.py (+1/-1)
tests/qmltests/Dash/tst_Dash.qml (+17/-0)
tests/qmltests/Stages/tst_PhoneStage.qml (+6/-3)
To merge this branch: bzr merge lp:~unity-team/unity8/rtm-20150113
Reviewer Review Type Date Requested Status
Michael Zanetti (community) Approve
Review via email: mp+246347@code.launchpad.net
To post a comment you must log in.
lp:~unity-team/unity8/rtm-20150113 updated
1424. By Michał Sawicz

Revert r1419, it's not ready yet.

1425. By Michał Sawicz

Merge prerequisite

Revision history for this message
Michael Zanetti (mzanetti) wrote :

as per original merges

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2015-01-14 10:25:02 +0000
3+++ debian/changelog 2015-01-14 10:25:03 +0000
4@@ -1,4 +1,18 @@
5-unity8 (8.02+15.04.20150108~rtm--0ubuntu1) UNRELEASED; urgency=medium
6+unity8 (8.02+15.04.20150113.1~rtm-0ubuntu1) UNRELEASED; urgency=medium
7+
8+ [ Albert Astals ]
9+ * Fix going to scopes when the Manage Dash is open (LP: #1403464)
10+
11+ [ Josh Arenson ]
12+ * Create a PhysicalKeyMapper to handle all physical/hardware keys (LP:
13+ #1390393)
14+
15+ [ Michael Zanetti ]
16+ * make spread reversible (LP: #1368668, #1355284, #1368677)
17+
18+ -- Michał Sawicz <michal.sawicz@canonical.com> Tue, 13 Jan 2015 20:23:42 +0100
19+
20+unity8 (8.02+15.04.20150113~rtm-0ubuntu1) 14.09; urgency=medium
21
22 [ Albert Astals ]
23 * Use QImageReader not to load the image into memory twice
24@@ -14,7 +28,7 @@
25 * Don't block handling power events on loading the greeter's qml and the
26 background image. (LP: #1383277)
27
28- -- Michał Sawicz <michal.sawicz@canonical.com> Thu, 08 Jan 2015 14:02:47 +0100
29+ -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Tue, 13 Jan 2015 15:18:13 +0000
30
31 unity8 (8.02+15.04.20150107~rtm-0ubuntu1) 14.09; urgency=low
32
33
34=== modified file 'qml/Dash/Dash.qml'
35--- qml/Dash/Dash.qml 2014-12-15 23:03:04 +0000
36+++ qml/Dash/Dash.qml 2015-01-14 10:25:03 +0000
37@@ -36,9 +36,8 @@
38 dashContent.setCurrentScopeAtIndex(index, animate, isSwipe)
39 // Close dash overview and nested temp scopes in it
40 if (bottomEdgeController.progress != 0) {
41- bottomEdgeController.enableAnimation = window.active && !scopesOverview.showingNonFavoriteScope;
42+ bottomEdgeController.enableAnimation = window.active;
43 bottomEdgeController.progress = 0;
44- scopesOverview.closeTempScope();
45 }
46 // Close normal temp scopes (e.g. App Store)
47 if (scopeItem.scope) {
48
49=== modified file 'qml/Stages/PhoneStage.qml'
50--- qml/Stages/PhoneStage.qml 2014-10-30 21:42:32 +0000
51+++ qml/Stages/PhoneStage.qml 2015-01-14 10:25:03 +0000
52@@ -145,16 +145,16 @@
53
54 // Those markers mark the various positions in the spread (ratio to screen width from right to left):
55 // 0 - 1: following finger, snap back to the beginning on release
56- property real positionMarker1: 0.3
57+ property real positionMarker1: 0.2
58 // 1 - 2: curved snapping movement, snap to app 1 on release
59- property real positionMarker2: 0.45
60+ property real positionMarker2: 0.3
61 // 2 - 3: movement follows finger, snaps back to app 1 on release
62- property real positionMarker3: 0.6
63+ property real positionMarker3: 0.35
64 // passing 3, we detach movement from the finger and snap to 4
65 property real positionMarker4: 0.9
66
67 // This is where the first app snaps to when bringing it in from the right edge.
68- property real snapPosition: 0.75
69+ property real snapPosition: 0.7
70
71 // Phase of the animation:
72 // 0: Starting from right edge, a new app (index 1) comes in from the right
73@@ -178,7 +178,7 @@
74 case 1:
75 if (shiftedContentX < width * positionMarker2) {
76 phase = 0;
77- } else if (shiftedContentX >= width * positionMarker4) {
78+ } else if (shiftedContentX >= width * positionMarker4 && !spreadDragArea.dragging) {
79 phase = 2;
80 }
81 break;
82@@ -270,6 +270,7 @@
83
84 Repeater {
85 id: spreadRepeater
86+ objectName: "spreadRepeater"
87 model: ApplicationManager
88 delegate: TransformedSpreadDelegate {
89 id: appDelegate
90@@ -367,8 +368,9 @@
91 if (spreadView.phase == 0 && index < 2) {
92 if (progress < spreadView.positionMarker1) {
93 return progress;
94- } else if (progress < spreadView.positionMarker1 + snappingCurve.period){
95- return spreadView.positionMarker1 + snappingCurve.value * 3;
96+ } else if (progress < spreadView.positionMarker1 + 0.05){
97+ // p : 0.05 = x : pm2
98+ return spreadView.positionMarker1 + (progress - spreadView.positionMarker1) * (spreadView.positionMarker2 - spreadView.positionMarker1) / 0.05
99 } else {
100 return spreadView.positionMarker2;
101 }
102@@ -380,13 +382,6 @@
103 visible: (progress >= 0 && progress < 1.7) ||
104 (isDash && priv.focusedAppDelegate.x !== 0)
105
106- EasingCurve {
107- id: snappingCurve
108- type: EasingCurve.Linear
109- period: 0.05
110- progress: appDelegate.progress - spreadView.positionMarker1
111- }
112-
113 Binding {
114 target: appDelegate
115 property: "orientation"
116@@ -425,16 +420,11 @@
117 id: spreadDragArea
118 objectName: "spreadDragArea"
119 direction: Direction.Leftwards
120- enabled: spreadView.phase != 2 && root.spreadEnabled
121+ enabled: (spreadView.phase != 2 && root.spreadEnabled) || dragging
122
123 anchors { top: parent.top; right: parent.right; bottom: parent.bottom }
124 width: root.dragAreaWidth
125
126- // Sitting at the right edge of the screen, this EdgeDragArea directly controls the spreadView when
127- // attachedToView is true. When the finger movement passes positionMarker3 we detach it from the
128- // spreadView and make the spreadView snap to positionMarker4.
129- property bool attachedToView: true
130-
131 property var gesturePoints: new Array()
132
133 onTouchXChanged: {
134@@ -443,15 +433,13 @@
135 spreadView.phase = 0;
136 spreadView.contentX = -spreadView.shift;
137 }
138- if (dragging && status == DirectionalDragArea.Recognized && attachedToView) {
139+ if (dragging && status == DirectionalDragArea.Recognized) {
140 // Gesture recognized. Let's move the spreadView with the finger
141- var finalX = Math.min(touchX + width, width);
142- spreadView.contentX = -finalX + spreadDragArea.width - spreadView.shift;
143- }
144- if (attachedToView && spreadView.shiftedContentX >= spreadView.width * spreadView.positionMarker3) {
145- // We passed positionMarker3. Detach from spreadView and snap it.
146- attachedToView = false;
147- spreadView.snap();
148+ var dragX = Math.min(touchX + width, width); // Prevent dragging rightwards
149+ dragX = -dragX + spreadDragArea.width - spreadView.shift;
150+ // Don't allow dragging further than the animation crossing with phase2's animation
151+ var maxMovement = spreadView.width * spreadView.positionMarker4 - spreadView.shift;
152+ spreadView.contentX = Math.min(dragX, maxMovement);
153 }
154 gesturePoints.push(touchX);
155 }
156@@ -462,10 +450,6 @@
157 onStatusChanged: {
158 previousStatus = currentStatus;
159 currentStatus = status;
160-
161- if (status == DirectionalDragArea.Recognized) {
162- attachedToView = true;
163- }
164 }
165
166 onDraggingChanged: {
167@@ -493,7 +477,7 @@
168 // If it was a short one-way movement, do the Alt+Tab switch
169 // no matter if we didn't cross positionMarker1 yet.
170 spreadView.snapTo(1);
171- } else if (!dragging && attachedToView) {
172+ } else if (!dragging) {
173 // otherwise snap to the closest snap position we can find
174 // (might be back to start, to app 1 or to spread)
175 spreadView.snap();
176
177=== modified file 'qml/Stages/TabletStage.qml'
178--- qml/Stages/TabletStage.qml 2014-10-30 21:42:32 +0000
179+++ qml/Stages/TabletStage.qml 2015-01-14 10:25:03 +0000
180@@ -590,7 +590,6 @@
181 width: root.dragAreaWidth
182 direction: Direction.Leftwards
183
184- property bool attachedToView: false
185 property var gesturePoints: new Array()
186
187 onTouchXChanged: {
188@@ -599,22 +598,14 @@
189 spreadView.contentX = -spreadView.shift;
190 }
191
192- if (dragging && attachedToView) {
193- spreadView.contentX = -touchX + spreadDragArea.width - spreadView.shift;
194- if (spreadView.shiftedContentX > spreadView.phase0Width + spreadView.phase1Width / 2) {
195- attachedToView = false;
196- spreadView.snap();
197- }
198+ if (dragging) {
199+ var dragX = -touchX + spreadDragArea.width - spreadView.shift;
200+ var maxDrag = spreadView.width * spreadView.positionMarker4 - spreadView.shift;
201+ spreadView.contentX = Math.min(dragX, maxDrag);
202 }
203 gesturePoints.push(touchX);
204 }
205
206- onStatusChanged: {
207- if (status == DirectionalDragArea.Recognized) {
208- attachedToView = true;
209- }
210- }
211-
212 onDraggingChanged: {
213 if (dragging) {
214 // Gesture recognized. Start recording this gesture
215@@ -630,7 +621,7 @@
216 // If it was a short one-way movement, do the Alt+Tab switch
217 // no matter if we didn't cross positionMarker1 yet.
218 spreadView.snapTo(spreadView.nextInStack);
219- } else if (!dragging && attachedToView) {
220+ } else if (!dragging) {
221 if (spreadView.shiftedContentX < spreadView.width * spreadView.positionMarker1) {
222 spreadView.snap();
223 } else if (spreadView.shiftedContentX < spreadView.width * spreadView.positionMarker2) {
224
225=== modified file 'tests/autopilot/unity8/application_lifecycle/tests/test_application_lifecycle.py'
226--- tests/autopilot/unity8/application_lifecycle/tests/test_application_lifecycle.py 2014-09-08 10:33:50 +0000
227+++ tests/autopilot/unity8/application_lifecycle/tests/test_application_lifecycle.py 2015-01-14 10:25:03 +0000
228@@ -47,7 +47,7 @@
229 height = self.main_window.height
230 start_x = width
231 start_y = int(height/2)
232- end_x = int(width/2)
233+ end_x = int(width*3/4)
234 end_y = start_y
235
236 logger.info("Swiping screen from the right edge")
237
238=== modified file 'tests/qmltests/Dash/tst_Dash.qml'
239--- tests/qmltests/Dash/tst_Dash.qml 2014-12-15 23:03:04 +0000
240+++ tests/qmltests/Dash/tst_Dash.qml 2015-01-14 10:25:03 +0000
241@@ -411,5 +411,22 @@
242 tryCompare(dashContentList, "currentIndex", 2);
243 compare(dashContentList.currentItem.scopeId, "MockScope5");
244 }
245+
246+ function test_manage_dash_close_dashCommunicator() {
247+ var dashContentList = findChild(dash, "dashContentList");
248+ compare(dashContentList.currentIndex, 0);
249+ compare(dashContentList.currentItem.scopeId, "MockScope1");
250+
251+ // Show the manage dash
252+ touchFlick(dash, dash.width / 2, dash.height - 1, dash.width / 2, units.gu(2));
253+ var bottomEdgeController = findInvisibleChild(dash, "bottomEdgeController");
254+ tryCompare(bottomEdgeController, "progress", 1);
255+
256+ var dashCommunicatorService = findInvisibleChild(dash, "dashCommunicatorService");
257+ dashCommunicatorService.mockSetCurrentScope(1, true, false);
258+
259+ tryCompare(bottomEdgeController, "progress", 0);
260+ tryCompare(dashContentList, "currentIndex", 1)
261+ }
262 }
263 }
264
265=== modified file 'tests/qmltests/Stages/tst_PhoneStage.qml'
266--- tests/qmltests/Stages/tst_PhoneStage.qml 2014-10-30 21:41:56 +0000
267+++ tests/qmltests/Stages/tst_PhoneStage.qml 2015-01-14 10:25:03 +0000
268@@ -128,17 +128,20 @@
269 var startX = phoneStage.width - 2;
270 var startY = phoneStage.height / 2;
271 var endY = startY;
272- var endX = units.gu(2);
273+ var endX = phoneStage.width / 2;
274
275 touchFlick(phoneStage, startX, startY, endX, endY,
276 true /* beginTouch */, true /* endTouch */, units.gu(10), 50);
277+
278+ tryCompare(spreadView, "phase", 2);
279+ waitForRendering(phoneStage);
280 }
281
282 function test_shortFlick() {
283 addApps(2)
284 var startX = phoneStage.width - units.gu(1);
285 var startY = phoneStage.height / 2;
286- var endX = phoneStage.width / 2;
287+ var endX = startX - units.gu(4);
288 var endY = startY;
289
290 var activeApp = ApplicationManager.get(0);
291@@ -164,7 +167,7 @@
292 {tag: "<position2 (non-linear)", positionMarker: "positionMarker2", linear: false, offset: -1, endPhase: 0, targetPhase: 0, newFocusedIndex: 1 },
293 {tag: ">position2", positionMarker: "positionMarker2", linear: true, offset: +1, endPhase: 1, targetPhase: 0, newFocusedIndex: 1 },
294 {tag: "<position3", positionMarker: "positionMarker3", linear: true, offset: -1, endPhase: 1, targetPhase: 0, newFocusedIndex: 1 },
295- {tag: ">position3", positionMarker: "positionMarker3", linear: true, offset: +1, endPhase: 2, targetPhase: 2, newFocusedIndex: 2 },
296+ {tag: ">position3", positionMarker: "positionMarker3", linear: true, offset: +1, endPhase: 1, targetPhase: 2, newFocusedIndex: 2 },
297 ];
298 }
299

Subscribers

People subscribed via source and target branches

to all changes: