on xenial help sign in
Use a ShaderEffectSource instead of changing Dash parent
f2fbd5dAlbert Astals
qml/Dash/Dash.qml+20−3
@@ -98,10 +98,12 @@ Showable {
98 }
98 }
99 onFavoriteSelected: {
99 onFavoriteSelected: {
100 setCurrentScope(scopeId, false, false);
100 setCurrentScope(scopeId, false, false);
101+ dashContentCache.scheduleUpdate();
101 hide();
102 hide();
102 }
103 }
103 onAllFavoriteSelected: {
104 onAllFavoriteSelected: {
104 setCurrentScope(scopeId, false, false);
105 setCurrentScope(scopeId, false, false);
106+ dashContentCache.scheduleUpdate();
105 animateDashFromAll(dashContent.currentScopeId);
107 animateDashFromAll(dashContent.currentScopeId);
106 hide();
108 hide();
107 }
109 }
@@ -110,6 +112,7 @@ Showable {
110 if (scopeIndex >= 0) {
112 if (scopeIndex >= 0) {
111 // Is a favorite one
113 // Is a favorite one
112 setCurrentScope(scopeId, false, false);
114 setCurrentScope(scopeId, false, false);
115+ dashContentCache.scheduleUpdate();
113 showDashFromPos(pos, size);
116 showDashFromPos(pos, size);
114 hide();
117 hide();
115 } else {
118 } else {
@@ -128,12 +131,23 @@ Showable {
128 }
131 }
129 }
132 }
130
133
134+ ShaderEffectSource {
135+ id: dashContentCache
136+ parent: scopesOverview.dashItemEater
137+ z: 1
138+ sourceItem: dashContent
139+ height: sourceItem.height
140+ width: sourceItem.width
141+ opacity: 1 - overviewController.progress
142+ visible: overviewController.progress != 0
143+ live: false
144+ }
145+
131 DashContent {
146 DashContent {
132 id: dashContent
147 id: dashContent
133
148
134 property var scopeThatOpenedScope: null
149 property var scopeThatOpenedScope: null
135
150
136− parent: overviewController.progress == 0 ? dash : scopesOverview.dashItemEater
137 objectName: "dashContent"
151 objectName: "dashContent"
138 width: dash.width
152 width: dash.width
139 height: dash.height
153 height: dash.height
@@ -174,8 +188,8 @@ Showable {
174 }
188 }
175 }
189 }
176
190
177− enabled: opacity == 1
191+ enabled: overviewController.progress == 0
178− opacity: scopesOverview.growingDashFromPos ? 1 : 1 - overviewController.progress
192+ opacity: enabled ? 1 : 0
179 }
193 }
180
194
181 DashBackground
195 DashBackground
@@ -247,6 +261,9 @@ Showable {
247 height: units.gu(2)
261 height: units.gu(2)
248
262
249 onSceneDistanceChanged: {
263 onSceneDistanceChanged: {
264+ if (overviewController.enableAnimation) {
265+ dashContentCache.scheduleUpdate();
266+ }
250 overviewController.enableAnimation = false;
267 overviewController.enableAnimation = false;
251 overviewController.progress = Math.max(0, Math.min(1, sceneDistance / fullMovement));
268 overviewController.progress = Math.max(0, Math.min(1, sceneDistance / fullMovement));
252 }
269 }