@@ -41,6 +41,8 @@ MouseArea {
41 property real distanceX
41 property real distanceX
42 property real distanceY
42 property real distanceY
43 property bool dragging
43 property bool dragging
45+ readonly property bool overlayShown: TouchControlsState.overlayShown && target && target.surface === TouchControlsState.surface
46 onPressedChanged: {
48 onPressedChanged: {
@@ -74,11 +76,15 @@ MouseArea {
76 fill: parent
78 fill: parent
77− leftMargin: TouchControlsState.overlayShown ? units.gu(5) : units.gu(1)
79+ leftMargin: priv.overlayShown ? units.gu(5) : units.gu(1)
78 rightMargin: units.gu(1)
80 rightMargin: units.gu(1)
79 topMargin: units.gu(0.5)
81 topMargin: units.gu(0.5)
80 bottomMargin: units.gu(0.5)
82 bottomMargin: units.gu(0.5)
84+ Behavior on anchors.leftMargin {
85+ UbuntuNumberAnimation {}
82 spacing: units.gu(3)
88 spacing: units.gu(3)
84 WindowControlButtons {
90 WindowControlButtons {
@@ -86,6 +92,7 @@ MouseArea {
86 height: parent.height
92 height: parent.height
87 active: root.active
93 active: root.active
88 closeButtonShown: root.target.application.appId !== "unity8-dash"
94 closeButtonShown: root.target.application.appId !== "unity8-dash"
89 onClose: root.close();
96 onClose: root.close();
90 onMinimize: root.minimize();
97 onMinimize: root.minimize();
91 onMaximize: root.maximize();
98 onMaximize: root.maximize();
@@ -101,7 +108,7 @@ MouseArea {
101 fontSize: "medium"
108 fontSize: "medium"
102 font.weight: root.active ? Font.Light : Font.Medium
109 font.weight: root.active ? Font.Light : Font.Medium
103 elide: Text.ElideRight
110 elide: Text.ElideRight
104− opacity: TouchControlsState.overlayShown ? 0 : 1
111+ opacity: priv.overlayShown ? 0 : 1
105 visible: opacity == 1
112 visible: opacity == 1
106 Behavior on opacity {
113 Behavior on opacity {
107 OpacityAnimator { duration: UbuntuAnimation.FastDuration; easing: UbuntuAnimation.StandardEasing }
114 OpacityAnimator { duration: UbuntuAnimation.FastDuration; easing: UbuntuAnimation.StandardEasing }