on xenial help sign in
Merge
commitbec1ca441b6640c83fafbb971aa65846b20ee625 authorAlbert Astals <albert.astals@canonical.com> dateTue 5 Nov 2013, 17:07 (13 years ago) parent7b1a85f71e8dd4
4 files changed+19−12
Components/UbuntuShapeForItem.qml+1 Launcher/Launcher.qml+1−1 plugins/Unity/Indicators/qml/SliderMenuItem.qml+3−2 tests/qmltests/tst_Shell.qml+14−9
Components/UbuntuShapeForItem.qml+1
@@ -31,6 +31,7 @@ Item {
3131
3232 ShaderEffectSource {
3333 id: source
34+ anchors.centerIn: parent // Placed under shape, so it's hidden
3435 width: 1
3536 height: 1
3637 hideSource: true
Launcher/Launcher.qml+1−1
@@ -28,7 +28,7 @@ Item {
2828
2929 property int panelWidth: units.gu(8)
3030 property int dragAreaWidth: units.gu(1)
31− property int minimizeDistance: panelWidth * 2.5
31+ property int minimizeDistance: units.gu(26)
3232 property real progress: dragArea.dragging && dragArea.touchX > panelWidth ?
3333 (width * (dragArea.touchX-panelWidth) / (width - panelWidth)) : 0
3434
plugins/Unity/Indicators/qml/SliderMenuItem.qml+3−2
@@ -51,12 +51,12 @@ FramedMenuItem {
5151
5252 control: Item {
5353 id: row
54− width: sliderMenu.text ? units.gu(20) : menuItem.width - (2 * menuItem.__contentsMargins)
54+ width: menuItem.text ? units.gu(20) : menuItem.width - (2 * menuItem.__contentsMargins)
5555 height: slider.height
5656
5757 Image {
5858 id: leftImage
59− visible: source != ""
59+ visible: status === Image.Ready
6060 anchors.left: row.left
6161 anchors.verticalCenter: row.verticalCenter
6262 height: units.gu(4)
@@ -96,6 +96,7 @@ FramedMenuItem {
9696
9797 Image {
9898 id: rightImage
99+ visible: status === Image.Ready
99100 anchors.right: row.right
100101 anchors.verticalCenter: row.verticalCenter
101102 height: units.gu(4)
tests/qmltests/tst_Shell.qml+14−9
@@ -111,14 +111,14 @@ Item {
111111 waitUntilApplicationWindowIsFullyVisible();
112112
113113 // Minimize the application we just launched
114− swipeFromLeftEdge();
114+ swipeFromLeftEdge(units.gu(27));
115115
116116 waitForUIToSettle();
117117
118118 checkRightEdgeDragWithMinimizedApp();
119119
120120 // Minimize that application once again
121− swipeFromLeftEdge();
121+ swipeFromLeftEdge(units.gu(27));
122122
123123 // Right edge behavior should now be the same as before that app,
124124 // was launched. Manually cleanup beforehand to get to initial
@@ -130,8 +130,10 @@ Item {
130130
131131 function test_leftEdgeDrag_data() {
132132 return [
133− {tag: "without launcher", revealLauncher: false},
134− {tag: "with launcher", revealLauncher: true},
133+ {tag: "without launcher", revealLauncher: false, swipeLength: units.gu(27), appHides: true},
134+ {tag: "with launcher", revealLauncher: true, swipeLength: units.gu(27), appHides: true},
135+ {tag: "small swipe", revealLauncher: false, swipeLength: units.gu(25), appHides: false},
136+ {tag: "long swipe", revealLauncher: false, swipeLength: units.gu(27), appHides: true}
135137 ];
136138 }
137139
@@ -144,8 +146,11 @@ Item {
144146 dragLauncherIntoView();
145147 }
146148
147− swipeFromLeftEdge();
148− waitUntilApplicationWindowIsFullyHidden();
149+ swipeFromLeftEdge(data.swipeLength);
150+ if (data.appHides)
151+ waitUntilApplicationWindowIsFullyHidden();
152+ else
153+ waitUntilApplicationWindowIsFullyVisible();
149154 }
150155
151156 function test_suspend() {
@@ -293,7 +298,7 @@ Item {
293298 waitUntilApplicationWindowIsFullyVisible();
294299
295300 // Minimize the application we just launched
296− swipeFromLeftEdge();
301+ swipeFromLeftEdge(units.gu(27));
297302
298303 // Wait for the whole UI to settle down
299304 waitUntilApplicationWindowIsFullyHidden();
@@ -376,10 +381,10 @@ Item {
376381 }
377382 }
378383
379− function swipeFromLeftEdge() {
384+ function swipeFromLeftEdge(swipeLength) {
380385 var touchStartX = 2;
381386 var touchStartY = shell.height / 2;
382− touchFlick(shell, touchStartX, touchStartY, shell.width * 0.75, touchStartY);
387+ touchFlick(shell, touchStartX, touchStartY, swipeLength, touchStartY);
383388 }
384389
385390 function swipeLeftFromCenter() {