on xenial help sign in
fixup initially visible resize grips in staged mode
commit5e72a007f9417ee2e9c1bd151674ffe78520afd9 authorLukáš Tinkl <lukas.tinkl@canonical.com> dateThu 5 May 2016, 18:13 (10 years ago) parentc048683
3 files changed+17−11
qml/Shell.qml+4−4 qml/Stages/DesktopStage.qml+1−1 qml/Stages/WindowControlsOverlay.qml+12−6
qml/Shell.qml+4−4
@@ -549,10 +549,10 @@ Item {
549549 }
550550
551551 WindowControlsOverlay {
552− x: target ? target.x : -1
553− y: target ? target.y : -1
554− width: target ? target.width : 0
555− height: target? target.height : 0
552+ x: target ? target.x : undefined
553+ y: target ? target.y : undefined
554+ width: target ? target.width : undefined
555+ height: target? target.height : undefined
556556 target: applicationsDisplayLoader.item && applicationsDisplayLoader.item.mainAppDelegate ? applicationsDisplayLoader.item.mainAppDelegate : null
557557 }
558558
qml/Stages/DesktopStage.qml+1−1
@@ -585,7 +585,7 @@ AbstractStage {
585585 screenHeight: appContainer.height
586586 leftMargin: root.leftMargin
587587
588− onPressed: { appDelegate.focus = true; }
588+ onPressed: { mouse.accepted = false; appDelegate.focus = true; }
589589
590590 Component.onCompleted: {
591591 loadWindowState();
qml/Stages/WindowControlsOverlay.qml+12−6
@@ -34,6 +34,8 @@ Item {
3434 // NB: for testing set to 2, not to clash with unity7 touch overlay controls
3535 minimumTouchPoints: 2
3636 maximumTouchPoints: minimumTouchPoints
37+ recognitionPeriod: 500
38+ releaseRejectPeriod: 500
3739
3840 readonly property bool recognizedPress: status == TouchGestureArea.Recognized &&
3941 touchPoints.length >= minimumTouchPoints &&
@@ -45,6 +47,10 @@ Item {
4547 overlayTimer.start();
4648 }
4749 }
50+
51+ onStatusChanged: {
52+ print("Status changed:", status)
53+ }
4854 }
4955
5056 // dismiss timer
@@ -136,7 +142,7 @@ Item {
136142 ResizeGrip { // top left
137143 anchors.horizontalCenter: parent.left
138144 anchors.verticalCenter: parent.top
139− visible: !overlay.anyMaximized
145+ visible: target && !overlay.anyMaximized
140146 resizeTarget: priv.resizeArea
141147 }
142148
@@ -144,7 +150,7 @@ Item {
144150 anchors.horizontalCenter: parent.horizontalCenter
145151 anchors.verticalCenter: parent.top
146152 rotation: 45
147− visible: !overlay.anyMaximized
153+ visible: target && !overlay.anyMaximized
148154 resizeTarget: priv.resizeArea
149155 }
150156
@@ -152,7 +158,7 @@ Item {
152158 anchors.horizontalCenter: parent.right
153159 anchors.verticalCenter: parent.top
154160 rotation: 90
155− visible: !overlay.anyMaximized
161+ visible: target && !overlay.anyMaximized
156162 resizeTarget: priv.resizeArea
157163 }
158164
@@ -167,7 +173,7 @@ Item {
167173 ResizeGrip { // bottom right
168174 anchors.horizontalCenter: parent.right
169175 anchors.verticalCenter: parent.bottom
170− visible: !overlay.anyMaximized
176+ visible: target && !overlay.anyMaximized
171177 resizeTarget: priv.resizeArea
172178 }
173179
@@ -175,7 +181,7 @@ Item {
175181 anchors.horizontalCenter: parent.horizontalCenter
176182 anchors.verticalCenter: parent.bottom
177183 rotation: 45
178− visible: !overlay.anyMaximized
184+ visible: target && !overlay.anyMaximized
179185 resizeTarget: priv.resizeArea
180186 }
181187
@@ -183,7 +189,7 @@ Item {
183189 anchors.horizontalCenter: parent.left
184190 anchors.verticalCenter: parent.bottom
185191 rotation: 90
186− visible: !overlay.anyMaximized
192+ visible: target && !overlay.anyMaximized
187193 resizeTarget: priv.resizeArea
188194 }
189195