on xenial help sign in
made some more props readonly
07e1b1bMichael Zanetti
qml/Stages/TransformedSpreadDelegate.qml+6−6
@@ -129,7 +129,7 @@ SpreadDelegate {
129 // All tiles are kept in place and faded out to 0 opacity except
129 // All tiles are kept in place and faded out to 0 opacity except
130 // the selected tile, which is animated from the snapshotted position to be fullscreen.
130 // the selected tile, which is animated from the snapshotted position to be fullscreen.
131
131
132− property real xTranslate: {
132+ readonly property real xTranslate: {
133 if (otherSelected) {
133 if (otherSelected) {
134 if (spreadView.phase < 2 && index == 0) {
134 if (spreadView.phase < 2 && index == 0) {
135 return linearAnimation(selectedProgress, 0, selectedXTranslate,
135 return linearAnimation(selectedProgress, 0, selectedXTranslate,
@@ -175,12 +175,12 @@ SpreadDelegate {
175 // Fix it at the right edge...
175 // Fix it at the right edge...
176 var rightEdgeOffset = -((index - 1) * root.startDistance);
176 var rightEdgeOffset = -((index - 1) * root.startDistance);
177 // ...and use our easing to move them to the left. Stop a bit earlier for each tile
177 // ...and use our easing to move them to the left. Stop a bit earlier for each tile
178− var animatedEndDistance = linearAnimation(0, 2, root.endDistance, 0, root.progress)
178+ var animatedEndDistance = linearAnimation(0, 2, root.endDistance, 0, root.progress);
179 return -easingCurve.value * spreadView.width + (index * animatedEndDistance) + rightEdgeOffset;
179 return -easingCurve.value * spreadView.width + (index * animatedEndDistance) + rightEdgeOffset;
180
180
181 }
181 }
182
182
183− property real angle: {
183+ readonly property real angle: {
184 if (spreadView.focusChanging) {
184 if (spreadView.focusChanging) {
185 return 0;
185 return 0;
186 }
186 }
@@ -213,7 +213,7 @@ SpreadDelegate {
213 return root.startAngle - easingCurve.value * (root.startAngle - root.endAngle);
213 return root.startAngle - easingCurve.value * (root.startAngle - root.endAngle);
214 }
214 }
215
215
216− property real scale: {
216+ readonly property real scale: {
217 if (spreadView.focusChanging) {
217 if (spreadView.focusChanging) {
218 return 1;
218 return 1;
219 }
219 }
@@ -246,7 +246,7 @@ SpreadDelegate {
246 return root.startScale - easingCurve.value * (root.startScale - root.endScale);
246 return root.startScale - easingCurve.value * (root.startScale - root.endScale);
247 }
247 }
248
248
249− property real opacity: {
249+ readonly property real opacity: {
250 if (priv.otherSelected) {
250 if (priv.otherSelected) {
251 return linearAnimation (selectedProgress, Math.max(0, selectedProgress - .5),
251 return linearAnimation (selectedProgress, Math.max(0, selectedProgress - .5),
252 selectedOpacity, 0, root.progress);
252 selectedOpacity, 0, root.progress);
@@ -264,7 +264,7 @@ SpreadDelegate {
264 return 1;
264 return 1;
265 }
265 }
266
266
267− property real topMarginProgress: {
267+ readonly property real topMarginProgress: {
268 if (priv.isSelected) {
268 if (priv.isSelected) {
269 return linearAnimation(selectedProgress, 0, selectedTopMarginProgress, 0, root.progress);
269 return linearAnimation(selectedProgress, 0, selectedTopMarginProgress, 0, root.progress);
270 }
270 }