on xenial help sign in
Make background look right for a launcher-drag too
commit365c2f3cb518c0f547559352be546c4caaa97d83 authorMichael Terry <michael.terry@canonical.com> dateThu 10 Apr 2014, 10:22 (13 years ago) parent9f6ce9e
1 file changed+11−8
qml/Shell.qml+11−8
qml/Shell.qml+11−8
@@ -148,8 +148,8 @@ FocusScope {
148148
149149 available: !greeter.shown && !lockscreen.shown
150150 hides: [stages, launcher, panel.indicators]
151− shown: disappearingAnimationProgress !== 1.0 && greeter.showProgress !== 1.0
152− enabled: disappearingAnimationProgress === 0.0 && greeter.showProgress === 0.0 && edgeDemo.dashEnabled
151+ shown: disappearingAnimationProgress !== 1.0 && greeterWrapper.showProgress !== 1.0
152+ enabled: disappearingAnimationProgress === 0.0 && greeterWrapper.showProgress === 0.0 && edgeDemo.dashEnabled
153153
154154 anchors {
155155 fill: parent
@@ -362,8 +362,15 @@ FocusScope {
362362 }
363363 }
364364
365+ Rectangle {
366+ anchors.fill: parent
367+ color: "black"
368+ opacity: greeterWrapper.showProgress * 0.8
369+ }
370+
365371 Item {
366372 // Just a tiny wrapper to adjust greeter's x without messing with its own dragging
373+ id: greeterWrapper
367374 x: launcher.progress
368375 y: panel.panelHeight
369376 width: parent.width
@@ -371,11 +378,7 @@ FocusScope {
371378
372379 Behavior on x {SmoothedAnimation{velocity: 600}}
373380
374− Rectangle {
375− anchors.fill: parent
376− color: "black"
377− opacity: (1 - Math.abs(greeter.x) / shell.width) * 0.8
378− }
381+ readonly property real showProgress: x === 0.0 ? greeter.showProgress : (1 - x/width)
379382
380383 Greeter {
381384 id: greeter
@@ -417,7 +420,7 @@ FocusScope {
417420 Binding {
418421 target: ApplicationManager
419422 property: "suspended"
420− value: greeter.shown && greeter.showProgress == 1
423+ value: greeter.shown && greeterWrapper.showProgress == 1
421424 }
422425 }
423426 }