on xenial help sign in
improve resizing ;)
1ff9050Lukáš Tinkl
qml/Stages/DesktopStage.qml+1
@@ -593,6 +593,7 @@ AbstractStage {
593 screenWidth: appContainer.width
593 screenWidth: appContainer.width
594 screenHeight: appContainer.height
594 screenHeight: appContainer.height
595 leftMargin: root.leftMargin
595 leftMargin: root.leftMargin
596+ touchMode: touchControls.overlayShown
596
597
597 onPressed: { appDelegate.focus = true; }
598 onPressed: { appDelegate.focus = true; }
598
599
qml/Stages/WindowResizeArea.qml+10−2
@@ -22,16 +22,23 @@ import "../Components/PanelState"
22
22
23MouseArea {
23MouseArea {
24 id: root
24 id: root
25+
26+ // we either fill the target (for mouse)...
25− anchors.fill: target
27+ anchors.fill: !touchMode ? target : undefined
26 anchors.margins: -borderThickness
28 anchors.margins: -borderThickness
27
29
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+
28 hoverEnabled: target && !target.maximized // don't grab the resize under the panel
35 hoverEnabled: target && !target.maximized // don't grab the resize under the panel
29
36
30 property var windowStateStorage: WindowStateStorage
37 property var windowStateStorage: WindowStateStorage
31 readonly property alias dragging: d.dragging
38 readonly property alias dragging: d.dragging
32
39
33 // The target item managed by this. Must be a parent or a sibling
40 // 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
35 property Item target: null
42 property Item target: null
36 property string windowId: ""
43 property string windowId: ""
37 property int borderThickness: 0
44 property int borderThickness: 0
@@ -42,6 +49,7 @@ MouseArea {
42 property int screenWidth: 0
49 property int screenWidth: 0
43 property int screenHeight: 0
50 property int screenHeight: 0
44 property int leftMargin: 0
51 property int leftMargin: 0
52+ property bool touchMode: false
45
53
46 QtObject {
54 QtObject {
47 id: priv
55 id: priv