@@ -143,66 +143,95 @@ FocusScope {
143 // Whether the underlay is fully covered by opaque UI elements.
143 // Whether the underlay is fully covered by opaque UI elements.
144 property bool fullyCovered: panel.indicators.fullyOpened && shell.width <= panel.indicatorsMenuWidth
144 property bool fullyCovered: panel.indicators.fullyOpened && shell.width <= panel.indicatorsMenuWidth
146− readonly property bool applicationRunning: ((mainStage.applications && mainStage.applications.count > 0)
146+ readonly property bool mainStageApplicationRunning: mainStage.applications && mainStage.applications.count > 0
147− || (sideStage.applications && sideStage.applications.count > 0))
147+ readonly property bool sideStageApplicationRunning: sideStage.applications && sideStage.applications.count > 0
149 // Whether the user should see the topmost application surface (if there's one at all).
149 // Whether the user should see the topmost application surface (if there's one at all).
150− readonly property bool applicationSurfaceShouldBeSeen: applicationRunning && !stages.fullyHidden
150+ readonly property bool mainStageApplicationShown: mainStageApplicationRunning && !stages.fullyHidden
151 && !mainStage.usingScreenshots // but want sideStage animating over app surface
151 && !mainStage.usingScreenshots // but want sideStage animating over app surface
155 // NB! Application surfaces are stacked behing the shell one. So they can only be seen by the user
155 // NB! Application surfaces are stacked behing the shell one. So they can only be seen by the user
156 // through the translucent parts of the shell surface.
156 // through the translucent parts of the shell surface.
157− visible: !fullyCovered && !applicationSurfaceShouldBeSeen
157+ visible: !fullyCovered && !mainStageApplicationShown
159− Rectangle {
159+ Item {
160− anchors.fill: parent
160+ id: underlayClipper
161− color: "black"
161+ clip: !parent.mainStageApplicationShown && parent.sideStageApplicationRunning && stagesOuterContainer.showProgress > 0
162− opacity: dash.disappearingAnimationProgress
162+ width: {
164+ var w = parent.width - sideStage.width;
165+ console.log("UCW", stagesOuterContainer.x, stages.x, "\n");
166+ w += stagesOuterContainer.x + stages.x
167+ return Math.min(w, parent.width);
169+ return parent.width;
172+ height: parent.height
165− Image {
174+ Rectangle {
175+ width: underlay.width
176+ height: underlay.height
178+ opacity: dash.disappearingAnimationProgress
166− anchors.fill: dash
182+ anchors.fill: dash
167− source: shell.width > shell.height ? "Dash/graphics/paper_landscape.png" : "Dash/graphics/paper_portrait.png"
183+ source: shell.width > shell.height ? "Dash/graphics/paper_landscape.png" : "Dash/graphics/paper_portrait.png"
168− fillMode: Image.PreserveAspectCrop
184+ fillMode: Image.PreserveAspectCrop
169− horizontalAlignment: Image.AlignRight
185+ horizontalAlignment: Image.AlignRight
170− verticalAlignment: Image.AlignTop
186+ verticalAlignment: Image.AlignTop
193+ available: !greeter.shown && !lockscreen.shown
194+ hides: [stages, launcher, panel.indicators]
195+ shown: disappearingAnimationProgress !== 1.0
196+ enabled: disappearingAnimationProgress === 0.0 && edgeDemo.dashEnabled
197+ // FIXME: unfocus all applications when going back to the dash
200+ shell.applicationManager.unfocusCurrentApplication()
173− Dash {
204+ width: underlay.width
174− id: dash
205+ height: underlay.height - y
175− objectName: "dash"
206+ y: panel.panelHeight
177− available: !greeter.shown && !lockscreen.shown
208+ contentScale: 1.0 - 0.2 * disappearingAnimationProgress
178− hides: [stages, launcher, panel.indicators]
209+ opacity: 1.0 - disappearingAnimationProgress
179− shown: disappearingAnimationProgress !== 1.0
210+ property real disappearingAnimationProgress: {
180− enabled: disappearingAnimationProgress === 0.0 && edgeDemo.dashEnabled
211+ if (greeter.shown) {
181− // FIXME: unfocus all applications when going back to the dash
212+ return greeter.showProgress;
182− onEnabledChanged: {
213+ } else {
183− if (enabled) {
214+ if (underlayClipper.clip)
184− shell.applicationManager.unfocusCurrentApplication()
215+ return stagesOuterContainer.showProgress * 0.5;
217+ return stagesOuterContainer.showProgress;
188− anchors {
221+ // FIXME: only necessary because stagesOuterContainer.showProgress and
189− fill: parent
222+ // greeterRevealer.animatedProgress are not animated
190− topMargin: panel.panelHeight
223+ Behavior on disappearingAnimationProgress { SmoothedAnimation { velocity: 5 }}
193− contentScale: 1.0 - 0.2 * disappearingAnimationProgress
226+ AbstractButton {
194− opacity: 1.0 - disappearingAnimationProgress
195− property real disappearingAnimationProgress: {
196− if (greeter.shown) {
197− return greeter.showProgress;
199− return stagesOuterContainer.showProgress;
227+ enabled: stagesOuterContainer.showProgress == 1
228+ onEnabledChanged: console.log("AbstractButton enabled", enabled, "\n");
229+ anchors.fill: parent
231+ console.log("CLICKED\n");
203− // FIXME: only necessary because stagesOuterContainer.showProgress and
204− // greeterRevealer.animatedProgress are not animated
205− Behavior on disappearingAnimationProgress { SmoothedAnimation { velocity: 5 }}
@@ -548,8 +577,14 @@ FocusScope {
550 InputFilterArea {
579 InputFilterArea {
551− anchors.fill: parent
580+ width: {
581+ if (applicationManager.sideStageFocusedApplication)
582+ return parent.width - sideStage.width;
584+ return parent.width;
586+ height: parent.height
552− blockInput: !applicationFocused || greeter.shown || lockscreen.shown || launcher.shown
587+ blockInput: !applicationManager.mainStageFocusedApplication || greeter.shown || lockscreen.shown || launcher.shown
553 || panel.indicators.shown || hud.shown
588 || panel.indicators.shown || hud.shown