on xenial help sign in
hide items when they're not needed
4872f9aMichael Zanetti
qml/Stages/DesktopStage.qml+1
@@ -185,6 +185,7 @@ Rectangle {
185 itemScale: spreadMaths.scale
185 itemScale: spreadMaths.scale
186 itemScaleOriginY: decoratedWindow.height / 2;
186 itemScaleOriginY: decoratedWindow.height / 2;
187 z: index
187 z: index
188+ visible: spreadMaths.itemVisible
188 }
189 }
189 PropertyChanges {
190 PropertyChanges {
190 target: decoratedWindow
191 target: decoratedWindow
qml/Stages/SpreadMaths.qml+1
@@ -122,6 +122,7 @@ Item {
122 linearAnimation(1, 1.5, 1, 0, rightFoldingAreaProgress)
122 linearAnimation(1, 1.5, 1, 0, rightFoldingAreaProgress)
123 : 1
123 : 1
124
124
125+ readonly property bool itemVisible: itemIndex == totalItems - 1 ? true : leftFoldingAreaProgress < 5 && rightFoldingAreaProgress < 5
125
126
126 // Helpers
127 // Helpers
127 function linearAnimation(startProgress, endProgress, startValue, endValue, progress) {
128 function linearAnimation(startProgress, endProgress, startValue, endValue, progress) {