Merge lp:~mterry/unity8/lockscreen-nits into lp:unity8/rtm-14.09
- lockscreen-nits
- Merge into rtm-14.09
Proposed by
Michał Sawicz
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Michał Sawicz | ||||
Approved revision: | 1010 | ||||
Merged at revision: | 1141 | ||||
Proposed branch: | lp:~mterry/unity8/lockscreen-nits | ||||
Merge into: | lp:unity8/rtm-14.09 | ||||
Diff against target: |
483 lines (+82/-125) 5 files modified
qml/Greeter/Greeter.qml (+9/-9) qml/Greeter/Infographics.qml (+52/-108) qml/Shell.qml (+6/-3) tests/autopilot/unity8/shell/emulators/greeter.py (+2/-1) tests/qmltests/tst_ShellWithPin.qml (+13/-4) |
||||
To merge this branch: | bzr merge lp:~mterry/unity8/lockscreen-nits | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Unity Team | Pending | ||
Review via email: mp+230463@code.launchpad.net |
Commit message
trunk/r1143: Fix a variety of design nits with the current lockscreen
Description of the change
To post a comment you must log in.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'qml/Greeter/Greeter.qml' | |||
2 | --- qml/Greeter/Greeter.qml 2014-08-06 14:33:50 +0000 | |||
3 | +++ qml/Greeter/Greeter.qml 2014-08-12 11:40:17 +0000 | |||
4 | @@ -26,11 +26,12 @@ | |||
5 | 26 | created: greeterContentLoader.status == Loader.Ready && greeterContentLoader.item.ready | 26 | created: greeterContentLoader.status == Loader.Ready && greeterContentLoader.item.ready |
6 | 27 | 27 | ||
7 | 28 | property url defaultBackground | 28 | property url defaultBackground |
8 | 29 | property bool loadContent: required | ||
9 | 29 | 30 | ||
10 | 30 | // 1 when fully shown and 0 when fully hidden | 31 | // 1 when fully shown and 0 when fully hidden |
11 | 31 | property real showProgress: MathUtils.clamp((width - Math.abs(x)) / width, 0, 1) | 32 | property real showProgress: MathUtils.clamp((width - Math.abs(x)) / width, 0, 1) |
12 | 32 | 33 | ||
14 | 33 | showAnimation: StandardAnimation { property: "x"; to: 0 } | 34 | showAnimation: StandardAnimation { property: "x"; to: 0; duration: UbuntuAnimation.FastDuration } |
15 | 34 | hideAnimation: __leftHideAnimation | 35 | hideAnimation: __leftHideAnimation |
16 | 35 | 36 | ||
17 | 36 | property alias dragHandleWidth: dragHandle.width | 37 | property alias dragHandleWidth: dragHandle.width |
18 | @@ -58,10 +59,8 @@ | |||
19 | 58 | 59 | ||
20 | 59 | onRequiredChanged: { | 60 | onRequiredChanged: { |
21 | 60 | // Reset hide animation to default once we're finished with it | 61 | // Reset hide animation to default once we're finished with it |
26 | 61 | if (!required) { | 62 | if (required) { |
27 | 62 | // Put back on left for reliable show direction and so that | 63 | // Reset hide animation so that a hide() call is reliably left |
24 | 63 | // if normal hide() is called, we don't animate from right. | ||
25 | 64 | x = -width | ||
28 | 65 | hideAnimation = __leftHideAnimation | 64 | hideAnimation = __leftHideAnimation |
29 | 66 | } | 65 | } |
30 | 67 | } | 66 | } |
31 | @@ -90,12 +89,13 @@ | |||
32 | 90 | onPressAndHold: {} // eat event, but no need to tease, as drag will cover it | 89 | onPressAndHold: {} // eat event, but no need to tease, as drag will cover it |
33 | 91 | 90 | ||
34 | 92 | onDragEnd: { | 91 | onDragEnd: { |
36 | 93 | if (rightEvaluator.shouldAutoComplete()) | 92 | if (greeter.x > 0 && rightEvaluator.shouldAutoComplete()) { |
37 | 94 | greeter.hideRight() | 93 | greeter.hideRight() |
39 | 95 | else if (leftEvaluator.shouldAutoComplete()) | 94 | } else if (greeter.x < 0 && leftEvaluator.shouldAutoComplete()) { |
40 | 96 | greeter.hide(); | 95 | greeter.hide(); |
42 | 97 | else | 96 | } else { |
43 | 98 | greeter.show(); // undo drag | 97 | greeter.show(); // undo drag |
44 | 98 | } | ||
45 | 99 | } | 99 | } |
46 | 100 | 100 | ||
47 | 101 | onDragValueChanged: { | 101 | onDragValueChanged: { |
48 | @@ -127,7 +127,7 @@ | |||
49 | 127 | property var infographicModel: LightDM.Infographic | 127 | property var infographicModel: LightDM.Infographic |
50 | 128 | readonly property int backgroundTopMargin: -greeter.y | 128 | readonly property int backgroundTopMargin: -greeter.y |
51 | 129 | 129 | ||
53 | 130 | source: required ? "GreeterContent.qml" : "" | 130 | source: loadContent ? "GreeterContent.qml" : "" |
54 | 131 | 131 | ||
55 | 132 | onLoaded: { | 132 | onLoaded: { |
56 | 133 | selected(currentIndex); | 133 | selected(currentIndex); |
57 | 134 | 134 | ||
58 | === modified file 'qml/Greeter/Infographics.qml' | |||
59 | --- qml/Greeter/Infographics.qml 2014-06-11 15:36:51 +0000 | |||
60 | +++ qml/Greeter/Infographics.qml 2014-08-12 11:40:17 +0000 | |||
61 | @@ -26,6 +26,9 @@ | |||
62 | 26 | 26 | ||
63 | 27 | property int animDuration: 10 | 27 | property int animDuration: 10 |
64 | 28 | 28 | ||
65 | 29 | property bool __useDotAnimation: true | ||
66 | 30 | property int __circleModifier: __useDotAnimation ? 1 : 2 | ||
67 | 31 | |||
68 | 29 | Connections { | 32 | Connections { |
69 | 30 | target: model | 33 | target: model |
70 | 31 | 34 | ||
71 | @@ -41,19 +44,24 @@ | |||
72 | 41 | 44 | ||
73 | 42 | function startShowAnimation() { | 45 | function startShowAnimation() { |
74 | 43 | dotHideAnimTimer.stop() | 46 | dotHideAnimTimer.stop() |
75 | 44 | circleShrinkAnimTimer.stop() | ||
76 | 45 | notification.hideAnim.stop() | 47 | notification.hideAnim.stop() |
77 | 46 | 48 | ||
79 | 47 | dotShowAnimTimer.startFromBeginning() | 49 | if (__useDotAnimation) { |
80 | 50 | dotShowAnimTimer.startFromBeginning() | ||
81 | 51 | } | ||
82 | 48 | notification.showAnim.start() | 52 | notification.showAnim.start() |
83 | 49 | } | 53 | } |
84 | 50 | 54 | ||
85 | 51 | function startHideAnimation() { | 55 | function startHideAnimation() { |
86 | 52 | dotShowAnimTimer.stop() | 56 | dotShowAnimTimer.stop() |
88 | 53 | circleGrowAnimTimer.stop() | 57 | circleChangeAnimTimer.stop() |
89 | 54 | notification.showAnim.stop() | 58 | notification.showAnim.stop() |
90 | 55 | 59 | ||
92 | 56 | dotHideAnimTimer.startFromBeginning() | 60 | if (__useDotAnimation) { |
93 | 61 | dotHideAnimTimer.startFromBeginning() | ||
94 | 62 | } else { | ||
95 | 63 | circleChangeAnimTimer.startFromBeginning() | ||
96 | 64 | } | ||
97 | 57 | notification.hideAnim.start() | 65 | notification.hideAnim.start() |
98 | 58 | } | 66 | } |
99 | 59 | 67 | ||
100 | @@ -73,22 +81,22 @@ | |||
101 | 73 | anchors.centerIn: parent | 81 | anchors.centerIn: parent |
102 | 74 | 82 | ||
103 | 75 | Timer { | 83 | Timer { |
105 | 76 | id: circleGrowAnimTimer | 84 | id: circleChangeAnimTimer |
106 | 77 | 85 | ||
107 | 78 | property int pastCircleCounter | 86 | property int pastCircleCounter |
108 | 79 | property int presentCircleCounter | 87 | property int presentCircleCounter |
109 | 80 | 88 | ||
111 | 81 | interval: animDuration | 89 | interval: notification.duration |
112 | 82 | running: false | 90 | running: false |
113 | 83 | repeat: true | 91 | repeat: true |
114 | 84 | onTriggered: { | 92 | onTriggered: { |
115 | 85 | if (pastCircleCounter < pastCircles.count) { | 93 | if (pastCircleCounter < pastCircles.count) { |
116 | 86 | var nextCircle = pastCircles.itemAt(pastCircleCounter++) | 94 | var nextCircle = pastCircles.itemAt(pastCircleCounter++) |
118 | 87 | if (nextCircle !== null) nextCircle.pastCircleGrowAnim.start() | 95 | if (nextCircle !== null) nextCircle.pastCircleChangeAnim.start() |
119 | 88 | } | 96 | } |
120 | 89 | if (pastCircleCounter > pastCircles.count / 2) { | 97 | if (pastCircleCounter > pastCircles.count / 2) { |
121 | 90 | var nextCircle = presentCircles.itemAt(presentCircleCounter++) | 98 | var nextCircle = presentCircles.itemAt(presentCircleCounter++) |
123 | 91 | if (nextCircle !== null) nextCircle.presentCircleGrowAnim.start() | 99 | if (nextCircle !== null) nextCircle.presentCircleChangeAnim.start() |
124 | 92 | } | 100 | } |
125 | 93 | if (presentCircleCounter > infographic.model.currentDay && pastCircleCounter >= pastCircles.count) { | 101 | if (presentCircleCounter > infographic.model.currentDay && pastCircleCounter >= pastCircles.count) { |
126 | 94 | stop() | 102 | stop() |
127 | @@ -96,39 +104,8 @@ | |||
128 | 96 | } | 104 | } |
129 | 97 | 105 | ||
130 | 98 | function startFromBeginning() { | 106 | function startFromBeginning() { |
164 | 99 | circleGrowAnimTimer.pastCircleCounter = 0 | 107 | circleChangeAnimTimer.pastCircleCounter = 0 |
165 | 100 | circleGrowAnimTimer.presentCircleCounter = 0 | 108 | circleChangeAnimTimer.presentCircleCounter = 0 |
133 | 101 | start() | ||
134 | 102 | } | ||
135 | 103 | } | ||
136 | 104 | |||
137 | 105 | Timer { | ||
138 | 106 | id: circleShrinkAnimTimer | ||
139 | 107 | |||
140 | 108 | property int pastCircleCounter | ||
141 | 109 | property int presentCircleCounter | ||
142 | 110 | |||
143 | 111 | interval: animDuration | ||
144 | 112 | running: false | ||
145 | 113 | repeat: true | ||
146 | 114 | onTriggered: { | ||
147 | 115 | if (pastCircleCounter >= 0) { | ||
148 | 116 | var nextCircle = pastCircles.itemAt(pastCircleCounter--) | ||
149 | 117 | if (nextCircle !== null) nextCircle.pastCircleShrinkAnim.start() | ||
150 | 118 | } | ||
151 | 119 | if (pastCircleCounter < pastCircles.count / 2) { | ||
152 | 120 | var nextCircle = presentCircles.itemAt(presentCircleCounter--) | ||
153 | 121 | if (nextCircle !== null) nextCircle.presentCircleShrinkAnim.start() | ||
154 | 122 | } | ||
155 | 123 | if (presentCircleCounter < 0) { | ||
156 | 124 | stop() | ||
157 | 125 | infographic.model.readyForDataChange() | ||
158 | 126 | } | ||
159 | 127 | } | ||
160 | 128 | |||
161 | 129 | function startFromBeginning() { | ||
162 | 130 | pastCircleCounter = pastCircles.count - 1 | ||
163 | 131 | presentCircleCounter = model.currentDay | ||
166 | 132 | start() | 109 | start() |
167 | 133 | } | 110 | } |
168 | 134 | } | 111 | } |
169 | @@ -139,8 +116,7 @@ | |||
170 | 139 | model: infographic.model.secondMonth | 116 | model: infographic.model.secondMonth |
171 | 140 | 117 | ||
172 | 141 | delegate: ObjectPositioner { | 118 | delegate: ObjectPositioner { |
175 | 142 | property alias pastCircleGrowAnim: pastCircleGrowAnim | 119 | property alias pastCircleChangeAnim: pastCircleChangeAnim |
174 | 143 | property alias pastCircleShrinkAnim: pastCircleShrinkAnim | ||
176 | 144 | 120 | ||
177 | 145 | index: model.index | 121 | index: model.index |
178 | 146 | count: pastCircles.count | 122 | count: pastCircles.count |
179 | @@ -160,52 +136,33 @@ | |||
180 | 160 | opacity: 0.0 | 136 | opacity: 0.0 |
181 | 161 | scale: 0.0 | 137 | scale: 0.0 |
182 | 162 | visible: modelData !== undefined | 138 | visible: modelData !== undefined |
184 | 163 | color: Gradient.threeColorByIndex(index, count, infographic.model.secondColor) | 139 | color: "transparent" |
185 | 164 | 140 | ||
186 | 165 | SequentialAnimation { | 141 | SequentialAnimation { |
188 | 166 | id: pastCircleGrowAnim | 142 | id: pastCircleChangeAnim |
189 | 167 | 143 | ||
190 | 168 | loops: 1 | 144 | loops: 1 |
191 | 169 | ParallelAnimation { | 145 | ParallelAnimation { |
192 | 170 | PropertyAnimation { | 146 | PropertyAnimation { |
193 | 171 | target: pastCircle | 147 | target: pastCircle |
194 | 172 | property: "opacity" | 148 | property: "opacity" |
195 | 173 | from: 0.0 | ||
196 | 174 | to: pastCircle.circleOpacity | 149 | to: pastCircle.circleOpacity |
197 | 175 | easing.type: Easing.OutCurve | 150 | easing.type: Easing.OutCurve |
199 | 176 | duration: circleGrowAnimTimer.interval * 4 | 151 | duration: circleChangeAnimTimer.interval * __circleModifier |
200 | 177 | } | 152 | } |
201 | 178 | PropertyAnimation { | 153 | PropertyAnimation { |
202 | 179 | target: pastCircle | 154 | target: pastCircle |
203 | 180 | property: "scale" | 155 | property: "scale" |
204 | 181 | from: 0.0 | ||
205 | 182 | to: modelData | 156 | to: modelData |
206 | 183 | easing.type: Easing.OutCurve | 157 | easing.type: Easing.OutCurve |
232 | 184 | duration: circleGrowAnimTimer.interval * 4 | 158 | duration: circleChangeAnimTimer.interval * __circleModifier |
233 | 185 | } | 159 | } |
234 | 186 | } | 160 | ColorAnimation { |
235 | 187 | } | 161 | target: pastCircle |
236 | 188 | 162 | property: "color" | |
237 | 189 | SequentialAnimation { | 163 | to: Gradient.threeColorByIndex(index, count, infographic.model.secondColor) |
238 | 190 | id: pastCircleShrinkAnim | 164 | easing.type: Easing.OutCurve |
239 | 191 | 165 | duration: circleChangeAnimTimer.interval * __circleModifier | |
215 | 192 | loops: 1 | ||
216 | 193 | ParallelAnimation { | ||
217 | 194 | PropertyAnimation { | ||
218 | 195 | target: pastCircle | ||
219 | 196 | property: "opacity" | ||
220 | 197 | from: pastCircle.circleOpacity | ||
221 | 198 | to: 0.0 | ||
222 | 199 | easing.type: Easing.OutCurve | ||
223 | 200 | duration: circleShrinkAnimTimer.interval * 4 | ||
224 | 201 | } | ||
225 | 202 | PropertyAnimation { | ||
226 | 203 | target: pastCircle | ||
227 | 204 | property: "scale" | ||
228 | 205 | from: modelData | ||
229 | 206 | to: 0.0 | ||
230 | 207 | easing.type: Easing.OutCurve | ||
231 | 208 | duration: circleShrinkAnimTimer.interval * 4 | ||
240 | 209 | } | 166 | } |
241 | 210 | } | 167 | } |
242 | 211 | } | 168 | } |
243 | @@ -219,8 +176,7 @@ | |||
244 | 219 | model: infographic.model.firstMonth | 176 | model: infographic.model.firstMonth |
245 | 220 | 177 | ||
246 | 221 | delegate: ObjectPositioner { | 178 | delegate: ObjectPositioner { |
249 | 222 | property alias presentCircleGrowAnim: presentCircleGrowAnim | 179 | property alias presentCircleChangeAnim: presentCircleChangeAnim |
248 | 223 | property alias presentCircleShrinkAnim: presentCircleShrinkAnim | ||
250 | 224 | 180 | ||
251 | 225 | index: model.index | 181 | index: model.index |
252 | 226 | count: presentCircles.count | 182 | count: presentCircles.count |
253 | @@ -240,10 +196,10 @@ | |||
254 | 240 | opacity: 0.0 | 196 | opacity: 0.0 |
255 | 241 | scale: 0.0 | 197 | scale: 0.0 |
256 | 242 | visible: modelData !== undefined | 198 | visible: modelData !== undefined |
258 | 243 | color: Gradient.threeColorByIndex(index, infographic.model.currentDay, infographic.model.firstColor) | 199 | color: "transparent" |
259 | 244 | 200 | ||
260 | 245 | SequentialAnimation { | 201 | SequentialAnimation { |
262 | 246 | id: presentCircleGrowAnim | 202 | id: presentCircleChangeAnim |
263 | 247 | 203 | ||
264 | 248 | loops: 1 | 204 | loops: 1 |
265 | 249 | 205 | ||
266 | @@ -253,36 +209,21 @@ | |||
267 | 253 | property: "opacity" | 209 | property: "opacity" |
268 | 254 | to: presentCircle.circleOpacity | 210 | to: presentCircle.circleOpacity |
269 | 255 | easing.type: Easing.OutCurve | 211 | easing.type: Easing.OutCurve |
271 | 256 | duration: circleGrowAnimTimer.interval * 4 | 212 | duration: circleChangeAnimTimer.interval * __circleModifier |
272 | 257 | } | 213 | } |
273 | 258 | PropertyAnimation { | 214 | PropertyAnimation { |
274 | 259 | target: presentCircle | 215 | target: presentCircle |
275 | 260 | property: "scale" | 216 | property: "scale" |
276 | 261 | to: modelData | 217 | to: modelData |
277 | 262 | easing.type: Easing.OutCurve | 218 | easing.type: Easing.OutCurve |
301 | 263 | duration: circleGrowAnimTimer.interval * 4 | 219 | duration: circleChangeAnimTimer.interval * __circleModifier |
302 | 264 | } | 220 | } |
303 | 265 | } | 221 | ColorAnimation { |
304 | 266 | } | 222 | target: presentCircle |
305 | 267 | 223 | property: "color" | |
306 | 268 | SequentialAnimation { | 224 | to: Gradient.threeColorByIndex(index, infographic.model.currentDay, infographic.model.firstColor) |
307 | 269 | id: presentCircleShrinkAnim | 225 | easing.type: Easing.OutCurve |
308 | 270 | 226 | duration: circleChangeAnimTimer.interval * __circleModifier | |
286 | 271 | loops: 1 | ||
287 | 272 | ParallelAnimation { | ||
288 | 273 | PropertyAnimation { | ||
289 | 274 | target: presentCircle | ||
290 | 275 | property: "opacity" | ||
291 | 276 | to: 0.0 | ||
292 | 277 | easing.type: Easing.OutCurve | ||
293 | 278 | duration: circleShrinkAnimTimer.interval * 4 | ||
294 | 279 | } | ||
295 | 280 | PropertyAnimation { | ||
296 | 281 | target: presentCircle | ||
297 | 282 | property: "scale" | ||
298 | 283 | to: 0.0 | ||
299 | 284 | easing.type: Easing.OutCurve | ||
300 | 285 | duration: circleShrinkAnimTimer.interval * 4 | ||
309 | 286 | } | 227 | } |
310 | 287 | } | 228 | } |
311 | 288 | } | 229 | } |
312 | @@ -313,7 +254,7 @@ | |||
313 | 313 | stop() | 254 | stop() |
314 | 314 | } | 255 | } |
315 | 315 | if (dotCounter == Math.round(dots.count / 2)) { | 256 | if (dotCounter == Math.round(dots.count / 2)) { |
317 | 316 | circleGrowAnimTimer.startFromBeginning() | 257 | circleChangeAnimTimer.startFromBeginning() |
318 | 317 | } | 258 | } |
319 | 318 | } | 259 | } |
320 | 319 | 260 | ||
321 | @@ -340,8 +281,8 @@ | |||
322 | 340 | } else { | 281 | } else { |
323 | 341 | stop() | 282 | stop() |
324 | 342 | } | 283 | } |
327 | 343 | if (dotCounter == Math.round(dots.count / 2)) { | 284 | if (dotCounter == 0) { |
328 | 344 | circleShrinkAnimTimer.startFromBeginning() | 285 | infographic.model.readyForDataChange() |
329 | 345 | } | 286 | } |
330 | 346 | } | 287 | } |
331 | 347 | 288 | ||
332 | @@ -413,6 +354,7 @@ | |||
333 | 413 | property alias showAnim: increaseOpacity | 354 | property alias showAnim: increaseOpacity |
334 | 414 | 355 | ||
335 | 415 | property real baseOpacity: 0.6 | 356 | property real baseOpacity: 0.6 |
336 | 357 | property real duration: dotShowAnimTimer.interval * 5 | ||
337 | 416 | 358 | ||
338 | 417 | height: 0.7 * backgroundCircle.width | 359 | height: 0.7 * backgroundCircle.width |
339 | 418 | width: notification.height | 360 | width: notification.height |
340 | @@ -432,7 +374,7 @@ | |||
341 | 432 | property: "opacity" | 374 | property: "opacity" |
342 | 433 | from: 0.0 | 375 | from: 0.0 |
343 | 434 | to: notification.baseOpacity | 376 | to: notification.baseOpacity |
345 | 435 | duration: dotShowAnimTimer.interval * dots.count * 5 | 377 | duration: notification.duration * dots.count |
346 | 436 | } | 378 | } |
347 | 437 | 379 | ||
348 | 438 | PropertyAnimation { | 380 | PropertyAnimation { |
349 | @@ -442,7 +384,8 @@ | |||
350 | 442 | property: "opacity" | 384 | property: "opacity" |
351 | 443 | from: notification.baseOpacity | 385 | from: notification.baseOpacity |
352 | 444 | to: 0.0 | 386 | to: 0.0 |
354 | 445 | duration: dotShowAnimTimer.interval * dots.count * 5 | 387 | duration: notification.duration * dots.count |
355 | 388 | onStopped: if (!__useDotAnimation) infographic.model.readyForDataChange() | ||
356 | 446 | } | 389 | } |
357 | 447 | } | 390 | } |
358 | 448 | } | 391 | } |
359 | @@ -453,9 +396,10 @@ | |||
360 | 453 | onDoubleClicked: { | 396 | onDoubleClicked: { |
361 | 454 | if (!dotHideAnimTimer.running && | 397 | if (!dotHideAnimTimer.running && |
362 | 455 | !dotShowAnimTimer.running && | 398 | !dotShowAnimTimer.running && |
365 | 456 | !circleShrinkAnimTimer.running && | 399 | !circleChangeAnimTimer.running) { |
366 | 457 | !circleGrowAnimTimer.running) | 400 | __useDotAnimation = false |
367 | 458 | infographic.model.nextDataSource() | 401 | infographic.model.nextDataSource() |
368 | 402 | } | ||
369 | 459 | } | 403 | } |
370 | 460 | 404 | ||
371 | 461 | onClicked: mouse.accepted = false | 405 | onClicked: mouse.accepted = false |
372 | 462 | 406 | ||
373 | === modified file 'qml/Shell.qml' | |||
374 | --- qml/Shell.qml 2014-08-06 19:39:07 +0000 | |||
375 | +++ qml/Shell.qml 2014-08-12 11:40:17 +0000 | |||
376 | @@ -48,6 +48,8 @@ | |||
377 | 48 | property url background | 48 | property url background |
378 | 49 | readonly property real panelHeight: panel.panelHeight | 49 | readonly property real panelHeight: panel.panelHeight |
379 | 50 | 50 | ||
380 | 51 | readonly property bool locked: LightDM.Greeter.active && !LightDM.Greeter.authenticated | ||
381 | 52 | |||
382 | 51 | property bool sideStageEnabled: shell.width >= units.gu(100) | 53 | property bool sideStageEnabled: shell.width >= units.gu(100) |
383 | 52 | readonly property string focusedApplicationId: ApplicationManager.focusedApplicationId | 54 | readonly property string focusedApplicationId: ApplicationManager.focusedApplicationId |
384 | 53 | 55 | ||
385 | @@ -323,6 +325,7 @@ | |||
386 | 323 | available: true | 325 | available: true |
387 | 324 | hides: [launcher, panel.indicators] | 326 | hides: [launcher, panel.indicators] |
388 | 325 | shown: true | 327 | shown: true |
389 | 328 | loadContent: required || lockscreen.required // keeps content in memory for quick show() | ||
390 | 326 | 329 | ||
391 | 327 | defaultBackground: shell.background | 330 | defaultBackground: shell.background |
392 | 328 | 331 | ||
393 | @@ -412,7 +415,7 @@ | |||
394 | 412 | } | 415 | } |
395 | 413 | 416 | ||
396 | 414 | function showDash() { | 417 | function showDash() { |
398 | 415 | if (LightDM.Greeter.active && !LightDM.Greeter.promptless) { | 418 | if (shell.locked) { |
399 | 416 | return; | 419 | return; |
400 | 417 | } | 420 | } |
401 | 418 | if (greeter.shown) { | 421 | if (greeter.shown) { |
402 | @@ -436,7 +439,7 @@ | |||
403 | 436 | anchors.fill: parent //because this draws indicator menus | 439 | anchors.fill: parent //because this draws indicator menus |
404 | 437 | indicators { | 440 | indicators { |
405 | 438 | hides: [launcher] | 441 | hides: [launcher] |
407 | 439 | available: edgeDemo.panelEnabled && greeter.fakeActiveForApp === "" | 442 | available: edgeDemo.panelEnabled && !shell.locked |
408 | 440 | contentEnabled: edgeDemo.panelContentEnabled | 443 | contentEnabled: edgeDemo.panelContentEnabled |
409 | 441 | width: parent.width > units.gu(60) ? units.gu(40) : parent.width | 444 | width: parent.width > units.gu(60) ? units.gu(40) : parent.width |
410 | 442 | panelHeight: units.gu(3) | 445 | panelHeight: units.gu(3) |
411 | @@ -460,7 +463,7 @@ | |||
412 | 460 | anchors.bottom: parent.bottom | 463 | anchors.bottom: parent.bottom |
413 | 461 | width: parent.width | 464 | width: parent.width |
414 | 462 | dragAreaWidth: shell.edgeSize | 465 | dragAreaWidth: shell.edgeSize |
416 | 463 | available: edgeDemo.launcherEnabled && greeter.fakeActiveForApp === "" | 466 | available: edgeDemo.launcherEnabled && !shell.locked |
417 | 464 | 467 | ||
418 | 465 | onShowDashHome: showHome() | 468 | onShowDashHome: showHome() |
419 | 466 | onDash: showDash() | 469 | onDash: showDash() |
420 | 467 | 470 | ||
421 | === modified file 'tests/autopilot/unity8/shell/emulators/greeter.py' | |||
422 | --- tests/autopilot/unity8/shell/emulators/greeter.py 2014-07-30 18:22:44 +0000 | |||
423 | +++ tests/autopilot/unity8/shell/emulators/greeter.py 2014-08-12 11:40:17 +0000 | |||
424 | @@ -28,6 +28,7 @@ | |||
425 | 28 | def swipe(self): | 28 | def swipe(self): |
426 | 29 | """Swipe the greeter screen away.""" | 29 | """Swipe the greeter screen away.""" |
427 | 30 | self.created.wait_for(True) | 30 | self.created.wait_for(True) |
428 | 31 | self.showProgress.wait_for(1) | ||
429 | 31 | 32 | ||
430 | 32 | rect = self.globalRect | 33 | rect = self.globalRect |
431 | 33 | start_x = rect[0] + rect[2] - 3 | 34 | start_x = rect[0] + rect[2] - 3 |
432 | @@ -36,7 +37,7 @@ | |||
433 | 36 | stop_y = start_y | 37 | stop_y = start_y |
434 | 37 | self.pointing_device.drag(start_x, start_y, stop_x, stop_y) | 38 | self.pointing_device.drag(start_x, start_y, stop_x, stop_y) |
435 | 38 | 39 | ||
437 | 39 | self.created.wait_for(False) | 40 | self.showProgress.wait_for(0) |
438 | 40 | 41 | ||
439 | 41 | def get_prompt(self): | 42 | def get_prompt(self): |
440 | 42 | return self.select_single( | 43 | return self.select_single( |
441 | 43 | 44 | ||
442 | === modified file 'tests/qmltests/tst_ShellWithPin.qml' | |||
443 | --- tests/qmltests/tst_ShellWithPin.qml 2014-07-29 11:35:10 +0000 | |||
444 | +++ tests/qmltests/tst_ShellWithPin.qml 2014-08-12 11:40:17 +0000 | |||
445 | @@ -116,6 +116,14 @@ | |||
446 | 116 | tryCompare(sessionSpy, "count", 1) | 116 | tryCompare(sessionSpy, "count", 1) |
447 | 117 | } | 117 | } |
448 | 118 | 118 | ||
449 | 119 | function test_disabledEdges() { | ||
450 | 120 | var launcher = findChild(shell, "launcher") | ||
451 | 121 | tryCompare(launcher, "available", false) | ||
452 | 122 | |||
453 | 123 | var indicators = findChild(shell, "indicators") | ||
454 | 124 | tryCompare(indicators, "available", false) | ||
455 | 125 | } | ||
456 | 126 | |||
457 | 119 | function test_emergencyCall() { | 127 | function test_emergencyCall() { |
458 | 120 | var greeter = findChild(shell, "greeter") | 128 | var greeter = findChild(shell, "greeter") |
459 | 121 | var lockscreen = findChild(shell, "lockscreen") | 129 | var lockscreen = findChild(shell, "lockscreen") |
460 | @@ -130,10 +138,13 @@ | |||
461 | 130 | tryCompare(greeter, "fakeActiveForApp", "dialer-app") | 138 | tryCompare(greeter, "fakeActiveForApp", "dialer-app") |
462 | 131 | tryCompare(lockscreen, "shown", false) | 139 | tryCompare(lockscreen, "shown", false) |
463 | 132 | tryCompare(panel, "fullscreenMode", true) | 140 | tryCompare(panel, "fullscreenMode", true) |
464 | 133 | tryCompare(indicators, "available", false) | ||
465 | 134 | tryCompare(launcher, "available", false) | ||
466 | 135 | tryCompare(stage, "spreadEnabled", false) | 141 | tryCompare(stage, "spreadEnabled", false) |
467 | 136 | 142 | ||
468 | 143 | // These are normally false anyway, but confirm they remain so in | ||
469 | 144 | // emergency mode. | ||
470 | 145 | tryCompare(launcher, "available", false) | ||
471 | 146 | tryCompare(indicators, "available", false) | ||
472 | 147 | |||
473 | 137 | // Cancel emergency mode, and go back to normal | 148 | // Cancel emergency mode, and go back to normal |
474 | 138 | waitForRendering(greeter) | 149 | waitForRendering(greeter) |
475 | 139 | LightDM.Greeter.showGreeter() | 150 | LightDM.Greeter.showGreeter() |
476 | @@ -142,8 +153,6 @@ | |||
477 | 142 | tryCompare(greeter, "fakeActiveForApp", "") | 153 | tryCompare(greeter, "fakeActiveForApp", "") |
478 | 143 | tryCompare(lockscreen, "shown", true) | 154 | tryCompare(lockscreen, "shown", true) |
479 | 144 | tryCompare(panel, "fullscreenMode", false) | 155 | tryCompare(panel, "fullscreenMode", false) |
480 | 145 | tryCompare(indicators, "available", true) | ||
481 | 146 | tryCompare(launcher, "available", true) | ||
482 | 147 | tryCompare(stage, "spreadEnabled", true) | 156 | tryCompare(stage, "spreadEnabled", true) |
483 | 148 | } | 157 | } |
484 | 149 | 158 |