on xenial help sign in
some more progress
95d9b5aMichael Zanetti
qml/Stages/DecoratedWindow.qml+6−2
@@ -23,8 +23,8 @@ import Unity.Application 0.1
23FocusScope {
23FocusScope {
24 id: root
24 id: root
25
25
26− implicitWidth: !counterRotate ? applicationWindow.width : applicationWindow.height
26+ implicitWidth: !counterRotate ? applicationWindow.implicitWidth : applicationWindow.implicitHeight
27− implicitHeight: visibleDecorationHeight + (!counterRotate ? applicationWindow.height : applicationWindow.width)
27+ implicitHeight: visibleDecorationHeight + (!counterRotate ? applicationWindow.implicitHeight : applicationWindow.implicitWidth)
28
28
29 property alias application: applicationWindow.application
29 property alias application: applicationWindow.application
30 property alias surface: applicationWindow.surface
30 property alias surface: applicationWindow.surface
@@ -120,6 +120,10 @@ FocusScope {
120 interactive: true
120 interactive: true
121 focus: true
121 focus: true
122
122
123+ Behavior on anchors.topMargin {
124+ UbuntuNumberAnimation { duration: 4000 }
125+ }
126+
123 transform: Rotation {
127 transform: Rotation {
124 readonly property int rotationAngle: applicationWindow.application &&
128 readonly property int rotationAngle: applicationWindow.application &&
125 applicationWindow.application.rotatesWindowContents
129 applicationWindow.application.rotatesWindowContents
qml/Stages/DesktopStage.qml+26−30
@@ -128,7 +128,7 @@ AbstractStage {
128 property var foregroundMaximizedAppDelegate: null // for stuff like drop shadow and focusing maximized app by clicking panel
128 property var foregroundMaximizedAppDelegate: null // for stuff like drop shadow and focusing maximized app by clicking panel
129
129
130 property bool goneToSpread: false
130 property bool goneToSpread: false
131− property int animationDuration: UbuntuAnimation.SleepyDuration
131+ property int animationDuration: 4000//UbuntuAnimation.SleepyDuration
132
132
133 function updateForegroundMaximizedApp() {
133 function updateForegroundMaximizedApp() {
134 var found = false;
134 var found = false;
@@ -554,6 +554,8 @@ AbstractStage {
554 y: spreadMaths.animatedY
554 y: spreadMaths.animatedY
555 z: index
555 z: index
556 height: decoratedWindow.height + windowInfoItem.height + units.gu(2)
556 height: decoratedWindow.height + windowInfoItem.height + units.gu(2)
557+ requestedWidth: decoratedWindow.oldRequestedWidth
558+ requestedHeight: decoratedWindow.oldRequestedHeight
557 }
559 }
558 PropertyChanges {
560 PropertyChanges {
559 target: decoratedWindow;
561 target: decoratedWindow;
@@ -561,8 +563,6 @@ AbstractStage {
561 height: units.gu(40)
563 height: units.gu(40)
562 width: units.gu(40)
564 width: units.gu(40)
563 angle: spreadMaths.animatedAngle
565 angle: spreadMaths.animatedAngle
564− requestedWidth: decoratedWindow.oldRequestedWidth
565− requestedHeight: decoratedWindow.oldRequestedHeight
566 }
566 }
567 PropertyChanges { target: inputBlocker; enabled: true }
567 PropertyChanges { target: inputBlocker; enabled: true }
568 PropertyChanges { target: windowInfoItem; opacity: 1 }
568 PropertyChanges { target: windowInfoItem; opacity: 1 }
@@ -584,9 +584,9 @@ AbstractStage {
584 target: decoratedWindow;
584 target: decoratedWindow;
585 showDecoration: false
585 showDecoration: false
586 requestedWidth: stagedRightEdgeMaths.animatedWidth
586 requestedWidth: stagedRightEdgeMaths.animatedWidth
587− requestedHeight: stagedRightEdgeMaths.animatedHeight
587+ requestedHeight: stagedRightEdgeMaths.animatedHeight - PanelState.panelHeight
588− width: appContainer.width - root.leftMargin
588+// width: appContainer.width - root.leftMargin
589− height: appContainer.height
589+// height: appContainer.height
590 angle: stagedRightEdgeMaths.animatedAngle
590 angle: stagedRightEdgeMaths.animatedAngle
591 }
591 }
592 },
592 },
@@ -596,14 +596,12 @@ AbstractStage {
596 target: appDelegate
596 target: appDelegate
597 x: appDelegate.focus ? 0 : root.width
597 x: appDelegate.focus ? 0 : root.width
598 y: appDelegate.fullscreen ? 0 : PanelState.panelHeight
598 y: appDelegate.fullscreen ? 0 : PanelState.panelHeight
599+ requestedWidth: appContainer.width
600+ requestedHeight: appContainer.height - PanelState.panelHeight
599 visuallyMaximized: true
601 visuallyMaximized: true
600 }
602 }
601 PropertyChanges {
603 PropertyChanges {
602 target: decoratedWindow
604 target: decoratedWindow
603− requestedWidth: appContainer.width - root.leftMargin;
604− requestedHeight: appContainer.height;
605− width: requestedWidth
606− height: requestedHeight
607 showDecoration: false
605 showDecoration: false
608 }
606 }
609 PropertyChanges {
607 PropertyChanges {
@@ -619,9 +617,6 @@ AbstractStage {
619 y: 0;
617 y: 0;
620 visuallyMinimized: false;
618 visuallyMinimized: false;
621 visuallyMaximized: true
619 visuallyMaximized: true
622− }
623− PropertyChanges {
624− target: decoratedWindow
625 requestedWidth: appContainer.width - root.leftMargin;
620 requestedWidth: appContainer.width - root.leftMargin;
626 requestedHeight: appContainer.height;
621 requestedHeight: appContainer.height;
627 }
622 }
@@ -642,12 +637,7 @@ AbstractStage {
642 PropertyChanges {
637 PropertyChanges {
643 target: appDelegate;
638 target: appDelegate;
644 visuallyMinimized: false;
639 visuallyMinimized: false;
645− visuallyMaximized: false
640+ visuallyMaximized: false;
646− }
647− PropertyChanges {
648− target: decoratedWindow
649− width: appDelegate.width
650− height: appDelegate.height
651 }
641 }
652 },
642 },
653 State {
643 State {
@@ -704,8 +694,7 @@ AbstractStage {
704 to: "normal"
694 to: "normal"
705 enabled: appDelegate.animationsEnabled
695 enabled: appDelegate.animationsEnabled
706 PropertyAction { target: appDelegate; properties: "visuallyMinimized,visuallyMaximized" }
696 PropertyAction { target: appDelegate; properties: "visuallyMinimized,visuallyMaximized" }
707− UbuntuNumberAnimation { target: appDelegate; properties: "x,y,opacity,requestedWidth,requestedHeight,scale"; duration: UbuntuAnimation.FastDuration }
697+ UbuntuNumberAnimation { target: appDelegate; properties: "x,y,opacity,requestedWidth,requestedHeight,scale"; duration: priv.animationDuration }
708− UbuntuNumberAnimation { target: decoratedWindow; properties: "requestedWidth,requestedHeight"; duration: UbuntuAnimation.FastDuration }
709 },
698 },
710 Transition {
699 Transition {
711 to: "minimized"
700 to: "minimized"
@@ -713,8 +702,8 @@ AbstractStage {
713 PropertyAction { target: appDelegate; property: "visuallyMaximized" }
702 PropertyAction { target: appDelegate; property: "visuallyMaximized" }
714 SequentialAnimation {
703 SequentialAnimation {
715 ParallelAnimation {
704 ParallelAnimation {
716− UbuntuNumberAnimation { target: appDelegate; properties: "x,y,opacity,scale"; duration: UbuntuAnimation.FastDuration }
705+ UbuntuNumberAnimation { target: appDelegate; properties: "x,y,opacity,scale"; duration: priv.animationDuration }
717− UbuntuNumberAnimation { target: decoratedWindow; properties: "requestedWidth,requestedHeight"; duration: UbuntuAnimation.FastDuration }
706+ UbuntuNumberAnimation { target: decoratedWindow; properties: "requestedWidth,requestedHeight"; duration: priv.animationDuration }
718 }
707 }
719 PropertyAction { target: appDelegate; property: "visuallyMinimized" }
708 PropertyAction { target: appDelegate; property: "visuallyMinimized" }
720 ScriptAction {
709 ScriptAction {
@@ -728,13 +717,12 @@ AbstractStage {
728 }
717 }
729 },
718 },
730 Transition {
719 Transition {
731− to: "maximized,fullscreen" //maximized and fullscreen
720+ to: "maximized,fullscreen"
732 enabled: appDelegate.animationsEnabled
721 enabled: appDelegate.animationsEnabled
733− PropertyAction { target: appDelegate; property: "visuallyMinimized" }
734 SequentialAnimation {
722 SequentialAnimation {
723+ PropertyAction { target: appDelegate; property: "visuallyMinimized" }
735 ParallelAnimation {
724 ParallelAnimation {
736− UbuntuNumberAnimation { target: appDelegate; properties: "x,y,opacity,scale"; duration: UbuntuAnimation.FastDuration }
725+ UbuntuNumberAnimation { target: appDelegate; properties: "x,y,opacity,scale,requestedWidth,requestedHeight"; duration: UbuntuAnimation.FastDuration }
737− UbuntuNumberAnimation { target: decoratedWindow; properties: "requestedWidth,requestedHeight"; duration: UbuntuAnimation.FastDuration }
738 }
726 }
739 PropertyAction { target: appDelegate; property: "visuallyMaximized" }
727 PropertyAction { target: appDelegate; property: "visuallyMaximized" }
740 }
728 }
@@ -745,14 +733,20 @@ AbstractStage {
745 PropertyAnimation { target: decoratedWindow; properties: "width,height,angle"; duration: priv.animationDuration }
733 PropertyAnimation { target: decoratedWindow; properties: "width,height,angle"; duration: priv.animationDuration }
746 },
734 },
747 Transition {
735 Transition {
748− from: "spread"; to: "staged"
736+ from: "spread"; to: "staged,normal"
749 PropertyAnimation { target: appDelegate; properties: "x,y,height"; duration: priv.animationDuration }
737 PropertyAnimation { target: appDelegate; properties: "x,y,height"; duration: priv.animationDuration }
750 PropertyAnimation { target: decoratedWindow; properties: "angle,width,height"; duration: priv.animationDuration }
738 PropertyAnimation { target: decoratedWindow; properties: "angle,width,height"; duration: priv.animationDuration }
751 },
739 },
752 Transition {
740 Transition {
753− from: "windowed"; to: "staged";
741+ from: "normal"; to: "staged";
754− PropertyAnimation { target: appDelegate; properties: "x,y,width,height"; duration: priv.animationDuration }
742+ PropertyAnimation { target: appDelegate; properties: "x,y,requestedWidth,requestedHeight"; duration: priv.animationDuration }
743+ },
744+ Transition {
745+ to: "staged"
746+ PropertyAnimation { target: appDelegate; properties: "x,y"; duration: priv.animationDuration }
747+ PropertyAnimation { target: appDelegate; properties: "requestedWidth,requestedHeight"; duration: priv.animationDuration }
755 }
748 }
749+
756 ]
750 ]
757
751
758// Binding {
752// Binding {
@@ -821,6 +815,8 @@ AbstractStage {
821 focus: true
815 focus: true
822 showDecoration: true
816 showDecoration: true
823 overlayShown: touchControls.overlayShown
817 overlayShown: touchControls.overlayShown
818+ width: implicitWidth
819+ height: implicitHeight
824
820
825 requestedWidth: appDelegate.requestedWidth
821 requestedWidth: appDelegate.requestedWidth
826 requestedHeight: appDelegate.requestedHeight
822 requestedHeight: appDelegate.requestedHeight