Skip to content

Commit 95a9f8a

Browse files
committed
Remove feedback while resizing, hide window when moving, fix closing
1 parent e941d47 commit 95a9f8a

File tree

1 file changed

+8
-33
lines changed

1 file changed

+8
-33
lines changed

resources/qml/window.qml

Lines changed: 8 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -122,26 +122,14 @@ FocusScope {
122122
}
123123
}
124124

125-
/* Frame for visual feedback during resizing*/
126-
Rectangle {
127-
id: resizingFrame
128-
width: root.width
129-
height: root.height
130-
border.color: "gray"
131-
border.width: 2
132-
visible: false
133-
color: "transparent"
134-
z: 102
135-
}
136-
137125
MouseArea {
138126
id: resizeHandle
139127
anchors.bottom: parent.bottom
140128
anchors.right: parent.right
141129
width: 100
142130
height: 100
143131
cursorShape: Qt.SizeFDiagCursor
144-
enabled: !fullscreen
132+
enabled: !fullscreen && !minimized
145133
z: 10001
146134

147135
property real startX: 0
@@ -150,11 +138,9 @@ FocusScope {
150138
onPressed: {
151139
startX = mouse.x
152140
startY = mouse.y
153-
resizingFrame.visible = true
154141
}
155142

156143
onReleased: {
157-
resizingFrame.visible = false
158144
let deltaX = mouse.x - startX
159145
let deltaY = mouse.y - startY
160146

@@ -173,23 +159,6 @@ FocusScope {
173159
root.width = width;
174160
root._height = height;
175161
}
176-
177-
/*onPositionChanged: {
178-
let deltaX = mouse.x - startX
179-
let deltaY = mouse.y - startY
180-
let width = Math.max(minWidth, root.width + deltaX)
181-
let height = Math.max(minHeight, root.height + deltaY)
182-
183-
if(supportsScaling){
184-
resizingFrame.width = width
185-
resizingFrame.height = height
186-
} else {
187-
let scale = Math.min(height / root.globalHeight, width / root.globalWidth);
188-
189-
resizingFrame.width = root.globalWidth * scale
190-
resizingFrame.height = root.globalHeight * scale + topbar.height
191-
}
192-
}*/
193162
}
194163

195164
Rectangle {
@@ -198,15 +167,20 @@ FocusScope {
198167
border.width: 2
199168
border.color: "black"
200169
z: 101
170+
visible: !topbarDragHandle.drag.active
201171
}
202172

203173
Rectangle {
204174
id: topbar
205175
visible: !fullscreen || forceTopBarVisible
206176
width: parent.width
207177
height: visible ? 75 : 0
208-
color: root.focus ? "#A0A0A0" : "#707070"
178+
color: "white"
209179
z: 2001
180+
181+
border.width: 2
182+
border.color: "black"
183+
210184
Text {
211185
id: _appName
212186
anchors.fill: parent
@@ -323,6 +297,7 @@ FocusScope {
323297
height: parent.height - topbar.height
324298
width: parent.width
325299
clip: true
300+
visible: !topbarDragHandle.drag.active
326301

327302
MouseArea {
328303
id: qmldiffEventBlocker

0 commit comments

Comments
 (0)