Changeset View
Changeset View
Standalone View
Standalone View
containments/panel/contents/ui/main.qml
Show First 20 Lines • Show All 227 Lines • ▼ Show 20 Line(s) | 227 | } else { | |||
---|---|---|---|---|---|
228 | dragOverlay.visible = true; | 228 | dragOverlay.visible = true; | ||
229 | } | 229 | } | ||
230 | } else { | 230 | } else { | ||
231 | dragOverlay.destroy(); | 231 | dragOverlay.destroy(); | ||
232 | } | 232 | } | ||
233 | } | 233 | } | ||
234 | 234 | | |||
235 | Plasmoid.onFormFactorChanged: containmentSizeSyncTimer.restart(); | 235 | Plasmoid.onFormFactorChanged: containmentSizeSyncTimer.restart(); | ||
236 | Plasmoid.onImmutableChanged: containmentSizeSyncTimer.restart(); | 236 | Containment.onEditModeChanged: containmentSizeSyncTimer.restart(); | ||
237 | 237 | | |||
238 | onToolBoxChanged: { | 238 | onToolBoxChanged: { | ||
239 | containmentSizeSyncTimer.restart(); | 239 | containmentSizeSyncTimer.restart(); | ||
240 | if (startupTimer.running) { | 240 | if (startupTimer.running) { | ||
241 | startupTimer.restart(); | 241 | startupTimer.restart(); | ||
242 | } | 242 | } | ||
243 | } | 243 | } | ||
244 | //END connections | 244 | //END connections | ||
▲ Show 20 Lines • Show All 169 Lines • ▼ Show 20 Line(s) | 410 | onHeightChanged: { | |||
414 | } | 414 | } | ||
415 | } | 415 | } | ||
416 | 416 | | |||
417 | Timer { | 417 | Timer { | ||
418 | id: containmentSizeSyncTimer | 418 | id: containmentSizeSyncTimer | ||
419 | interval: 150 | 419 | interval: 150 | ||
420 | onTriggered: { | 420 | onTriggered: { | ||
421 | dndSpacer.parent = root; | 421 | dndSpacer.parent = root; | ||
422 | currentLayout.x = (isHorizontal && toolBox && Qt.application.layoutDirection === Qt.RightToLeft && !plasmoid.immutable) ? toolBox.width : 0; | 422 | currentLayout.x = (isHorizontal && toolBox && Qt.application.layoutDirection === Qt.RightToLeft && plasmoid.editMode) ? toolBox.width : 0; | ||
423 | currentLayout.y = 0 | 423 | currentLayout.y = 0 | ||
424 | currentLayout.width = root.width - (isHorizontal && toolBox && !plasmoid.immutable ? toolBox.width : 0) | 424 | currentLayout.width = root.width - (isHorizontal && toolBox && plasmoid.editMode ? toolBox.width : 0) | ||
425 | currentLayout.height = root.height - (!isHorizontal && toolBox && !plasmoid.immutable ? toolBox.height : 0) | 425 | currentLayout.height = root.height - (!isHorizontal && toolBox && plasmoid.editMode ? toolBox.height : 0) | ||
426 | currentLayout.isLayoutHorizontal = isHorizontal | 426 | currentLayout.isLayoutHorizontal = isHorizontal | ||
427 | } | 427 | } | ||
428 | } | 428 | } | ||
429 | 429 | | |||
430 | //FIXME: I don't see other ways at the moment a way to see when the UI is REALLY ready | 430 | //FIXME: I don't see other ways at the moment a way to see when the UI is REALLY ready | ||
431 | Timer { | 431 | Timer { | ||
432 | id: startupTimer | 432 | id: startupTimer | ||
433 | interval: 4000 | 433 | interval: 4000 | ||
Show All 11 Lines |