on xenial help sign in
hint the launcher to indicate a successful size change to the user (LP: #1646457)

Approved by: Lukáš Tinkl, Unity8 CI Bot

commit64d94a3ece68bdfe25ec79d7f692ab4fe5997479 authorMichael Zanetti <michael.zanetti@canonical.com> dateTue 24 Jan 2017, 07:41 (10 years ago) parentdf8c9d5f4471f6
2 files changed+14
qml/Launcher/Launcher.qml+4 tests/qmltests/Launcher/tst_Launcher.qml+10
qml/Launcher/Launcher.qml+4
@@ -108,6 +108,10 @@ FocusScope {
108108 }
109109 }
110110
111+ onPanelWidthChanged: {
112+ hint();
113+ }
114+
111115 function hide(flags) {
112116 if ((flags & ignoreHideIfMouseOverLauncher) && Utils.Functions.itemUnderMouse(panel)) {
113117 return;
tests/qmltests/Launcher/tst_Launcher.qml+10
@@ -295,6 +295,8 @@ Rectangle {
295295 compare(listView.snapMode, ListView.SnapToItem, "Snapping is not enabled");
296296
297297 removeTimeConstraintsFromSwipeAreas(root);
298+
299+ waitUntilLauncherDisappears();
298300 }
299301
300302 function dragLauncher() {
@@ -1478,5 +1480,13 @@ Rectangle {
14781480
14791481 launcher.available = true;
14801482 }
1483+
1484+ function test_hintOnSizeChange() {
1485+ var oldSize = launcher.panelWidth;
1486+ launcher.maxPanelX = -launcher.panelWidth;
1487+ launcher.panelWidth = oldSize + units.gu(2);
1488+ tryCompare(launcher, "maxPanelX", 0);
1489+ launcher.panelWidth = oldSize;
1490+ }
14811491 }
14821492}