on xenial help sign in
minor fixes and cleanups
commitba4131f4daddb1e91087bf1660fb372b006cd4a4 authorLukáš Tinkl <lukas.tinkl@canonical.com> dateWed 31 Aug 2016, 14:39 (10 years ago) parent4ae834f
5 files changed+2−14
qml/Shell.qml−1 qml/Stages/DecoratedWindow.qml−1 qml/Stages/FakeMaximizeDelegate.qml−7 qml/Stages/MoveHandler.qml−3 qml/Stages/WindowControlsOverlay.qml+2−2
qml/Shell.qml−1
@@ -826,7 +826,6 @@ StyledItem {
826826 }
827827 onPushStopped: {
828828 if (previewRectangle) {
829− print("!!! Cancelling preview", previewRectangle.progress)
830829 previewRectangle.stop();
831830 }
832831 }
qml/Stages/DecoratedWindow.qml−1
@@ -110,7 +110,6 @@ FocusScope {
110110 onPressedChanged: moveHandler.handlePressedChanged(pressed, pressedButtons, mouseX, mouseY)
111111 onPositionChanged: moveHandler.handlePositionChanged(mouse)
112112 onReleased: {
113− print("!!! Mouse released on decoration")
114113 root.shouldCommitSnapWindow();
115114 moveHandler.handleReleased();
116115 }
qml/Stages/FakeMaximizeDelegate.qml−7
@@ -42,9 +42,6 @@ Rectangle {
4242 // Edge push progress
4343 // Value range is [0.0, 1.0]
4444 readonly property real progress: priv.directProgress != -1 ? priv.directProgress : priv.accumulatedProgress
45− onProgressChanged: {
46− print("!!! Progress:", progress)
47− }
4845
4946 signal passed(int origin)
5047
@@ -58,7 +55,6 @@ Rectangle {
5855 function push(amount) {
5956 if (accumulatedPush === EdgeBarrierSettings.pushThreshold) {
6057 // NO-OP
61− print("!!! Accumulated push already at threshold")
6258 return;
6359 }
6460
@@ -69,7 +65,6 @@ Rectangle {
6965 }
7066
7167 if (accumulatedPush === EdgeBarrierSettings.pushThreshold) {
72− print("!!! Reached push progress 1; commit/passed")
7368 passed(edge);
7469 // commit(); // NB: uncomment to have automatic maximization on 100% progress
7570 }
@@ -103,7 +98,6 @@ Rectangle {
10398
10499 function commit() {
105100 if (progress > hintThreshold && edge != -1) {
106− print("!!! Committing edge", edge, ", progress:", progress);
107101 target.moveHandler.handlePressedChanged(false, Qt.LeftButton); // cancel the drag
108102 if (edge == Item.Top) {
109103 target.maximize();
@@ -126,7 +120,6 @@ Rectangle {
126120 }
127121
128122 function stop() {
129− print("!!! Stop")
130123 priv.accumulatedPush = 0;
131124 priv.directProgress = -1;
132125 edge = -1;
qml/Stages/MoveHandler.qml−3
@@ -106,7 +106,6 @@ Item {
106106 Mir.cursorName = "grabbing";
107107
108108 if (target.anyMaximized) { // restore from maximized when dragging away from edges/corners
109− print("!!! Restoring maximized window after a drag away")
110109 priv.progress = 0;
111110 target.restore(false, WindowStateStorage.WindowStateNormal);
112111 }
@@ -160,7 +159,6 @@ Item {
160159 root.fakeMaximizeAnimationRequested(priv.progress);
161160 } else if (priv.nearLeftEdge || priv.nearRightEdge || priv.nearTopEdge || priv.nearTopLeftCorner || priv.nearTopRightCorner ||
162161 priv.nearBottomLeftCorner || priv.nearBottomRightCorner) {
163− print("!!! Exited")
164162 priv.progress = 0;
165163 priv.resetEdges();
166164 root.stopFakeAnimation();
@@ -177,7 +175,6 @@ Item {
177175 }
178176 if ((target.state == "normal" || target.state == "restored") && priv.progress == 0) {
179177 // save the x/y to restore to
180− print("!!! Saving restoredX/Y")
181178 target.restoredX = target.x;
182179 target.restoredY = target.y;
183180 }
qml/Stages/WindowControlsOverlay.qml+2−2
@@ -97,8 +97,8 @@ Item {
9797 var yPoints = [];
9898 for (var i = 0; i < gestureArea.touchPoints.length; i++) {
9999 var pt = gestureArea.touchPoints[i];
100− xPoints.push(Math.round(pt.x));
101− yPoints.push(Math.round(pt.y));
100+ xPoints.push(pt.x);
101+ yPoints.push(pt.y);
102102 }
103103
104104 var leftmost = Math.min.apply(Math, xPoints);