on xenial help sign in
add some semicolons to follow style guide
effa0a4Michael Zanetti
qml/Stages/TabletStage.qml+13−13
@@ -107,7 +107,7 @@ Item {
107 if (spreadView.interactive) {
107 if (spreadView.interactive) {
108 spreadView.snapTo(priv.indexOf(appId));
108 spreadView.snapTo(priv.indexOf(appId));
109 } else {
109 } else {
110− ApplicationManager.focusApplication(appId)
110+ ApplicationManager.focusApplication(appId);
111 }
111 }
112 }
112 }
113
113
@@ -158,8 +158,8 @@ Item {
158
158
159 onSideStageDragProgressChanged: {
159 onSideStageDragProgressChanged: {
160 if (sideStageDragProgress == 1) {
160 if (sideStageDragProgress == 1) {
161− ApplicationManager.focusApplication(priv.mainStageAppId)
161+ ApplicationManager.focusApplication(priv.mainStageAppId);
162− priv.sideStageAppId = ""
162+ priv.sideStageAppId = "";
163 }
163 }
164 }
164 }
165
165
@@ -234,7 +234,7 @@ Item {
234 snapAnimation.targetContentX = 0;
234 snapAnimation.targetContentX = 0;
235 snapAnimation.start();
235 snapAnimation.start();
236 } else if (contentX < phase1Width) {
236 } else if (contentX < phase1Width) {
237− snapTo(1)
237+ snapTo(1);
238 } else {
238 } else {
239 // Add 1 pixel to make sure we definitely hit positionMarker4 even with rounding errors of the animation.
239 // Add 1 pixel to make sure we definitely hit positionMarker4 even with rounding errors of the animation.
240 snapAnimation.targetContentX = spreadView.width * spreadView.positionMarker4 + 1;
240 snapAnimation.targetContentX = spreadView.width * spreadView.positionMarker4 + 1;
@@ -302,7 +302,7 @@ Item {
302 script: {
302 script: {
303 if (spreadView.selectedIndex >= 0) {
303 if (spreadView.selectedIndex >= 0) {
304 var newIndex = spreadView.selectedIndex;
304 var newIndex = spreadView.selectedIndex;
305− spreadView.selectedIndex = -1
305+ spreadView.selectedIndex = -1;
306 ApplicationManager.focusApplication(ApplicationManager.get(newIndex).appId);
306 ApplicationManager.focusApplication(ApplicationManager.get(newIndex).appId);
307 spreadView.phase = 0;
307 spreadView.phase = 0;
308 spreadView.contentX = 0;
308 spreadView.contentX = 0;
@@ -372,7 +372,7 @@ Item {
372 }
372 }
373 onMouseXChanged: {
373 onMouseXChanged: {
374 if (priv.mainStageAppId) {
374 if (priv.mainStageAppId) {
375− sideStageDragHandle.progress = Math.max(0, (-startX + mouseX) / spreadView.sideStageWidth)
375+ sideStageDragHandle.progress = Math.max(0, (-startX + mouseX) / spreadView.sideStageWidth);
376 }
376 }
377 gesturePoints.push(mouseX);
377 gesturePoints.push(mouseX);
378 }
378 }
@@ -393,7 +393,7 @@ Item {
393
393
394 onRunningChanged: {
394 onRunningChanged: {
395 if (!running) {
395 if (!running) {
396− sideStageDragHandle.dragging = false;
396+ sideStageDragHandle.dragging = false;;
397 }
397 }
398 }
398 }
399 }
399 }
@@ -433,7 +433,7 @@ Item {
433 Connections {
433 Connections {
434 target: ApplicationManager
434 target: ApplicationManager
435 onApplicationRemoved: spreadTile.z = Qt.binding(function() {
435 onApplicationRemoved: spreadTile.z = Qt.binding(function() {
436− return spreadView.indexToZIndex(index)
436+ return spreadView.indexToZIndex(index);
437 })
437 })
438 }
438 }
439
439
@@ -470,9 +470,9 @@ Item {
470 }
470 }
471
471
472 onClosed: {
472 onClosed: {
473− spreadView.draggedIndex = -1
473+ spreadView.draggedIndex = -1;
474− spreadView.closingIndex = index
474+ spreadView.closingIndex = index;
475− ApplicationManager.stopApplication(ApplicationManager.get(index).appId)
475+ ApplicationManager.stopApplication(ApplicationManager.get(index).appId);
476 }
476 }
477
477
478 EasingCurve {
478 EasingCurve {
@@ -502,7 +502,7 @@ Item {
502 }
502 }
503
503
504 if (attachedToView) {
504 if (attachedToView) {
505− spreadView.contentX = -touchX + spreadDragArea.width
505+ spreadView.contentX = -touchX + spreadDragArea.width;
506 if (spreadView.contentX > spreadView.phase0Width + spreadView.phase1Width / 2) {
506 if (spreadView.contentX > spreadView.phase0Width + spreadView.phase1Width / 2) {
507 attachedToView = false;
507 attachedToView = false;
508 spreadView.snap();
508 spreadView.snap();
@@ -536,7 +536,7 @@ Item {
536 if (spreadView.contentX < spreadView.width * spreadView.positionMarker1) {
536 if (spreadView.contentX < spreadView.width * spreadView.positionMarker1) {
537 spreadView.snap();
537 spreadView.snap();
538 } else if (spreadView.contentX < spreadView.width * spreadView.positionMarker2) {
538 } else if (spreadView.contentX < spreadView.width * spreadView.positionMarker2) {
539− spreadView.snapTo(spreadView.nextInStack)
539+ spreadView.snapTo(spreadView.nextInStack);
540 } else {
540 } else {
541 // otherwise snap to the closest snap position we can find
541 // otherwise snap to the closest snap position we can find
542 // (might be back to start, to app 1 or to spread)
542 // (might be back to start, to app 1 or to spread)
qml/Stages/TransformedTabletSpreadDelegate.qml+35−35
@@ -64,9 +64,9 @@ SpreadDelegate {
64 if (spreadView.phase == 1) {
64 if (spreadView.phase == 1) {
65 var phase2Progress = spreadView.positionMarker4 - (root.zIndex * spreadView.tileDistance / spreadView.width);
65 var phase2Progress = spreadView.positionMarker4 - (root.zIndex * spreadView.tileDistance / spreadView.width);
66 priv.phase2StartTranslate = priv.easingAnimation(0, 1, 0, -spreadView.width + (root.zIndex * root.endDistance), phase2Progress);
66 priv.phase2StartTranslate = priv.easingAnimation(0, 1, 0, -spreadView.width + (root.zIndex * root.endDistance), phase2Progress);
67− priv.phase2StartScale = priv.easingAnimation(0, 1, root.startScale, root.endScale, phase2Progress)
67+ priv.phase2StartScale = priv.easingAnimation(0, 1, root.startScale, root.endScale, phase2Progress);
68− priv.phase2StartAngle = priv.easingAnimation(0, 1, root.startAngle, root.endAngle, phase2Progress)
68+ priv.phase2StartAngle = priv.easingAnimation(0, 1, root.startAngle, root.endAngle, phase2Progress);
69− priv.phase2StartTopMarginProgress = priv.easingAnimation(0, 1, 0, 1, phase2Progress)
69+ priv.phase2StartTopMarginProgress = priv.easingAnimation(0, 1, 0, 1, phase2Progress);
70 }
70 }
71 }
71 }
72 }
72 }
@@ -129,27 +129,27 @@ SpreadDelegate {
129 var newTranslate = 0;
129 var newTranslate = 0;
130
130
131 if (otherSelected) {
131 if (otherSelected) {
132− return priv.selectedXTranslate
132+ return priv.selectedXTranslate;
133 }
133 }
134
134
135 if (isSelected) {
135 if (isSelected) {
136 if (model.stage == ApplicationInfoInterface.MainStage) {
136 if (model.stage == ApplicationInfoInterface.MainStage) {
137− return linearAnimation(selectedProgress, negativeProgress, selectedXTranslate, -spreadView.width, root.progress)
137+ return linearAnimation(selectedProgress, negativeProgress, selectedXTranslate, -spreadView.width, root.progress);
138 } else {
138 } else {
139− return linearAnimation(selectedProgress, negativeProgress, selectedXTranslate, -spreadView.sideStageWidth, root.progress)
139+ return linearAnimation(selectedProgress, negativeProgress, selectedXTranslate, -spreadView.sideStageWidth, root.progress);
140 }
140 }
141 }
141 }
142
142
143 // The tile should move a bit to the left if a new one comes on top of it, but not for the Side Stage and not
143 // The tile should move a bit to the left if a new one comes on top of it, but not for the Side Stage and not
144 // when we're only dragging the side stage in on top of a main stage app
144 // when we're only dragging the side stage in on top of a main stage app
145 var shouldMoveAway = spreadView.nextInStack >= 0 && priv.movedActive && model.stage === ApplicationInfoInterface.MainStage &&
145 var shouldMoveAway = spreadView.nextInStack >= 0 && priv.movedActive && model.stage === ApplicationInfoInterface.MainStage &&
146− ApplicationManager.get(spreadView.nextInStack).stage === ApplicationInfoInterface.MainStage
146+ ApplicationManager.get(spreadView.nextInStack).stage === ApplicationInfoInterface.MainStage;
147
147
148 if (active) {
148 if (active) {
149 newTranslate -= root.width
149 newTranslate -= root.width
150 // Only do the hide animation for active apps in the mainstage, and not if we only drag the ss in
150 // Only do the hide animation for active apps in the mainstage, and not if we only drag the ss in
151 if (spreadView.phase == 0 && shouldMoveAway) {
151 if (spreadView.phase == 0 && shouldMoveAway) {
152− newTranslate += linearAnimation(0, spreadView.positionMarker2, 0, -units.gu(4), root.animatedProgress)
152+ newTranslate += linearAnimation(0, spreadView.positionMarker2, 0, -units.gu(4), root.animatedProgress);
153 }
153 }
154 }
154 }
155 if (nextInStack && spreadView.phase == 0) {
155 if (nextInStack && spreadView.phase == 0) {
@@ -162,16 +162,16 @@ SpreadDelegate {
162
162
163 if (model.stage == ApplicationInfoInterface.SideStage && !spreadView.sideStageVisible) {
163 if (model.stage == ApplicationInfoInterface.SideStage && !spreadView.sideStageVisible) {
164 // This is when we only drag the side stage in, without rotation or snapping
164 // This is when we only drag the side stage in, without rotation or snapping
165− newTranslate = linearAnimation(0, spreadView.positionMarker2, 0, -spreadView.sideStageWidth, root.progress)
165+ newTranslate = linearAnimation(0, spreadView.positionMarker2, 0, -spreadView.sideStageWidth, root.progress);
166 } else {
166 } else {
167− newTranslate += linearAnimation(0, spreadView.positionMarker2, 0, -spreadView.sideStageWidth * spreadView.snapPosition, root.animatedProgress)
167+ newTranslate += linearAnimation(0, spreadView.positionMarker2, 0, -spreadView.sideStageWidth * spreadView.snapPosition, root.animatedProgress);
168 }
168 }
169 }
169 }
170
170
171 if (spreadView.phase == 1) {
171 if (spreadView.phase == 1) {
172 if (nextInStack) {
172 if (nextInStack) {
173 if (model.stage == ApplicationInfoInterface.MainStage) {
173 if (model.stage == ApplicationInfoInterface.MainStage) {
174− var startValue = -spreadView.sideStageWidth * spreadView.snapPosition + (spreadView.sideStageVisible ? -spreadView.sideStageWidth : 0)
174+ var startValue = -spreadView.sideStageWidth * spreadView.snapPosition + (spreadView.sideStageVisible ? -spreadView.sideStageWidth : 0);
175 newTranslate += linearAnimation(spreadView.positionMarker2, spreadView.positionMarker4, startValue, priv.phase2StartTranslate, root.animatedProgress);
175 newTranslate += linearAnimation(spreadView.positionMarker2, spreadView.positionMarker4, startValue, priv.phase2StartTranslate, root.animatedProgress);
176 } else {
176 } else {
177 var endValue = -spreadView.width + spreadView.width * root.zIndex / 6;
177 var endValue = -spreadView.width + spreadView.width * root.zIndex / 6;
@@ -182,19 +182,19 @@ SpreadDelegate {
182 }
182 }
183 }
183 }
184 } else if (root.active) {
184 } else if (root.active) {
185− var startProgress = spreadView.positionMarker2 - (zIndex * spreadView.positionMarker2 / 2)
185+ var startProgress = spreadView.positionMarker2 - (zIndex * spreadView.positionMarker2 / 2);
186− var endProgress = spreadView.positionMarker4 - (zIndex * spreadView.tileDistance / spreadView.width)
186+ var endProgress = spreadView.positionMarker4 - (zIndex * spreadView.tileDistance / spreadView.width);
187− var startTranslate = -root.width + (shouldMoveAway ? -units.gu(4) : 0)
187+ var startTranslate = -root.width + (shouldMoveAway ? -units.gu(4) : 0);
188 newTranslate = linearAnimation(startProgress, endProgress, startTranslate, priv.phase2StartTranslate, root.progress);
188 newTranslate = linearAnimation(startProgress, endProgress, startTranslate, priv.phase2StartTranslate, root.progress);
189 } else {
189 } else {
190− var startProgress = spreadView.positionMarker2 - (zIndex * spreadView.positionMarker2 / 2)
190+ var startProgress = spreadView.positionMarker2 - (zIndex * spreadView.positionMarker2 / 2);
191− var endProgress = spreadView.positionMarker4 - (zIndex * spreadView.tileDistance / spreadView.width)
191+ var endProgress = spreadView.positionMarker4 - (zIndex * spreadView.tileDistance / spreadView.width);
192 newTranslate = linearAnimation(startProgress, endProgress, 0, priv.phase2StartTranslate, root.progress);
192 newTranslate = linearAnimation(startProgress, endProgress, 0, priv.phase2StartTranslate, root.progress);
193 }
193 }
194 }
194 }
195
195
196 if (spreadView.phase == 2) {
196 if (spreadView.phase == 2) {
197− newTranslate = -easingCurve.value * (spreadView.width - root.zIndex * animatedEndDistance)
197+ newTranslate = -easingCurve.value * (spreadView.width - root.zIndex * animatedEndDistance);
198 }
198 }
199
199
200 return newTranslate;
200 return newTranslate;
@@ -206,7 +206,7 @@ SpreadDelegate {
206 }
206 }
207
207
208 if (isSelected) {
208 if (isSelected) {
209− return linearAnimation(selectedProgress, negativeProgress, selectedScale, 1, root.progress)
209+ return linearAnimation(selectedProgress, negativeProgress, selectedScale, 1, root.progress);
210 }
210 }
211
211
212 if (spreadView.phase == 0) {
212 if (spreadView.phase == 0) {
@@ -220,7 +220,7 @@ SpreadDelegate {
220 } else if (active) {
220 } else if (active) {
221 return 1;
221 return 1;
222 } else {
222 } else {
223− return linearAnimation(0, spreadView.positionMarker2, root.startScale, root.endScale, root.progress)
223+ return linearAnimation(0, spreadView.positionMarker2, root.startScale, root.endScale, root.progress);
224 }
224 }
225 }
225 }
226
226
@@ -230,15 +230,15 @@ SpreadDelegate {
230 if (model.stage !== ApplicationInfoInterface.SideStage || spreadView.sideStageVisible) {
230 if (model.stage !== ApplicationInfoInterface.SideStage || spreadView.sideStageVisible) {
231 startScale = root.dragStartScale - ((root.dragStartScale - 1) * spreadView.snapPosition);
231 startScale = root.dragStartScale - ((root.dragStartScale - 1) * spreadView.snapPosition);
232 }
232 }
233− return linearAnimation(spreadView.positionMarker2, spreadView.positionMarker4, startScale, priv.phase2StartScale, root.animatedProgress)
233+ return linearAnimation(spreadView.positionMarker2, spreadView.positionMarker4, startScale, priv.phase2StartScale, root.animatedProgress);
234 }
234 }
235− var startProgress = spreadView.positionMarker2 - (zIndex * spreadView.positionMarker2 / 2)
235+ var startProgress = spreadView.positionMarker2 - (zIndex * spreadView.positionMarker2 / 2);
236− var endProgress = spreadView.positionMarker4 - (zIndex * spreadView.tileDistance / spreadView.width)
236+ var endProgress = spreadView.positionMarker4 - (zIndex * spreadView.tileDistance / spreadView.width);
237− return linearAnimation(startProgress, endProgress, 1, priv.phase2StartScale, root.animatedProgress)
237+ return linearAnimation(startProgress, endProgress, 1, priv.phase2StartScale, root.animatedProgress);
238 }
238 }
239
239
240 if (spreadView.phase == 2) {
240 if (spreadView.phase == 2) {
241− return root.startScale - easingCurve.value * (root.startScale - root.endScale)
241+ return root.startScale - easingCurve.value * (root.startScale - root.endScale);
242 }
242 }
243
243
244 return 1;
244 return 1;
@@ -249,36 +249,36 @@ SpreadDelegate {
249 return selectedAngle;
249 return selectedAngle;
250 }
250 }
251 if (isSelected) {
251 if (isSelected) {
252− return linearAnimation(selectedProgress, negativeProgress, selectedAngle, 0, root.progress)
252+ return linearAnimation(selectedProgress, negativeProgress, selectedAngle, 0, root.progress);
253 }
253 }
254
254
255 // The tile should rotate a bit when another one comes on top, but not when only dragging the side stage in
255 // The tile should rotate a bit when another one comes on top, but not when only dragging the side stage in
256− var shouldMoveAway = spreadView.nextInStack >= 0 && movedActive && (ApplicationManager.get(spreadView.nextInStack).stage === ApplicationInfoInterface.MainStage || model.stage == ApplicationInfoInterface.SideStage)
256+ var shouldMoveAway = spreadView.nextInStack >= 0 && movedActive && (ApplicationManager.get(spreadView.nextInStack).stage === ApplicationInfoInterface.MainStage || model.stage == ApplicationInfoInterface.SideStage);
257
257
258 if (spreadView.phase == 0) {
258 if (spreadView.phase == 0) {
259 if (nextInStack) {
259 if (nextInStack) {
260 if (model.stage == ApplicationInfoInterface.SideStage && !spreadView.sideStageVisible) {
260 if (model.stage == ApplicationInfoInterface.SideStage && !spreadView.sideStageVisible) {
261 return 0;
261 return 0;
262 } else {
262 } else {
263− return linearAnimation(0, spreadView.positionMarker2, root.startAngle, root.startAngle * (1-spreadView.snapPosition), root.animatedProgress)
263+ return linearAnimation(0, spreadView.positionMarker2, root.startAngle, root.startAngle * (1-spreadView.snapPosition), root.animatedProgress);
264 }
264 }
265 }
265 }
266 if (shouldMoveAway) {
266 if (shouldMoveAway) {
267− return linearAnimation(0, spreadView.positionMarker2, 0, root.startAngle * (1-spreadView.snapPosition), root.animatedProgress)
267+ return linearAnimation(0, spreadView.positionMarker2, 0, root.startAngle * (1-spreadView.snapPosition), root.animatedProgress);
268 }
268 }
269 }
269 }
270 if (spreadView.phase == 1) {
270 if (spreadView.phase == 1) {
271 if (nextInStack) {
271 if (nextInStack) {
272 if (model.stage == ApplicationInfoInterface.SideStage && !spreadView.sideStageVisible) {
272 if (model.stage == ApplicationInfoInterface.SideStage && !spreadView.sideStageVisible) {
273− return linearAnimation(spreadView.positionMarker2, spreadView.positionMarker4, 0, priv.phase2StartAngle, root.animatedProgress)
273+ return linearAnimation(spreadView.positionMarker2, spreadView.positionMarker4, 0, priv.phase2StartAngle, root.animatedProgress);
274 } else {
274 } else {
275− return linearAnimation(spreadView.positionMarker2, spreadView.positionMarker4, root.startAngle * (1-spreadView.snapPosition), priv.phase2StartAngle, root.animatedProgress)
275+ return linearAnimation(spreadView.positionMarker2, spreadView.positionMarker4, root.startAngle * (1-spreadView.snapPosition), priv.phase2StartAngle, root.animatedProgress);
276 }
276 }
277 }
277 }
278− var startProgress = spreadView.positionMarker2 - (zIndex * spreadView.positionMarker2 / 2)
278+ var startProgress = spreadView.positionMarker2 - (zIndex * spreadView.positionMarker2 / 2);
279− var endProgress = spreadView.positionMarker4 - (zIndex * spreadView.tileDistance / spreadView.width)
279+ var endProgress = spreadView.positionMarker4 - (zIndex * spreadView.tileDistance / spreadView.width);
280− var startAngle = shouldMoveAway ? root.startAngle * (1-spreadView.snapPosition) : 0
280+ var startAngle = shouldMoveAway ? root.startAngle * (1-spreadView.snapPosition) : 0;
281− return linearAnimation(startProgress, endProgress, startAngle, priv.phase2StartAngle, root.progress)
281+ return linearAnimation(startProgress, endProgress, startAngle, priv.phase2StartAngle, root.progress);
282 }
282 }
283 if (spreadView.phase == 2) {
283 if (spreadView.phase == 2) {
284 return root.startAngle - easingCurve.value * (root.startAngle - root.endAngle);
284 return root.startAngle - easingCurve.value * (root.startAngle - root.endAngle);
@@ -289,7 +289,7 @@ SpreadDelegate {
289
289
290 property real opacityTransform: {
290 property real opacityTransform: {
291 if (otherSelected && spreadView.phase == 2) {
291 if (otherSelected && spreadView.phase == 2) {
292− return linearAnimation(selectedProgress, negativeProgress, selectedOpacity, 0, root.progress)
292+ return linearAnimation(selectedProgress, negativeProgress, selectedOpacity, 0, root.progress);
293 }
293 }
294
294
295 return 1;
295 return 1;