on xenial help sign in
add an animation transition when invoking the spread by hitting the right edge
bd81271Michael Zanetti
qml/Stages/DesktopStage.qml+26−14
@@ -302,6 +302,17 @@ Rectangle {
302 from: "maximized,minimized,normal,"
302 from: "maximized,minimized,normal,"
303 to: "maximized,minimized,normal,"
303 to: "maximized,minimized,normal,"
304 PropertyAnimation { target: appDelegate; properties: "x,y,opacity,width,height,scale" }
304 PropertyAnimation { target: appDelegate; properties: "x,y,opacity,width,height,scale" }
305+ },
306+ Transition {
307+ from: ""
308+ to: "altTab"
309+ PropertyAction { target: appDelegate; properties: "y,angle,z,itemScale,itemScaleOriginY" }
310+ PropertyAnimation {
311+ target: appDelegate; properties: "x"
312+ from: root.width
313+ duration: rightEdgePushArea.containsMouse ? UbuntuAnimation.FastDuration :0
314+ easing: UbuntuAnimation.StandardEasing
315+ }
305 }
316 }
306 ]
317 ]
307 property real angle: 0
318 property real angle: 0
@@ -616,19 +627,20 @@ Rectangle {
616 ]
627 ]
617
628
618 MouseArea {
629 MouseArea {
630+ id: rightEdgePushArea
619− anchors {
631+ anchors {
620− top: parent.top
632+ top: parent.top
621− right: parent.right
633+ right: parent.right
622− bottom: parent.bottom
634+ bottom: parent.bottom
623− }
635+ }
624− // TODO: Make this a push to edge thing like the launcher when we can,
636+ // TODO: Make this a push to edge thing like the launcher when we can,
625− // for now, yes, we want 1 pixel, regardless of the scaling
637+ // for now, yes, we want 1 pixel, regardless of the scaling
626− width: 1
638+ width: 1
627− hoverEnabled: true
639+ hoverEnabled: true
628− onContainsMouseChanged: {
640+ onContainsMouseChanged: {
629− if (containsMouse) {
641+ if (containsMouse) {
630− root.state = "altTab"
642+ root.state = "altTab";
631− }
643+ }
632− }
644+ }
633 }
645 }
634}
646}