on xenial help sign in
hide the close button for dash
commit06b31a52d0d9d231ebebc098c6eda0f35e0e5112 authorLukáš Tinkl <lukas.tinkl@canonical.com> dateWed 30 Mar 2016, 21:21 (11 years ago) parent6e1c8f9
3 files changed+11
qml/Components/WindowControlButtons.qml+2 qml/Stages/WindowDecoration.qml+1 tests/qmltests/Stages/tst_DesktopStage.qml+8
qml/Components/WindowControlButtons.qml+2
@@ -23,6 +23,7 @@ Row {
2323
2424 // to be set from outside
2525 property bool active: false
26+ property bool closeButtonShown: true
2627
2728 signal close()
2829 signal minimize()
@@ -35,6 +36,7 @@ Row {
3536 height: parent.height
3637 width: height
3738 onClicked: root.close()
39+ visible: root.closeButtonShown
3840
3941 Rectangle {
4042 anchors.centerIn: parent
qml/Stages/WindowDecoration.qml+1
@@ -84,6 +84,7 @@ MouseArea {
8484 id: buttons
8585 height: parent.height
8686 active: root.active
87+ closeButtonShown: root.target.appId !== "unity8-dash"
8788 onClose: root.close();
8889 onMinimize: root.minimize();
8990 onMaximize: root.maximize();
tests/qmltests/Stages/tst_DesktopStage.qml+8
@@ -534,5 +534,13 @@ Item {
534534 // verify the drop shadow is gone
535535 verify(PanelState.dropShadow == false);
536536 }
537+
538+ function test_dashHasNoCloseButton() {
539+ var dashApp = startApplication("unity8-dash");
540+ var dashAppDelegate = findChild(desktopStage, "appDelegate_unity8-dash");
541+ verify(dashAppDelegate);
542+ var closeButton = findChild(dashAppDelegate, "closeWindowButton");
543+ tryCompare(closeButton, "visible", false);
544+ }
537545 }
538546}