on xenial help sign in
focusing animation tweaking
5cb13a6Michael Zanetti
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−
7unity8 (8.12+16.10.20160707-0ubuntu1) yakkety; urgency=medium
1unity8 (8.12+16.10.20160707-0ubuntu1) yakkety; urgency=medium
8
2
9 [ Michael Zanetti ]
3 [ Michael Zanetti ]
qml/Stages/DecoratedWindow.qml+1−1
@@ -143,7 +143,7 @@ FocusScope {
143 ]
143 ]
144 transitions: [
144 transitions: [
145 Transition {
145 Transition {
146− from: "*"; to: "*"
146+ from: "*"; to: "preview"
147 UbuntuNumberAnimation { properties: "width,height,itemScale,implicitWidth,implicitHeight"; duration: priv.animationDuration }
147 UbuntuNumberAnimation { properties: "width,height,itemScale,implicitWidth,implicitHeight"; duration: priv.animationDuration }
148 }
148 }
149 ]
149 ]
qml/Stages/DesktopStage.qml+15−21
@@ -129,7 +129,7 @@ AbstractStage {
129 property var foregroundMaximizedAppDelegate: null // for stuff like drop shadow and focusing maximized app by clicking panel
129 property var foregroundMaximizedAppDelegate: null // for stuff like drop shadow and focusing maximized app by clicking panel
130
130
131 property bool goneToSpread: false
131 property bool goneToSpread: false
132− property int animationDuration: /*UbuntuAnimation.FastDuration//*/ 4000//UbuntuAnimation.SleepyDuration
132+ property int animationDuration: UbuntuAnimation.FastDuration //4000//UbuntuAnimation.SleepyDuration
133
133
134 function updateForegroundMaximizedApp() {
134 function updateForegroundMaximizedApp() {
135 var found = false;
135 var found = false;
@@ -314,12 +314,6 @@ AbstractStage {
314 ]
314 ]
315 onStateChanged: print("spread going to state:", state)
315 onStateChanged: print("spread going to state:", state)
316
316
317− Spread {
318− id: spreadItem
319− anchors.fill: appContainer
320− totalItemCount: appRepeater.count
321− z: 10
322− }
323
317
324 FocusScope {
318 FocusScope {
325 id: appContainer
319 id: appContainer
@@ -335,6 +329,13 @@ AbstractStage {
335 fillMode: Image.PreserveAspectCrop
329 fillMode: Image.PreserveAspectCrop
336 }
330 }
337
331
332+ Spread {
333+ id: spreadItem
334+ anchors.fill: appContainer
335+ totalItemCount: appRepeater.count
336+ z: 10
337+ }
338+
338 Connections {
339 Connections {
339 target: root.topLevelSurfaceList
340 target: root.topLevelSurfaceList
340 onListChanged: priv.updateMainAndSideStageIndexes()
341 onListChanged: priv.updateMainAndSideStageIndexes()
@@ -734,6 +735,7 @@ AbstractStage {
734 itemScale: spreadMaths.scale
735 itemScale: spreadMaths.scale
735 scaleToPreviewSize: spreadItem.stackHeight
736 scaleToPreviewSize: spreadItem.stackHeight
736 scaleToPreview: true
737 scaleToPreview: true
738+ hasDecoration: root.mode === "windowed"
737 }
739 }
738 PropertyChanges {
740 PropertyChanges {
739 target: appDelegate
741 target: appDelegate
@@ -907,6 +909,12 @@ AbstractStage {
907 PropertyAction { target: appDelegate; properties: "visuallyMinimized,visuallyMaximized" }
909 PropertyAction { target: appDelegate; properties: "visuallyMinimized,visuallyMaximized" }
908 UbuntuNumberAnimation { target: appDelegate; properties: "x,y,opacity,requestedWidth,requestedHeight,scale"; duration: priv.animationDuration }
910 UbuntuNumberAnimation { target: appDelegate; properties: "x,y,opacity,requestedWidth,requestedHeight,scale"; duration: priv.animationDuration }
909 },
911 },
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+ },
910 Transition {
918 Transition {
911 to: "minimized"
919 to: "minimized"
912 enabled: appDelegate.animationsEnabled
920 enabled: appDelegate.animationsEnabled
@@ -946,11 +954,6 @@ AbstractStage {
946 UbuntuNumberAnimation { target: appDelegate; properties: "x,y,height"; duration: priv.animationDuration }
954 UbuntuNumberAnimation { target: appDelegate; properties: "x,y,height"; duration: priv.animationDuration }
947 UbuntuNumberAnimation { target: decoratedWindow; properties: "width,height,itemScale,angle"; duration: priv.animationDuration }
955 UbuntuNumberAnimation { target: decoratedWindow; properties: "width,height,itemScale,angle"; duration: priv.animationDuration }
948 },
956 },
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− },
954 Transition {
957 Transition {
955 from: "normal,staged"; to: "stagedWithSideStage"
958 from: "normal,staged"; to: "stagedWithSideStage"
956 UbuntuNumberAnimation { target: appDelegate; properties: "x,y"; duration: priv.animationDuration }
959 UbuntuNumberAnimation { target: appDelegate; properties: "x,y"; duration: priv.animationDuration }
@@ -1303,13 +1306,4 @@ AbstractStage {
1303 }
1306 }
1304 }
1307 }
1305 }
1308 }
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− }
1315}
1309}
qml/Stages/Spread/Spread.qml+14−4
@@ -86,10 +86,20 @@ Item {
86 elide: Qt.ElideMiddle
86 elide: Qt.ElideMiddle
87 anchors.horizontalCenter: parent.horizontalCenter
87 anchors.horizontalCenter: parent.horizontalCenter
88 y: windowTitleTopMargin
88 y: windowTitleTopMargin
89− //y: priv.spreadTopMargin + priv.contentTopMargin + settings.spreadOffset + settings.titleOffset - height - (priv.contentTopMargin - height) / 4
89+// //y: priv.spreadTopMargin + priv.contentTopMargin + settings.spreadOffset + settings.titleOffset - height - (priv.contentTopMargin - height) / 4
90− visible: height < priv.contentTopMargin
90+// visible: height < priv.contentTopMargin
91− text: 'focused window title'
91+ text: "focused window title"
92 fontSize: root.height < units.gu(85) ? 'medium' : 'large'
92 fontSize: root.height < units.gu(85) ? 'medium' : 'large'
93− color: 'white'
93+ color: "white"
94 }
94 }
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+
95}
105}