@@ -19,6 +19,7 @@ import Ubuntu.Components 1.3
1919import Unity.Application 0.1
2020import "../Components"
2121import "../Components/PanelState"
22+import "../Components/TouchControlsState"
2223import ".."
2324
2425Item {
@@ -109,7 +110,7 @@ Item {
109110 height: indicators.minimizedPanelHeight
110111 hoverEnabled: true
111112 onClicked: callHint.visible ? callHint.showLiveCall() : PanelState.focusMaximizedApp()
112− onDoubleClicked: PanelState.maximize()
113+ onDoubleClicked: PanelState.restore()
113114
114115 // WindowControlButtons inside the mouse area, otherwise QML doesn't grok nested hover events :/
115116 // cf. https://bugreports.qt.io/browse/QTBUG-32909
@@ -124,8 +125,10 @@ Item {
124125 bottomMargin: units.gu(0.5)
125126 }
126127 height: indicators.minimizedPanelHeight - anchors.topMargin - anchors.bottomMargin
127− visible: PanelState.buttonsVisible && parent.containsMouse && !root.locked && !callHint.visible
128− active: PanelState.buttonsVisible
128+ visible: ((PanelState.buttonsVisible && parent.containsMouse) ||
129+ (TouchControlsState.overlayShown && TouchControlsState.buttonsShownInPanel))
130+ && !root.locked && !callHint.visible
131+ active: PanelState.buttonsVisible || TouchControlsState.overlayShown
129132 windowIsMaximized: true
130133 onClose: PanelState.close()
131134 onMinimize: PanelState.minimize()