on xenial help sign in
drop stuff not needed any more
cc3002eMichael Zanetti
qml/Components/EdgeDemo.qml+5−6
@@ -22,7 +22,6 @@ Item {
22 id: demo
22 id: demo
23
23
24 property Item greeter
24 property Item greeter
25− property Item dash
26 property Item launcher
25 property Item launcher
27 property Item indicators
26 property Item indicators
28 property Item underlay
27 property Item underlay
@@ -144,7 +143,7 @@ Item {
144 "edge": "top",
143 "edge": "top",
145 "title": i18n.tr("Top edge"),
144 "title": i18n.tr("Top edge"),
146 "text": i18n.tr("Try swiping from the top edge to access the indicators"),
145 "text": i18n.tr("Try swiping from the top edge to access the indicators"),
147− "anchors.fill": demo.dash,
146+ "anchors.fill": demo.underlay,
148 });
147 });
149 }
148 }
150 if (d.topEdgeDemo) {
149 if (d.topEdgeDemo) {
@@ -193,12 +192,12 @@ Item {
193 function startLeftEdgeDemo() {
192 function startLeftEdgeDemo() {
194 demo.panelEnabled = false;
193 demo.panelEnabled = false;
195 demo.launcherEnabled = true;
194 demo.launcherEnabled = true;
196− if (demo.dash && demo.underlay) {
195+ if (demo.underlay) {
197 d.leftEdgeDemo = d.overlay.createObject(demo.underlay, {
196 d.leftEdgeDemo = d.overlay.createObject(demo.underlay, {
198 "edge": "left",
197 "edge": "left",
199 "title": i18n.tr("Left edge"),
198 "title": i18n.tr("Left edge"),
200 "text": i18n.tr("Swipe from the left to reveal the launcher for quick access to apps"),
199 "text": i18n.tr("Swipe from the left to reveal the launcher for quick access to apps"),
201− "anchors.fill": demo.dash,
200+ "anchors.fill": demo.underlay,
202 });
201 });
203 }
202 }
204 if (d.leftEdgeDemo) {
203 if (d.leftEdgeDemo) {
@@ -221,12 +220,12 @@ Item {
221
220
222 function startFinalEdgeDemo() {
221 function startFinalEdgeDemo() {
223 demo.launcherEnabled = false;
222 demo.launcherEnabled = false;
224− if (demo.dash && demo.underlay) {
223+ if (demo.underlay) {
225 d.finalEdgeDemo = d.overlay.createObject(demo.underlay, {
224 d.finalEdgeDemo = d.overlay.createObject(demo.underlay, {
226 "edge": "none",
225 "edge": "none",
227 "title": i18n.tr("Well done"),
226 "title": i18n.tr("Well done"),
228 "text": i18n.tr("You have now mastered the edge gestures and can start using the phone<br><br>Tap on the screen to start"),
227 "text": i18n.tr("You have now mastered the edge gestures and can start using the phone<br><br>Tap on the screen to start"),
229− "anchors.fill": demo.dash,
228+ "anchors.fill": demo.underlay,
230 "showSkip": false,
229 "showSkip": false,
231 });
230 });
232 }
231 }
qml/Shell.qml+7−88
@@ -26,7 +26,6 @@ import Utils 0.1
26import LightDM 0.1 as LightDM
26import LightDM 0.1 as LightDM
27import Powerd 0.1
27import Powerd 0.1
28import SessionBroadcast 0.1
28import SessionBroadcast 0.1
29−import "Dash"
30import "Greeter"
29import "Greeter"
31import "Launcher"
30import "Launcher"
32import "Panel"
31import "Panel"
@@ -123,35 +122,12 @@ Item {
123 visible: !fullyCovered
122 visible: !fullyCovered
124
123
125 Image {
124 Image {
126− anchors.fill: dash
125+ anchors.fill: underlay
127 source: shell.width > shell.height ? "Dash/graphics/paper_landscape.png" : "Dash/graphics/paper_portrait.png"
126 source: shell.width > shell.height ? "Dash/graphics/paper_landscape.png" : "Dash/graphics/paper_portrait.png"
128 fillMode: Image.PreserveAspectCrop
127 fillMode: Image.PreserveAspectCrop
129 horizontalAlignment: Image.AlignRight
128 horizontalAlignment: Image.AlignRight
130 verticalAlignment: Image.AlignTop
129 verticalAlignment: Image.AlignTop
131 }
130 }
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− }
155 }
131 }
156
132
157 EdgeDragArea {
133 EdgeDragArea {
@@ -188,55 +164,7 @@ Item {
188 objectName: "stages"
164 objectName: "stages"
189 width: parent.width
165 width: parent.width
190 height: parent.height
166 height: parent.height
191−
192− visible: !fullyHidden && !ApplicationManager.empty
167+ visible: !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− }
240
168
241 Connections {
169 Connections {
242 target: ApplicationManager
170 target: ApplicationManager
@@ -245,7 +173,6 @@ Item {
245 lockscreen.show();
173 lockscreen.show();
246 }
174 }
247 greeter.hide();
175 greeter.hide();
248− stages.show();
249 }
176 }
250
177
251 onFocusedApplicationIdChanged: {
178 onFocusedApplicationIdChanged: {
@@ -258,15 +185,6 @@ Item {
258 if (greeter.shown) {
185 if (greeter.shown) {
259 greeter.hide();
186 greeter.hide();
260 }
187 }
261− if (!stages.shown) {
262− stages.show();
263− }
264− }
265−
266− onEmptyChanged: {
267− if (ApplicationManager.empty) {
268− stages.hide();
269− }
270 }
188 }
271 }
189 }
272
190
@@ -459,7 +377,7 @@ Item {
459 Binding {
377 Binding {
460 target: applicationsDisplayLoader.item
378 target: applicationsDisplayLoader.item
461 property: "interactive"
379 property: "interactive"
462− value: stages.roughlyFullyShown && !greeter.shown && !lockscreen.shown
380+ value: !greeter.shown && !lockscreen.shown
463 }
381 }
464 Binding {
382 Binding {
465 target: applicationsDisplayLoader.item
383 target: applicationsDisplayLoader.item
@@ -686,7 +604,8 @@ Item {
686 }
604 }
687
605
688 var animate = !LightDM.Greeter.active && !stages.shown
606 var animate = !LightDM.Greeter.active && !stages.shown
607+ // FIXME: IPC to dash-app needed?
689− dash.setCurrentScope("clickscope", animate, false)
608+ //dash.setCurrentScope("clickscope", animate, false)
690 stages.hide()
609 stages.hide()
691 }
610 }
692
611
@@ -748,7 +667,8 @@ Item {
748
667
749 onShowDashHome: showHome()
668 onShowDashHome: showHome()
750 onDash: showDash()
669 onDash: showDash()
670+ // FIXME: IPC to dash-app needed?
751− onDashSwipeChanged: if (dashSwipe && stages.shown) dash.setCurrentScope("clickscope", false, true)
671+// onDashSwipeChanged: if (dashSwipe && stages.shown) dash.setCurrentScope("clickscope", false, true)
752 onLauncherApplicationSelected: {
672 onLauncherApplicationSelected: {
753 if (greeter.fakeActiveForApp !== "") {
673 if (greeter.fakeActiveForApp !== "") {
754 lockscreen.show()
674 lockscreen.show()
@@ -829,7 +749,6 @@ Item {
829 z: alphaDisclaimerLabel.z + 10
749 z: alphaDisclaimerLabel.z + 10
830 greeter: greeter
750 greeter: greeter
831 launcher: launcher
751 launcher: launcher
832− dash: dash
833 indicators: panel.indicators
752 indicators: panel.indicators
834 underlay: underlay
753 underlay: underlay
835 }
754 }
qml/Stages/PhoneStage.qml−8
@@ -100,14 +100,6 @@ Item {
100
100
101 }
101 }
102
102
103− Rectangle {
104− id: coverFlipBackground
105− anchors.fill: parent
106− color: "black"
107− visible: spreadView.visible
108− }
109−
110−
111 Flickable {
103 Flickable {
112 id: spreadView
104 id: spreadView
113 objectName: "spreadView"
105 objectName: "spreadView"