on xenial help sign in
don't apply transitions if a delegate is created while we're in spread
6e2f048Michael Zanetti
qml/Stage/ApplicationWindow.qml+167−167
@@ -234,172 +234,172 @@ FocusScope {
234 property Item first: null
234 property Item first: null
235 }
235 }
236
236
237− StateGroup {
237+// StateGroup {
238− id: stateGroup
238+// id: stateGroup
239− objectName: "applicationWindowStateGroup"
239+// objectName: "applicationWindowStateGroup"
240− states: [
240+// states: [
241− State {
241+// State {
242− name: "void"
242+// name: "void"
243− when:
243+// when:
244− d.hadSurface && (!root.surface || !d.surfaceInitialized)
244+// d.hadSurface && (!root.surface || !d.surfaceInitialized)
245− &&
245+// &&
246− screenshotImage.status !== Image.Ready
246+// screenshotImage.status !== Image.Ready
247− },
247+// },
248− State {
248+// State {
249− name: "splashScreen"
249+// name: "splashScreen"
250− when:
250+// when:
251− !d.hadSurface && (!root.surface || !d.surfaceInitialized)
251+// !d.hadSurface && (!root.surface || !d.surfaceInitialized)
252− &&
252+// &&
253− screenshotImage.status !== Image.Ready
253+// screenshotImage.status !== Image.Ready
254− },
254+// },
255− State {
255+// State {
256− name: "surface"
256+// name: "surface"
257− when:
257+// when:
258− (root.surface && d.surfaceInitialized)
258+// (root.surface && d.surfaceInitialized)
259− &&
259+// &&
260− (d.liveSurface ||
260+// (d.liveSurface ||
261− (d.applicationState !== ApplicationInfoInterface.Running
261+// (d.applicationState !== ApplicationInfoInterface.Running
262− && screenshotImage.status !== Image.Ready))
262+// && screenshotImage.status !== Image.Ready))
263− PropertyChanges {
263+// PropertyChanges {
264− target: root
264+// target: root
265− implicitWidth: surfaceContainer.implicitWidth
265+// implicitWidth: surfaceContainer.implicitWidth
266− implicitHeight: surfaceContainer.implicitHeight
266+// implicitHeight: surfaceContainer.implicitHeight
267− }
267+// }
268− },
268+// },
269− State {
269+// State {
270− name: "screenshot"
270+// name: "screenshot"
271− when:
271+// when:
272− screenshotImage.status === Image.Ready
272+// screenshotImage.status === Image.Ready
273− &&
273+// &&
274− (d.applicationState !== ApplicationInfoInterface.Running
274+// (d.applicationState !== ApplicationInfoInterface.Running
275− || !root.surface || !d.surfaceInitialized)
275+// || !root.surface || !d.surfaceInitialized)
276− },
276+// },
277− State {
277+// State {
278− // This is a dead end. From here we expect the surface to be removed from the model
278+// // This is a dead end. From here we expect the surface to be removed from the model
279− // shortly after we stop referencing to it in our SurfaceContainer.
279+// // shortly after we stop referencing to it in our SurfaceContainer.
280− name: "closed"
280+// name: "closed"
281− when:
281+// when:
282− // The surface died while the application is running. It must have been closed
282+// // The surface died while the application is running. It must have been closed
283− // by the shell or the application decided to destroy it by itself
283+// // by the shell or the application decided to destroy it by itself
284− root.surface && d.surfaceInitialized && !d.liveSurface
284+// root.surface && d.surfaceInitialized && !d.liveSurface
285− && d.applicationState === ApplicationInfoInterface.Running
285+// && d.applicationState === ApplicationInfoInterface.Running
286− }
286+// }
287− ]
287+// ]
288
288
289− transitions: [
289+// transitions: [
290− Transition {
290+// Transition {
291− from: ""; to: "splashScreen"
291+// from: ""; to: "splashScreen"
292− PropertyAction { target: splashLoader; property: "active"; value: true }
292+// PropertyAction { target: splashLoader; property: "active"; value: true }
293− PropertyAction { target: surfaceContainer
293+// PropertyAction { target: surfaceContainer
294− property: "visible"; value: false }
294+// property: "visible"; value: false }
295− },
295+// },
296− Transition {
296+// Transition {
297− from: "splashScreen"; to: "surface"
297+// from: "splashScreen"; to: "surface"
298− SequentialAnimation {
298+// SequentialAnimation {
299− PropertyAction { target: surfaceContainer
299+// PropertyAction { target: surfaceContainer
300− property: "opacity"; value: 0.0 }
300+// property: "opacity"; value: 0.0 }
301− PropertyAction { target: surfaceContainer
301+// PropertyAction { target: surfaceContainer
302− property: "visible"; value: true }
302+// property: "visible"; value: true }
303− UbuntuNumberAnimation { target: surfaceContainer; property: "opacity";
303+// UbuntuNumberAnimation { target: surfaceContainer; property: "opacity";
304− from: 0.0; to: 1.0
304+// from: 0.0; to: 1.0
305− duration: UbuntuAnimation.BriskDuration }
305+// duration: UbuntuAnimation.BriskDuration }
306− ScriptAction { script: {
306+// ScriptAction { script: {
307− splashLoader.active = false;
307+// splashLoader.active = false;
308− surfaceIsOldTimer.start();
308+// surfaceIsOldTimer.start();
309− } }
309+// } }
310− }
310+// }
311− },
311+// },
312− Transition {
312+// Transition {
313− from: "surface"; to: "splashScreen"
313+// from: "surface"; to: "splashScreen"
314− SequentialAnimation {
314+// SequentialAnimation {
315− ScriptAction { script: {
315+// ScriptAction { script: {
316− surfaceIsOldTimer.stop();
316+// surfaceIsOldTimer.stop();
317− d.surfaceOldEnoughToBeResized = false;
317+// d.surfaceOldEnoughToBeResized = false;
318− splashLoader.active = true;
318+// splashLoader.active = true;
319− surfaceContainer.visible = true;
319+// surfaceContainer.visible = true;
320− } }
320+// } }
321− UbuntuNumberAnimation { target: splashLoader; property: "opacity";
321+// UbuntuNumberAnimation { target: splashLoader; property: "opacity";
322− from: 0.0; to: 1.0
322+// from: 0.0; to: 1.0
323− duration: UbuntuAnimation.BriskDuration }
323+// duration: UbuntuAnimation.BriskDuration }
324− PropertyAction { target: surfaceContainer
324+// PropertyAction { target: surfaceContainer
325− property: "visible"; value: false }
325+// property: "visible"; value: false }
326− }
326+// }
327− },
327+// },
328− Transition {
328+// Transition {
329− from: "surface"; to: "screenshot"
329+// from: "surface"; to: "screenshot"
330− SequentialAnimation {
330+// SequentialAnimation {
331− ScriptAction { script: {
331+// ScriptAction { script: {
332− surfaceIsOldTimer.stop();
332+// surfaceIsOldTimer.stop();
333− d.surfaceOldEnoughToBeResized = false;
333+// d.surfaceOldEnoughToBeResized = false;
334− screenshotImage.visible = true;
334+// screenshotImage.visible = true;
335− } }
335+// } }
336− UbuntuNumberAnimation { target: screenshotImage; property: "opacity";
336+// UbuntuNumberAnimation { target: screenshotImage; property: "opacity";
337− from: 0.0; to: 1.0
337+// from: 0.0; to: 1.0
338− duration: UbuntuAnimation.BriskDuration }
338+// duration: UbuntuAnimation.BriskDuration }
339− ScriptAction { script: {
339+// ScriptAction { script: {
340− surfaceContainer.visible = false;
340+// surfaceContainer.visible = false;
341− surfaceContainer.surface = null;
341+// surfaceContainer.surface = null;
342− d.hadSurface = true;
342+// d.hadSurface = true;
343− } }
343+// } }
344− }
344+// }
345− },
345+// },
346− Transition {
346+// Transition {
347− from: "screenshot"; to: "surface"
347+// from: "screenshot"; to: "surface"
348− SequentialAnimation {
348+// SequentialAnimation {
349− PropertyAction { target: surfaceContainer
349+// PropertyAction { target: surfaceContainer
350− property: "visible"; value: true }
350+// property: "visible"; value: true }
351− UbuntuNumberAnimation { target: screenshotImage; property: "opacity";
351+// UbuntuNumberAnimation { target: screenshotImage; property: "opacity";
352− from: 1.0; to: 0.0
352+// from: 1.0; to: 0.0
353− duration: UbuntuAnimation.BriskDuration }
353+// duration: UbuntuAnimation.BriskDuration }
354− ScriptAction { script: {
354+// ScriptAction { script: {
355− screenshotImage.visible = false;
355+// screenshotImage.visible = false;
356− screenshotImage.source = "";
356+// screenshotImage.source = "";
357− surfaceIsOldTimer.start();
357+// surfaceIsOldTimer.start();
358− } }
358+// } }
359− }
359+// }
360− },
360+// },
361− Transition {
361+// Transition {
362− from: "splashScreen"; to: "screenshot"
362+// from: "splashScreen"; to: "screenshot"
363− SequentialAnimation {
363+// SequentialAnimation {
364− PropertyAction { target: screenshotImage
364+// PropertyAction { target: screenshotImage
365− property: "visible"; value: true }
365+// property: "visible"; value: true }
366− UbuntuNumberAnimation { target: screenshotImage; property: "opacity";
366+// UbuntuNumberAnimation { target: screenshotImage; property: "opacity";
367− from: 0.0; to: 1.0
367+// from: 0.0; to: 1.0
368− duration: UbuntuAnimation.BriskDuration }
368+// duration: UbuntuAnimation.BriskDuration }
369− PropertyAction { target: splashLoader; property: "active"; value: false }
369+// PropertyAction { target: splashLoader; property: "active"; value: false }
370− }
370+// }
371− },
371+// },
372− Transition {
372+// Transition {
373− from: "surface"; to: "void"
373+// from: "surface"; to: "void"
374− ScriptAction { script: {
374+// ScriptAction { script: {
375− surfaceIsOldTimer.stop();
375+// surfaceIsOldTimer.stop();
376− d.surfaceOldEnoughToBeResized = false;
376+// d.surfaceOldEnoughToBeResized = false;
377− surfaceContainer.visible = false;
377+// surfaceContainer.visible = false;
378− } }
378+// } }
379− },
379+// },
380− Transition {
380+// Transition {
381− from: "void"; to: "surface"
381+// from: "void"; to: "surface"
382− SequentialAnimation {
382+// SequentialAnimation {
383− PropertyAction { target: surfaceContainer; property: "opacity"; value: 0.0 }
383+// PropertyAction { target: surfaceContainer; property: "opacity"; value: 0.0 }
384− PropertyAction { target: surfaceContainer; property: "visible"; value: true }
384+// PropertyAction { target: surfaceContainer; property: "visible"; value: true }
385− UbuntuNumberAnimation { target: surfaceContainer; property: "opacity";
385+// UbuntuNumberAnimation { target: surfaceContainer; property: "opacity";
386− from: 0.0; to: 1.0
386+// from: 0.0; to: 1.0
387− duration: UbuntuAnimation.BriskDuration }
387+// duration: UbuntuAnimation.BriskDuration }
388− ScriptAction { script: {
388+// ScriptAction { script: {
389− surfaceIsOldTimer.start();
389+// surfaceIsOldTimer.start();
390− } }
390+// } }
391− }
391+// }
392− },
392+// },
393− Transition {
393+// Transition {
394− to: "closed"
394+// to: "closed"
395− SequentialAnimation {
395+// SequentialAnimation {
396− ScriptAction { script: {
396+// ScriptAction { script: {
397− surfaceContainer.visible = false;
397+// surfaceContainer.visible = false;
398− surfaceContainer.surface = null;
398+// surfaceContainer.surface = null;
399− d.hadSurface = true;
399+// d.hadSurface = true;
400− } }
400+// } }
401− }
401+// }
402− }
402+// }
403− ]
403+// ]
404− }
404+// }
405}
405}
qml/Stage/Stage.qml+5
@@ -1569,6 +1569,10 @@ FocusScope {
1569 }
1569 }
1570 }
1570 }
1571 ]
1571 ]
1572+ onStateChanged: {
1573+ print("item", index, "state changed", state)
1574+ }
1575+
1572 transitions: [
1576 transitions: [
1573 Transition {
1577 Transition {
1574 from: "staged,stagedWithSideStage"
1578 from: "staged,stagedWithSideStage"
@@ -1582,6 +1586,7 @@ FocusScope {
1582 UbuntuNumberAnimation { target: appDelegate; properties: "x,y,requestedX,requestedY,requestedWidth,requestedHeight"; duration: priv.animationDuration}
1586 UbuntuNumberAnimation { target: appDelegate; properties: "x,y,requestedX,requestedY,requestedWidth,requestedHeight"; duration: priv.animationDuration}
1583 },
1587 },
1584 Transition {
1588 Transition {
1589+ from: "normal,restored,maximized,maximizedHorizontally,maximizedVertically,maximizedLeft,maximizedRight,maximizedTopLeft,maximizedBottomLeft,maximizedTopRight,maximizedBottomRight,staged,stagedWithSideStage,windowedRightEdge,stagedRightEdge";
1585 to: "spread"
1590 to: "spread"
1586 // DecoratedWindow wants the scaleToPreviewSize set before enabling scaleToPreview
1591 // DecoratedWindow wants the scaleToPreviewSize set before enabling scaleToPreview
1587 PropertyAction { target: appDelegate; properties: "z,visible" }
1592 PropertyAction { target: appDelegate; properties: "z,visible" }