on xenial help sign in
improve dropshadow in the stack
e13e787Michael Zanetti
qml/Stages/DecoratedWindow.qml+2−2
@@ -29,6 +29,7 @@ FocusScope {
29
29
30 property bool decorationShown: true
30 property bool decorationShown: true
31 property bool highlightShown: false
31 property bool highlightShown: false
32+ property real shadowOpacity: 1
32
33
33 property int windowWidth: width
34 property int windowWidth: width
34 property int windowHeight: height
35 property int windowHeight: height
@@ -67,8 +68,7 @@ FocusScope {
67 margins: -units.gu(2)
68 margins: -units.gu(2)
68 }
69 }
69 source: "graphics/dropshadow2gu.sci"
70 source: "graphics/dropshadow2gu.sci"
70− opacity: .3
71+ opacity: root.shadowOpacity * .3
71− Behavior on opacity { UbuntuNumberAnimation {} }
72 }
72 }
73
73
74 Rectangle {
74 Rectangle {
qml/Stages/DesktopStage.qml+1
@@ -194,6 +194,7 @@ Rectangle {
194 state: "transformed"
194 state: "transformed"
195 width: spreadMaths.spreadHeight
195 width: spreadMaths.spreadHeight
196 height: spreadMaths.spreadHeight
196 height: spreadMaths.spreadHeight
197+ shadowOpacity: spreadMaths.shadowOpacity
197 }
198 }
198 PropertyChanges {
199 PropertyChanges {
199 target: tileInfo
200 target: tileInfo
qml/Stages/SpreadMaths.qml+8
@@ -123,6 +123,14 @@ Item {
123 : 1
123 : 1
124
124
125 readonly property bool itemVisible: itemIndex == totalItems - 1 ? true : leftFoldingAreaProgress < 5 && rightFoldingAreaProgress < 5
125 readonly property bool itemVisible: itemIndex == totalItems - 1 ? true : leftFoldingAreaProgress < 5 && rightFoldingAreaProgress < 5
126+ readonly property real shadowOpacity: itemIndex == totalItems -1 ?
127+ 1
128+ : leftFoldingAreaProgress > 3 ?
129+ linearAnimation(3, 3.5, 1, 0, leftFoldingAreaProgress)
130+ : rightFoldingAreaProgress > 3 ?
131+ linearAnimation(3, 3.5, 1, 0, rightFoldingAreaProgress)
132+ : 1
133+
126
134
127 // Helpers
135 // Helpers
128 function linearAnimation(startProgress, endProgress, startValue, endValue, progress) {
136 function linearAnimation(startProgress, endProgress, startValue, endValue, progress) {