Changeset View
Changeset View
Standalone View
Standalone View
kcm/package/contents/ui/Output.qml
Show All 40 Lines | 23 | Rectangle { | |||
---|---|---|---|---|---|
41 | visible: model.enabled && model.replicationSourceIndex === 0 | 41 | visible: model.enabled && model.replicationSourceIndex === 0 | ||
42 | onVisibleChanged: screen.resetTotalSize() | 42 | onVisibleChanged: screen.resetTotalSize() | ||
43 | 43 | | |||
44 | x: model.position.x / screen.relativeFactor + screen.xOffset | 44 | x: model.position.x / screen.relativeFactor + screen.xOffset | ||
45 | y: model.position.y / screen.relativeFactor + screen.yOffset | 45 | y: model.position.y / screen.relativeFactor + screen.yOffset | ||
46 | 46 | | |||
47 | width: model.size.width / screen.relativeFactor | 47 | width: model.size.width / screen.relativeFactor | ||
48 | height: model.size.height / screen.relativeFactor | 48 | height: model.size.height / screen.relativeFactor | ||
49 | 49 | | |||
romangg: You can't change these parameters here. Afterwards the positioning will be broken. You can… | |||||
50 | SystemPalette { | 50 | SystemPalette { | ||
51 | id: palette | 51 | id: palette | ||
52 | } | 52 | } | ||
53 | 53 | | |||
54 | radius: 4 | 54 | radius: 4 | ||
55 | color: palette.window | 55 | color: palette.window | ||
56 | smooth: true | 56 | smooth: true | ||
57 | clip: true | 57 | clip: true | ||
▲ Show 20 Lines • Show All 192 Lines • ▼ Show 20 Line(s) | 249 | } else { | |||
250 | isLongPressed = false; | 250 | isLongPressed = false; | ||
251 | } | 251 | } | ||
252 | } | 252 | } | ||
253 | onLongPressed: isLongPressed = true; | 253 | onLongPressed: isLongPressed = true; | ||
254 | longPressThreshold: 0.3 | 254 | longPressThreshold: 0.3 | ||
255 | } | 255 | } | ||
256 | DragHandler { | 256 | DragHandler { | ||
257 | id: dragHandler | 257 | id: dragHandler | ||
258 | enabled: kcm.outputModel && kcm.outputModel.rowCount() > 1 | ||||
258 | acceptedButtons: Qt.LeftButton | 259 | acceptedButtons: Qt.LeftButton | ||
259 | target: null | 260 | target: null | ||
260 | 261 | | |||
261 | onTranslationChanged: { | 262 | onTranslationChanged: { | ||
262 | var newX = dragStartPosition.x + translation.x; | 263 | var newX = dragStartPosition.x + translation.x; | ||
263 | var newY = dragStartPosition.y + translation.y; | 264 | var newY = dragStartPosition.y + translation.y; | ||
264 | model.position = getAbsolutePosition(Qt.point(newX, newY)); | 265 | model.position = getAbsolutePosition(Qt.point(newX, newY)); | ||
265 | } | 266 | } | ||
266 | } | 267 | } | ||
267 | } | 268 | } | ||
268 | 269 | |
You can't change these parameters here. Afterwards the positioning will be broken. You can multiply the screen.relativeFactor directly but I would look out for keeping anything in the outputs still readable. Multiplying it with 2 gives me only few letters in the output depiction anymore.