Changeset View
Changeset View
Standalone View
Standalone View
src/QuickEditor/SelectionRectangle.qml
Show First 20 Lines • Show All 75 Lines • ▼ Show 20 Line(s) | 64 | MouseArea { | |||
---|---|---|---|---|---|
76 | 76 | | |||
77 | onPressed: { | 77 | onPressed: { | ||
78 | brxLimit = (parent.x + parent.width) - minRectSize; | 78 | brxLimit = (parent.x + parent.width) - minRectSize; | ||
79 | bryLimit = (parent.y + parent.height) - minRectSize; | 79 | bryLimit = (parent.y + parent.height) - minRectSize; | ||
80 | } | 80 | } | ||
81 | 81 | | |||
82 | onPositionChanged: { | 82 | onPositionChanged: { | ||
83 | if ((parent.x + mouse.x) < brxLimit) { | 83 | if ((parent.x + mouse.x) < brxLimit) { | ||
84 | parent.width = parent.width - mouse.x; | | |||
85 | parent.x = parent.x + mouse.x; | 84 | parent.x = parent.x + mouse.x; | ||
85 | parent.width = parent.width - mouse.x; | ||||
86 | } | 86 | } | ||
87 | 87 | | |||
88 | if ((parent.y + mouse.y) < bryLimit) { | 88 | if ((parent.y + mouse.y) < bryLimit) { | ||
89 | parent.height = parent.height - mouse.y; | | |||
90 | parent.y = parent.y + mouse.y; | 89 | parent.y = parent.y + mouse.y; | ||
90 | parent.height = parent.height - mouse.y; | ||||
91 | } | 91 | } | ||
92 | 92 | | |||
93 | drawCanvas.requestPaint(); | 93 | drawCanvas.requestPaint(); | ||
94 | } | 94 | } | ||
95 | } | 95 | } | ||
96 | 96 | | |||
97 | MouseArea { | 97 | MouseArea { | ||
98 | id: hTopRight; | 98 | id: hTopRight; | ||
Show All 14 Lines | |||||
113 | } | 113 | } | ||
114 | 114 | | |||
115 | onPositionChanged: { | 115 | onPositionChanged: { | ||
116 | if ((parent.x + parent.width + mouse.x) > brxLimit) { | 116 | if ((parent.x + parent.width + mouse.x) > brxLimit) { | ||
117 | parent.width = parent.width + mouse.x - mouseAreaSize + 1; | 117 | parent.width = parent.width + mouse.x - mouseAreaSize + 1; | ||
118 | } | 118 | } | ||
119 | 119 | | |||
120 | if ((parent.y + mouse.y) < bryLimit) { | 120 | if ((parent.y + mouse.y) < bryLimit) { | ||
121 | parent.height = parent.height - mouse.y; | | |||
122 | parent.y = parent.y + mouse.y; | 121 | parent.y = parent.y + mouse.y; | ||
122 | parent.height = parent.height - mouse.y; | ||||
123 | } | 123 | } | ||
124 | 124 | | |||
125 | drawCanvas.requestPaint(); | 125 | drawCanvas.requestPaint(); | ||
126 | } | 126 | } | ||
127 | } | 127 | } | ||
128 | 128 | | |||
129 | MouseArea { | 129 | MouseArea { | ||
130 | id: hBottomLeft; | 130 | id: hBottomLeft; | ||
Show All 10 Lines | |||||
141 | 141 | | |||
142 | onPressed: { | 142 | onPressed: { | ||
143 | brxLimit = (parent.x + parent.width) - minRectSize; | 143 | brxLimit = (parent.x + parent.width) - minRectSize; | ||
144 | bryLimit = parent.y + mouseAreaSize + minRectSize; | 144 | bryLimit = parent.y + mouseAreaSize + minRectSize; | ||
145 | } | 145 | } | ||
146 | 146 | | |||
147 | onPositionChanged: { | 147 | onPositionChanged: { | ||
148 | if ((parent.x + mouse.x) < brxLimit) { | 148 | if ((parent.x + mouse.x) < brxLimit) { | ||
149 | parent.width = parent.width - mouse.x; | | |||
150 | parent.x = parent.x + mouse.x; | 149 | parent.x = parent.x + mouse.x; | ||
150 | parent.width = parent.width - mouse.x; | ||||
151 | } | 151 | } | ||
152 | 152 | | |||
153 | if ((parent.y + parent.height + mouse.y) > bryLimit) { | 153 | if ((parent.y + parent.height + mouse.y) > bryLimit) { | ||
154 | parent.height = parent.height + mouse.y - mouseAreaSize + 1; | 154 | parent.height = parent.height + mouse.y - mouseAreaSize + 1; | ||
155 | } | 155 | } | ||
156 | 156 | | |||
157 | drawCanvas.requestPaint(); | 157 | drawCanvas.requestPaint(); | ||
158 | } | 158 | } | ||
▲ Show 20 Lines • Show All 42 Lines • ▼ Show 20 Line(s) | 191 | MouseArea { | |||
201 | cursorShape: Qt.SizeVerCursor; | 201 | cursorShape: Qt.SizeVerCursor; | ||
202 | 202 | | |||
203 | onPressed: { | 203 | onPressed: { | ||
204 | limit = (parent.y + parent.height) - minRectSize; | 204 | limit = (parent.y + parent.height) - minRectSize; | ||
205 | } | 205 | } | ||
206 | 206 | | |||
207 | onPositionChanged: { | 207 | onPositionChanged: { | ||
208 | if ((parent.y + mouse.y) < limit) { | 208 | if ((parent.y + mouse.y) < limit) { | ||
209 | parent.height = parent.height - mouse.y; | | |||
210 | parent.y = parent.y + mouse.y; | 209 | parent.y = parent.y + mouse.y; | ||
210 | parent.height = parent.height - mouse.y; | ||||
211 | } | 211 | } | ||
212 | 212 | | |||
213 | drawCanvas.requestPaint(); | 213 | drawCanvas.requestPaint(); | ||
214 | } | 214 | } | ||
215 | } | 215 | } | ||
216 | 216 | | |||
217 | MouseArea { | 217 | MouseArea { | ||
218 | id: hBottom; | 218 | id: hBottom; | ||
Show All 33 Lines | 242 | MouseArea { | |||
252 | cursorShape: Qt.SizeHorCursor; | 252 | cursorShape: Qt.SizeHorCursor; | ||
253 | 253 | | |||
254 | onPressed: { | 254 | onPressed: { | ||
255 | limit = (parent.x + parent.width) - minRectSize; | 255 | limit = (parent.x + parent.width) - minRectSize; | ||
256 | } | 256 | } | ||
257 | 257 | | |||
258 | onPositionChanged: { | 258 | onPositionChanged: { | ||
259 | if ((parent.x + mouse.x) < limit) { | 259 | if ((parent.x + mouse.x) < limit) { | ||
260 | parent.width = parent.width - mouse.x; | | |||
261 | parent.x = parent.x + mouse.x; | 260 | parent.x = parent.x + mouse.x; | ||
261 | parent.width = parent.width - mouse.x; | ||||
262 | } | 262 | } | ||
263 | 263 | | |||
264 | drawCanvas.requestPaint(); | 264 | drawCanvas.requestPaint(); | ||
265 | } | 265 | } | ||
266 | } | 266 | } | ||
267 | 267 | | |||
268 | MouseArea { | 268 | MouseArea { | ||
269 | id: hRight; | 269 | id: hRight; | ||
Show All 23 Lines |