on xenial help sign in
hide panel buttons when switching to staged mode
1921cafMichael Zanetti
qml/Stages/DesktopStage.qml+1
@@ -111,6 +111,7 @@ Rectangle {
111 property: "buttonsVisible"
111 property: "buttonsVisible"
112 value: priv.focusedAppDelegate !== null && priv.focusedAppDelegate.state === "maximized"
112 value: priv.focusedAppDelegate !== null && priv.focusedAppDelegate.state === "maximized"
113 }
113 }
114+ Component.onDestruction: PanelState.buttonsVisible = false;
114
115
115 FocusScope {
116 FocusScope {
116 id: appContainer
117 id: appContainer
tests/qmltests/tst_Shell.qml+22
@@ -1755,5 +1755,27 @@ Rectangle {
1755 ApplicationManager.startApplication(appId);
1755 ApplicationManager.startApplication(appId);
1756 tryCompare(PanelState, "buttonsVisible", true)
1756 tryCompare(PanelState, "buttonsVisible", true)
1757 }
1757 }
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+ }
1758 }
1780 }
1759}
1781}