on xenial help sign in
hide panel buttons when switching to staged mode
commit1921caf3aa40e2ed5017d5c9bee7a3f9b66b909c authorMichael Zanetti <michael.zanetti@canonical.com> dateFri 25 Sep 2015, 19:14 (11 years ago) parent8930f96
2 files changed+23
qml/Stages/DesktopStage.qml+1 tests/qmltests/tst_Shell.qml+22
qml/Stages/DesktopStage.qml+1
@@ -111,6 +111,7 @@ Rectangle {
111111 property: "buttonsVisible"
112112 value: priv.focusedAppDelegate !== null && priv.focusedAppDelegate.state === "maximized"
113113 }
114+ Component.onDestruction: PanelState.buttonsVisible = false;
114115
115116 FocusScope {
116117 id: appContainer
tests/qmltests/tst_Shell.qml+22
@@ -1755,5 +1755,27 @@ Rectangle {
17551755 ApplicationManager.startApplication(appId);
17561756 tryCompare(PanelState, "buttonsVisible", true)
17571757 }
1758+
1759+ // but http://pad.lv/1431566
1760+ function test_switchToStagedHidesPanelButtons() {
1761+ loadDesktopShellWithApps();
1762+ var appRepeater = findChild(shell, "appRepeater")
1763+ var appId = ApplicationManager.get(0).appId;
1764+ var appDelegate = appRepeater.itemAt(0);
1765+
1766+ tryCompare(appDelegate, "state", "normal");
1767+ tryCompare(PanelState, "buttonsVisible", false);
1768+
1769+ appDelegate.maximize(false);
1770+ tryCompare(PanelState, "buttonsVisible", true);
1771+
1772+ shell.usageScenario = "phone";
1773+ waitForRendering(shell);
1774+ tryCompare(PanelState, "buttonsVisible", false);
1775+
1776+ shell.usageScenario = "desktop";
1777+ waitForRendering(shell);
1778+ tryCompare(PanelState, "buttonsVisible", true);
1779+ }
17581780 }
17591781}