on xenial help sign in
hide the close button for dash
06b31a5Lukáš Tinkl
qml/Components/WindowControlButtons.qml+2
@@ -23,6 +23,7 @@ Row {
23
23
24 // to be set from outside
24 // to be set from outside
25 property bool active: false
25 property bool active: false
26+ property bool closeButtonShown: true
26
27
27 signal close()
28 signal close()
28 signal minimize()
29 signal minimize()
@@ -35,6 +36,7 @@ Row {
35 height: parent.height
36 height: parent.height
36 width: height
37 width: height
37 onClicked: root.close()
38 onClicked: root.close()
39+ visible: root.closeButtonShown
38
40
39 Rectangle {
41 Rectangle {
40 anchors.centerIn: parent
42 anchors.centerIn: parent
qml/Stages/WindowDecoration.qml+1
@@ -84,6 +84,7 @@ MouseArea {
84 id: buttons
84 id: buttons
85 height: parent.height
85 height: parent.height
86 active: root.active
86 active: root.active
87+ closeButtonShown: root.target.appId !== "unity8-dash"
87 onClose: root.close();
88 onClose: root.close();
88 onMinimize: root.minimize();
89 onMinimize: root.minimize();
89 onMaximize: root.maximize();
90 onMaximize: root.maximize();
tests/qmltests/Stages/tst_DesktopStage.qml+8
@@ -534,5 +534,13 @@ Item {
534 // verify the drop shadow is gone
534 // verify the drop shadow is gone
535 verify(PanelState.dropShadow == false);
535 verify(PanelState.dropShadow == false);
536 }
536 }
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+ }
537 }
545 }
538}
546}