on xenial help sign in
get rid of src -> source mapping for mainScreenshotImage and with that the fixme for the PropertyAction not working
commit02fa0f348613c391e898cdc0c22366b77c04f9fe authorMichael Zanetti <michael.zanetti@canonical.com> dateThu 20 Mar 2014, 11:43 (13 years ago) parent2253704
1 file changed+8−13
qml/Stages/PhoneStage.qml+8−13
qml/Stages/PhoneStage.qml+8−13
@@ -44,7 +44,7 @@ Item {
4444 priv.requestNewScreenshot();
4545 } else {
4646 mainScreenshotImage.anchors.leftMargin = 0;
47− mainScreenshotImage.src = ApplicationManager.get(0).screenshot;
47+ mainScreenshotImage.source = ApplicationManager.get(0).screenshot;
4848 mainScreenshotImage.visible = true;
4949 }
5050 } else {
@@ -70,7 +70,7 @@ Item {
7070 } else {
7171 var application = priv.focusedApplication;
7272 root.fullscreen = application.fullscreen;
73− mainScreenshotImage.src = application.screenshot;
73+ mainScreenshotImage.source = application.screenshot;
7474 }
7575 } else {
7676 spreadView.selectedIndex = -1;
@@ -81,11 +81,11 @@ Item {
8181
8282 onApplicationAdded: {
8383 if (!priv.focusedApplication) {
84− mainScreenshotImage.src = "";
84+ mainScreenshotImage.source = "";
8585 mainScreenshotImage.visible = false;
8686 priv.applicationStarting = true;
8787 } else {
88− mainScreenshotImage.src = "";
88+ mainScreenshotImage.source = "";
8989 priv.newFocusedAppId = appId;
9090 priv.secondApplicationStarting = true;
9191 priv.requestNewScreenshot();
@@ -98,10 +98,10 @@ Item {
9898
9999 onApplicationRemoved: {
100100 if (ApplicationManager.count == 0) {
101− mainScreenshotImage.src = ""
101+ mainScreenshotImage.source = ""
102102 mainScreenshotImage.visible = false;
103103 } else {
104− mainScreenshotImage.src = ApplicationManager.get(0).screenshot;
104+ mainScreenshotImage.source = ApplicationManager.get(0).screenshot;
105105 }
106106 }
107107 }
@@ -123,7 +123,7 @@ Item {
123123 onFocusedScreenshotChanged: {
124124 if (root.moving && priv.waitingForScreenshot) {
125125 mainScreenshotImage.anchors.leftMargin = 0;
126− mainScreenshotImage.src = priv.focusedScreenshot
126+ mainScreenshotImage.source = priv.focusedScreenshot
127127 mainScreenshotImage.visible = true;
128128 } else if (priv.secondApplicationStarting && priv.waitingForScreenshot) {
129129 applicationSwitchingAnimation.start();
@@ -186,8 +186,7 @@ Item {
186186 id: applicationSwitchingAnimation
187187 // setup
188188 PropertyAction { target: mainScreenshotImage; property: "anchors.leftMargin"; value: 0 }
189− // FIXME: PropertyAction seems to fail when secondApplicationStarting and we didn't have another screenshot before
190− ScriptAction { script: mainScreenshotImage.src = priv.focusedScreenshot }
189+ PropertyAction { target: mainScreenshotImage; property: "source"; value: priv.focusedScreenshot }
191190 PropertyAction { targets: [mainScreenshotImage, fadeInScreenshotImage]; property: "visible"; value: true }
192191 PropertyAction { target: fadeInScreenshotImage; property: "source"; value: {
193192 var newFocusedApp = ApplicationManager.findApplication(priv.newFocusedAppId);
@@ -234,10 +233,6 @@ Item {
234233 id: mainScreenshotImage
235234 anchors { left: parent.left; bottom: parent.bottom }
236235 width: parent.width
237−
238− // FIXME: Workaround for bug: https://bugs.launchpad.net/ubuntu-ui-toolkit/+bug/1194778
239− property string src
240− source: src
241236 visible: false
242237 }
243238