on xenial help sign in
fix hiding after merging a fix from the prereq
commitf52f718dda47bb2344ce33cfa47c8c67780e6295 authorMichael Zanetti <michael.zanetti@canonical.com> dateThu 14 Jan 2016, 16:44 (11 years ago) parentab99303
3 files changed+17−5
qml/Launcher/Launcher.qml+2−2 tests/mocks/GSettings.1.0/fake_gsettings.cpp+1−1 tests/qmltests/Launcher/tst_Launcher.qml+14−2
qml/Launcher/Launcher.qml+2−2
@@ -30,7 +30,7 @@ FocusScope {
3030 property alias inverted: panel.inverted
3131 property bool shadeBackground: true // can be used to disable background shade when launcher is visible
3232
33− property int panelWidth: units.gu(10)
33+ property int panelWidth: units.gu(8)
3434 property int dragAreaWidth: units.gu(1)
3535 property int minimizeDistance: units.gu(26)
3636 property real progress: dragArea.dragging && dragArea.touchX > panelWidth ?
@@ -381,7 +381,7 @@ FocusScope {
381381 }
382382
383383 onKbdNavigationCancelled: {
384− root.state = "";
384+ root.hide();
385385 root.focus = false;
386386 }
387387
tests/mocks/GSettings.1.0/fake_gsettings.cpp+1−1
@@ -23,7 +23,7 @@ GSettingsControllerQml* GSettingsControllerQml::s_controllerInstance = 0;
2323GSettingsControllerQml::GSettingsControllerQml()
2424 : m_usageMode("Staged")
2525 , m_autohideLauncher(false)
26− , m_launcherWidth(qgetenv("GRID_UNIT_PX").isEmpty() ? 8 : qgetenv("GRID_UNIT_PX").toInt() * 8)
26+ , m_launcherWidth(8)
2727{
2828}
2929
tests/qmltests/Launcher/tst_Launcher.qml+14−2
@@ -1201,7 +1201,14 @@ Item {
12011201 }
12021202 }
12031203
1204− function test_cancelKbdNavigationWitMouse() {
1204+ function test_cancelKbdNavigationWitMouse_data() {
1205+ return [
1206+ {tag: "locked out", autohide: false },
1207+ {tag: "autohide", autohide: true },
1208+ ]
1209+ }
1210+
1211+ function test_cancelKbdNavigationWitMouse(data) {
12051212 launcher.openForKeyboardNavigation();
12061213 waitForRendering(launcher);
12071214
@@ -1219,7 +1226,12 @@ Item {
12191226
12201227 mouseClick(root, root.width / 2, units.gu(2));
12211228
1222− tryCompare(launcher, "state", "");
1229+ if (data.autohide) {
1230+ tryCompare(launcher, "state", "");
1231+ } else {
1232+ tryCompare(launcher, "state", "visible");
1233+ }
1234+
12231235 tryCompare(launcherPanel, "highlightIndex", -2);
12241236 }
12251237 }