on xenial help sign in
focusing animation tweaking
commit5cb13a6b6ea7a62627d961aa6c749f16c3fe4d9b authorMichael Zanetti <michael.zanetti@canonical.com> dateThu 14 Jul 2016, 17:51 (10 years ago) parent88ced03
4 files changed+30−32
debian/changelog−6 qml/Stages/DecoratedWindow.qml+1−1 qml/Stages/DesktopStage.qml+15−21 qml/Stages/Spread/Spread.qml+14−4
debian/changelog−6
@@ -1,9 +1,3 @@
1−unity8 (8.12+16.10.20160707-0ubuntu1local~1468504442) UNRELEASED; urgency=medium
2−
3− * ''
4−
5− -- Michael Zanetti <michael.zanetti@canonical.com> Thu, 14 Jul 2016 15:54:05 +0200
6−
71unity8 (8.12+16.10.20160707-0ubuntu1) yakkety; urgency=medium
82
93 [ Michael Zanetti ]
qml/Stages/DecoratedWindow.qml+1−1
@@ -143,7 +143,7 @@ FocusScope {
143143 ]
144144 transitions: [
145145 Transition {
146− from: "*"; to: "*"
146+ from: "*"; to: "preview"
147147 UbuntuNumberAnimation { properties: "width,height,itemScale,implicitWidth,implicitHeight"; duration: priv.animationDuration }
148148 }
149149 ]
qml/Stages/DesktopStage.qml+15−21
@@ -129,7 +129,7 @@ AbstractStage {
129129 property var foregroundMaximizedAppDelegate: null // for stuff like drop shadow and focusing maximized app by clicking panel
130130
131131 property bool goneToSpread: false
132− property int animationDuration: /*UbuntuAnimation.FastDuration//*/ 4000//UbuntuAnimation.SleepyDuration
132+ property int animationDuration: UbuntuAnimation.FastDuration //4000//UbuntuAnimation.SleepyDuration
133133
134134 function updateForegroundMaximizedApp() {
135135 var found = false;
@@ -314,12 +314,6 @@ AbstractStage {
314314 ]
315315 onStateChanged: print("spread going to state:", state)
316316
317− Spread {
318− id: spreadItem
319− anchors.fill: appContainer
320− totalItemCount: appRepeater.count
321− z: 10
322− }
323317
324318 FocusScope {
325319 id: appContainer
@@ -335,6 +329,13 @@ AbstractStage {
335329 fillMode: Image.PreserveAspectCrop
336330 }
337331
332+ Spread {
333+ id: spreadItem
334+ anchors.fill: appContainer
335+ totalItemCount: appRepeater.count
336+ z: 10
337+ }
338+
338339 Connections {
339340 target: root.topLevelSurfaceList
340341 onListChanged: priv.updateMainAndSideStageIndexes()
@@ -734,6 +735,7 @@ AbstractStage {
734735 itemScale: spreadMaths.scale
735736 scaleToPreviewSize: spreadItem.stackHeight
736737 scaleToPreview: true
738+ hasDecoration: root.mode === "windowed"
737739 }
738740 PropertyChanges {
739741 target: appDelegate
@@ -907,6 +909,12 @@ AbstractStage {
907909 PropertyAction { target: appDelegate; properties: "visuallyMinimized,visuallyMaximized" }
908910 UbuntuNumberAnimation { target: appDelegate; properties: "x,y,opacity,requestedWidth,requestedHeight,scale"; duration: priv.animationDuration }
909911 },
912+ Transition {
913+ from: "spread"; to: "staged,normal"
914+// UbuntuNumberAnimation { target: appDelegate; properties: "x,y,height"; duration: priv.animationDuration }
915+// UbuntuNumberAnimation { target: decoratedWindow; properties: "width,height,itemScale,angle"; duration: priv.animationDuration }
916+ ScriptAction { script: if (appDelegate.focus) appDelegate.playFocusAnimation() }
917+ },
910918 Transition {
911919 to: "minimized"
912920 enabled: appDelegate.animationsEnabled
@@ -946,11 +954,6 @@ AbstractStage {
946954 UbuntuNumberAnimation { target: appDelegate; properties: "x,y,height"; duration: priv.animationDuration }
947955 UbuntuNumberAnimation { target: decoratedWindow; properties: "width,height,itemScale,angle"; duration: priv.animationDuration }
948956 },
949− Transition {
950− from: "spread"; to: "staged,normal"
951− UbuntuNumberAnimation { target: appDelegate; properties: "x,y,height"; duration: priv.animationDuration }
952− UbuntuNumberAnimation { target: decoratedWindow; properties: "width,height,itemScale,angle"; duration: priv.animationDuration }
953− },
954957 Transition {
955958 from: "normal,staged"; to: "stagedWithSideStage"
956959 UbuntuNumberAnimation { target: appDelegate; properties: "x,y"; duration: priv.animationDuration }
@@ -1303,13 +1306,4 @@ AbstractStage {
13031306 }
13041307 }
13051308 }
1306−
1307− Label {
1308− anchors { left: parent.left; top: parent.top; margins: units.gu(4) }
1309− text: "spreadWidth: " + spreadItem.spreadWidth
1310− + "\n spreadItemWidth: " + spreadItem.spreadItemWidth
1311− + "\n flickableContentWidth: " + floatingFlickable.contentWidth
1312− + "\n visibleItemCount: " + spreadItem.visibleItemCount
1313− + "\n contentTopMargin: " + spreadItem.contentTopMargin
1314− }
13151309}
qml/Stages/Spread/Spread.qml+14−4
@@ -86,10 +86,20 @@ Item {
8686 elide: Qt.ElideMiddle
8787 anchors.horizontalCenter: parent.horizontalCenter
8888 y: windowTitleTopMargin
89− //y: priv.spreadTopMargin + priv.contentTopMargin + settings.spreadOffset + settings.titleOffset - height - (priv.contentTopMargin - height) / 4
90− visible: height < priv.contentTopMargin
91− text: 'focused window title'
89+// //y: priv.spreadTopMargin + priv.contentTopMargin + settings.spreadOffset + settings.titleOffset - height - (priv.contentTopMargin - height) / 4
90+// visible: height < priv.contentTopMargin
91+ text: "focused window title"
9292 fontSize: root.height < units.gu(85) ? 'medium' : 'large'
93− color: 'white'
93+ color: "white"
9494 }
95+
96+// Label {
97+// anchors { left: parent.left; top: parent.top; margins: units.gu(4) }
98+// text: "spreadWidth: " + spreadWidth
99+// + "\n spreadItemWidth: " + spreadItemWidth
100+// + "\n flickableContentWidth: " + spreadTotalWidth
101+// + "\n visibleItemCount: " + visibleItemCount
102+// + "\n contentTopMargin: " + contentTopMargin
103+// }
104+
95105}