on xenial help sign in
improve resizing ;)
commit1ff905068c9433d770c05eb1d4a6de18f208ce7d authorLukáš Tinkl <lukas.tinkl@canonical.com> dateThu 26 May 2016, 12:39 (10 years ago) parenta9fab96
2 files changed+11−2
qml/Stages/DesktopStage.qml+1 qml/Stages/WindowResizeArea.qml+10−2
qml/Stages/DesktopStage.qml+1
@@ -593,6 +593,7 @@ AbstractStage {
593593 screenWidth: appContainer.width
594594 screenHeight: appContainer.height
595595 leftMargin: root.leftMargin
596+ touchMode: touchControls.overlayShown
596597
597598 onPressed: { appDelegate.focus = true; }
598599
qml/Stages/WindowResizeArea.qml+10−2
@@ -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