@@ -26,7 +26,6 @@ import Utils 0.1
2626import LightDM 0.1 as LightDM
2727import Powerd 0.1
2828import SessionBroadcast 0.1
29−import "Dash"
3029import "Greeter"
3130import "Launcher"
3231import "Panel"
@@ -123,35 +122,12 @@ Item {
123122 visible: !fullyCovered
124123
125124 Image {
126− anchors.fill: dash
125+ anchors.fill: underlay
127126 source: shell.width > shell.height ? "Dash/graphics/paper_landscape.png" : "Dash/graphics/paper_portrait.png"
128127 fillMode: Image.PreserveAspectCrop
129128 horizontalAlignment: Image.AlignRight
130129 verticalAlignment: Image.AlignTop
131130 }
132−
133− Dash {
134− id: dash
135− objectName: "dash"
136−
137− available: !LightDM.Greeter.active
138− hides: [stages, launcher, panel.indicators]
139− shown: disappearingAnimationProgress !== 1.0 && greeterWrapper.showProgress !== 1.0 &&
140− !(panel.indicators.fullyOpened && !sideStageEnabled)
141− enabled: disappearingAnimationProgress === 0.0 && greeterWrapper.showProgress === 0.0 && edgeDemo.dashEnabled
142−
143− anchors {
144− fill: parent
145− topMargin: panel.panelHeight
146− }
147−
148− contentScale: 1.0 - 0.2 * disappearingAnimationProgress
149− opacity: 1.0 - disappearingAnimationProgress
150− property real disappearingAnimationProgress: stages.showProgress
151−
152− // FIXME: only necessary because stages.showProgress is not animated
153− Behavior on disappearingAnimationProgress { SmoothedAnimation { velocity: 5 }}
154− }
155131 }
156132
157133 EdgeDragArea {
@@ -188,55 +164,7 @@ Item {
188164 objectName: "stages"
189165 width: parent.width
190166 height: parent.height
191−
192− visible: !fullyHidden && !ApplicationManager.empty
193−
194− x: {
195− if (shown) {
196− if (locked || greeter.fakeActiveForApp !== "") {
197− return 0;
198− }
199− return launcher.progress;
200− } else {
201− return stagesDragArea.progress
202− }
203− }
204− Behavior on x { SmoothedAnimation { velocity: 600; duration: UbuntuAnimation.FastDuration } }
205−
206− property bool shown: false
207− onShownChanged: {
208− if (shown) {
209− if (ApplicationManager.count > 0) {
210− ApplicationManager.focusApplication(ApplicationManager.get(0).appId);
211− }
212− } else {
213− if (ApplicationManager.focusedApplicationId) {
214− ApplicationManager.updateScreenshot(ApplicationManager.focusedApplicationId);
215− ApplicationManager.unfocusCurrentApplication();
216− }
217− }
218− }
219−
220− // Avoid a silent "divide by zero -> NaN" situation during init as shell.width will be
221− // zero. That breaks the property binding and the function won't be reevaluated once
222− // shell.width is set, with the NaN result staying there for good.
223− property real showProgress: shell.width ? MathUtils.clamp(1 - x / shell.width, 0, 1) : 0
224−
225− property bool fullyShown: x == 0
226− property bool fullyHidden: x == width
227−
228− property bool locked: applicationsDisplayLoader.item ? applicationsDisplayLoader.item.locked : false
229−
230− // It might technically not be fullyShown but visually it just looks so.
231− property bool roughlyFullyShown: x >= 0 && x <= units.gu(1)
232−
233− function show() {
234− shown = true;
235− }
236−
237− function hide() {
238− shown = false;
239− }
167+ visible: !ApplicationManager.empty
240168
241169 Connections {
242170 target: ApplicationManager
@@ -245,7 +173,6 @@ Item {
245173 lockscreen.show();
246174 }
247175 greeter.hide();
248− stages.show();
249176 }
250177
251178 onFocusedApplicationIdChanged: {
@@ -258,15 +185,6 @@ Item {
258185 if (greeter.shown) {
259186 greeter.hide();
260187 }
261− if (!stages.shown) {
262− stages.show();
263− }
264− }
265−
266− onEmptyChanged: {
267− if (ApplicationManager.empty) {
268− stages.hide();
269− }
270188 }
271189 }
272190
@@ -459,7 +377,7 @@ Item {
459377 Binding {
460378 target: applicationsDisplayLoader.item
461379 property: "interactive"
462− value: stages.roughlyFullyShown && !greeter.shown && !lockscreen.shown
380+ value: !greeter.shown && !lockscreen.shown
463381 }
464382 Binding {
465383 target: applicationsDisplayLoader.item
@@ -686,7 +604,8 @@ Item {
686604 }
687605
688606 var animate = !LightDM.Greeter.active && !stages.shown
689− dash.setCurrentScope("clickscope", animate, false)
607+ // FIXME: IPC to dash-app needed?
608+ //dash.setCurrentScope("clickscope", animate, false)
690609 stages.hide()
691610 }
692611
@@ -748,7 +667,8 @@ Item {
748667
749668 onShowDashHome: showHome()
750669 onDash: showDash()
751− onDashSwipeChanged: if (dashSwipe && stages.shown) dash.setCurrentScope("clickscope", false, true)
670+ // FIXME: IPC to dash-app needed?
671+// onDashSwipeChanged: if (dashSwipe && stages.shown) dash.setCurrentScope("clickscope", false, true)
752672 onLauncherApplicationSelected: {
753673 if (greeter.fakeActiveForApp !== "") {
754674 lockscreen.show()
@@ -829,7 +749,6 @@ Item {
829749 z: alphaDisclaimerLabel.z + 10
830750 greeter: greeter
831751 launcher: launcher
832− dash: dash
833752 indicators: panel.indicators
834753 underlay: underlay
835754 }