on xenial help sign in
experiment with perspective
74b953aMichael Zanetti
Launcher/LauncherDelegate.qml+30−5
@@ -23,6 +23,8 @@ Item {
23 property string iconName
23 property string iconName
24
24
25 property real angle: 0
25 property real angle: 0
26+
27+ onAngleChanged: if (index == 1) print("onAngleChanged", angle)
26 property bool highlighted: false
28 property bool highlighted: false
27 property real offset: 0
29 property real offset: 0
28 property alias brightness: transformEffect.brightness
30 property alias brightness: transformEffect.brightness
@@ -103,11 +105,32 @@ Item {
103 hideSource: true
105 hideSource: true
104 }
106 }
105
107
106− transform: Rotation {
108+ transform: [
109+ Rotation {
107− axis { x: 1; y: 0; z: 0 }
110+ axis { x: 1; y: 0; z: 0 }
108− origin { x: iconItem.width / 2; y: iconItem.height / 2; z: 0 }
111+ origin { x: iconItem.width / 2; y: angle > 0 ? 0 : iconItem.height; z: 0 }
112+ angle: root.angle * 0.8
113+ },
114+ Rotation {
115+ axis { x: 1; y: 0; z: 0 }
116+ origin { x: iconItem.width / 2; y: angle > 0 ? 0 : iconItem.height; z: 0 }
117+ angle: root.angle * 0.8
118+ },
119+ Rotation {
120+ axis { x: 1; y: 0; z: 0 }
121+ origin { x: iconItem.width / 2; y: angle > 0 ? 0 : iconItem.height; z: 0 }
109− angle: root.angle
122+ angle: root.angle * 0.8
110− }
123+ },
124+ Scale {
125+ xScale: 1 - (Math.abs(angle) / 500)
126+ yScale: 1 - (Math.abs(angle) / 500)
127+ origin { x: iconItem.width / 2; y: iconItem.height / 2}
128+ },
129+ Translate {
130+ y: -(root.height - root.effectiveHeight) * priv.orientationFlag
131+ }
132+
133+ ]
111
134
112/* vertexShader: "
135/* vertexShader: "
113 uniform highp mat4 qt_Matrix;
136 uniform highp mat4 qt_Matrix;
@@ -172,6 +195,7 @@ Item {
172
195
173 // Are we already completely outside the flickable? Stop the icon here.
196 // Are we already completely outside the flickable? Stop the icon here.
174 if (priv.distanceFromEdge < -priv.totalUnfoldedHeight) {
197 if (priv.distanceFromEdge < -priv.totalUnfoldedHeight) {
198+ return (-priv.distanceFromEdge - (root.height - effectiveHeight)) * priv.orientationFlag;
175 return (-priv.distanceFromEdge - effectiveHeight) * priv.orientationFlag
199 return (-priv.distanceFromEdge - effectiveHeight) * priv.orientationFlag
176 }
200 }
177
201
@@ -185,6 +209,7 @@ Item {
185 }
209 }
186
210
187 angle: {
211 angle: {
212+ //return 0;
188 // First item is special
213 // First item is special
189 if (index == 0 || index == iconRepeater.count-1) {
214 if (index == 0 || index == iconRepeater.count-1) {
190 if (priv.distanceFromEdge < 0) {
215 if (priv.distanceFromEdge < 0) {
Launcher/LauncherPanel.qml+1−1
@@ -25,7 +25,7 @@ Item {
25 rotation: inverted ? 180 : 0
25 rotation: inverted ? 180 : 0
26
26
27 property var model
27 property var model
28− property bool inverted: true
28+ property bool inverted: false
29 property bool dragging: false
29 property bool dragging: false
30 property bool moving: launcherFlickable.moving
30 property bool moving: launcherFlickable.moving
31 property int dragPosition: 0
31 property int dragPosition: 0