on xenial help sign in
also show the buttons in the panel
ebd4115Lukáš Tinkl
qml/Components/TouchControlsState/TouchControlsState.qml+1
@@ -21,4 +21,5 @@ QtObject {
21 id: root
21 id: root
22
22
23 property bool overlayShown: false
23 property bool overlayShown: false
24+ property bool buttonsShownInPanel: false
24}
25}
qml/Components/WindowControlButtons.qml+1−1
@@ -20,7 +20,7 @@ import "../Components/TouchControlsState"
20
20
21Row {
21Row {
22 id: root
22 id: root
23− spacing: TouchControlsState.overlayShown && !windowIsMaximized ? units.gu(2) : units.gu(1)
23+ spacing: TouchControlsState.overlayShown ? units.gu(2) : units.gu(1)
24 Behavior on spacing {
24 Behavior on spacing {
25 UbuntuNumberAnimation {}
25 UbuntuNumberAnimation {}
26 }
26 }
qml/Panel/Panel.qml+6−3
@@ -19,6 +19,7 @@ import Ubuntu.Components 1.3
19import Unity.Application 0.1
19import Unity.Application 0.1
20import "../Components"
20import "../Components"
21import "../Components/PanelState"
21import "../Components/PanelState"
22+import "../Components/TouchControlsState"
22import ".."
23import ".."
23
24
24Item {
25Item {
@@ -109,7 +110,7 @@ Item {
109 height: indicators.minimizedPanelHeight
110 height: indicators.minimizedPanelHeight
110 hoverEnabled: true
111 hoverEnabled: true
111 onClicked: callHint.visible ? callHint.showLiveCall() : PanelState.focusMaximizedApp()
112 onClicked: callHint.visible ? callHint.showLiveCall() : PanelState.focusMaximizedApp()
112− onDoubleClicked: PanelState.maximize()
113+ onDoubleClicked: PanelState.restore()
113
114
114 // WindowControlButtons inside the mouse area, otherwise QML doesn't grok nested hover events :/
115 // WindowControlButtons inside the mouse area, otherwise QML doesn't grok nested hover events :/
115 // cf. https://bugreports.qt.io/browse/QTBUG-32909
116 // cf. https://bugreports.qt.io/browse/QTBUG-32909
@@ -124,8 +125,10 @@ Item {
124 bottomMargin: units.gu(0.5)
125 bottomMargin: units.gu(0.5)
125 }
126 }
126 height: indicators.minimizedPanelHeight - anchors.topMargin - anchors.bottomMargin
127 height: indicators.minimizedPanelHeight - anchors.topMargin - anchors.bottomMargin
127− visible: PanelState.buttonsVisible && parent.containsMouse && !root.locked && !callHint.visible
128+ visible: ((PanelState.buttonsVisible && parent.containsMouse) ||
129+ (TouchControlsState.overlayShown && TouchControlsState.buttonsShownInPanel))
130+ && !root.locked && !callHint.visible
128− active: PanelState.buttonsVisible
131+ active: PanelState.buttonsVisible || TouchControlsState.overlayShown
129 windowIsMaximized: true
132 windowIsMaximized: true
130 onClose: PanelState.close()
133 onClose: PanelState.close()
131 onMinimize: PanelState.minimize()
134 onMinimize: PanelState.minimize()
qml/Stages/DesktopStage.qml+7
@@ -18,6 +18,7 @@ import QtQuick 2.4
18import Ubuntu.Components 1.3
18import Ubuntu.Components 1.3
19import Unity.Application 0.1
19import Unity.Application 0.1
20import "../Components/PanelState"
20import "../Components/PanelState"
21+import "../Components/TouchControlsState"
21import "../Components"
22import "../Components"
22import Utils 0.1
23import Utils 0.1
23import Ubuntu.Gestures 0.1
24import Ubuntu.Gestures 0.1
@@ -191,6 +192,12 @@ AbstractStage {
191 value: priv.focusedAppDelegate && !priv.focusedAppDelegate.maximized && priv.foregroundMaximizedAppDelegate !== null
192 value: priv.focusedAppDelegate && !priv.focusedAppDelegate.maximized && priv.foregroundMaximizedAppDelegate !== null
192 }
193 }
193
194
195+ Binding {
196+ target: TouchControlsState
197+ property: "buttonsShownInPanel"
198+ value: priv.focusedAppDelegate && priv.focusedAppDelegate.maximized
199+ }
200+
194 Component.onDestruction: {
201 Component.onDestruction: {
195 PanelState.title = "";
202 PanelState.title = "";
196 PanelState.buttonsVisible = false;
203 PanelState.buttonsVisible = false;