@@ -22,16 +22,23 @@ import "../Components/PanelState"
2222
2323MouseArea {
2424 id: root
25− anchors.fill: target
25+
26+ // we either fill the target (for mouse)...
27+ anchors.fill: !touchMode ? target : undefined
2628 anchors.margins: -borderThickness
2729
30+ // ... or put it on top for touch controls
31+ anchors.centerIn: touchMode ? target : undefined
32+ width: touchMode ? target.width - borderThickness/2 : undefined
33+ height: touchMode ? target.height - borderThickness/2 : undefined
34+
2835 hoverEnabled: target && !target.maximized // don't grab the resize under the panel
2936
3037 property var windowStateStorage: WindowStateStorage
3138 readonly property alias dragging: d.dragging
3239
3340 // The target item managed by this. Must be a parent or a sibling
34− // The area will anchor to it and manage move and resize events
41+ // The area will anchor to it and manage resize events
3542 property Item target: null
3643 property string windowId: ""
3744 property int borderThickness: 0
@@ -42,6 +49,7 @@ MouseArea {
4249 property int screenWidth: 0
4350 property int screenHeight: 0
4451 property int leftMargin: 0
52+ property bool touchMode: false
4553
4654 QtObject {
4755 id: priv