diff --git a/containments/panel/contents/ui/ConfigOverlay.qml b/containments/panel/contents/ui/ConfigOverlay.qml index 8111e6d43..96ea18948 100644 --- a/containments/panel/contents/ui/ConfigOverlay.qml +++ b/containments/panel/contents/ui/ConfigOverlay.qml @@ -1,399 +1,399 @@ /* * Copyright 2013 Marco Martin * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 2.010-1301, USA. */ import QtQuick 2.1 import QtQuick.Layouts 1.0 import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.components 2.0 as PlasmaComponents import org.kde.kquickcontrolsaddons 2.0 MouseArea { id: configurationArea z: 1000 - anchors { - fill: parent - rightMargin: (plasmoid.formFactor !== PlasmaCore.Types.Vertical) ? toolBox.width : 0 - bottomMargin: (plasmoid.formFactor === PlasmaCore.Types.Vertical) ? toolBox.height : 0 - } + anchors.fill: currentLayout hoverEnabled: true property bool isResizingLeft: false property bool isResizingRight: false property Item currentApplet property int lastX property int lastY readonly property int spacerHandleSize: units.smallSpacing onHeightChanged: tooltip.visible = false; onWidthChanged: tooltip.visible = false; onPositionChanged: { if (currentApplet && currentApplet.applet && currentApplet.applet.pluginName == "org.kde.plasma.panelspacer") { if (plasmoid.formFactor === PlasmaCore.Types.Vertical) { if ((mouse.y - handle.y) < spacerHandleSize || (mouse.y - handle.y) > (handle.height - spacerHandleSize)) { configurationArea.cursorShape = Qt.SizeVerCursor; } else { configurationArea.cursorShape = Qt.ArrowCursor; } } else { if ((mouse.x - handle.x) < spacerHandleSize || (mouse.x - handle.x) > (handle.width - spacerHandleSize)) { configurationArea.cursorShape = Qt.SizeHorCursor; } else { configurationArea.cursorShape = Qt.ArrowCursor; } } } else { configurationArea.cursorShape = Qt.ArrowCursor; } if (pressed) { if (currentApplet && currentApplet.applet.pluginName == "org.kde.plasma.panelspacer") { if (isResizingLeft) { if (plasmoid.formFactor === PlasmaCore.Types.Vertical) { handle.y += (mouse.y - lastY); handle.height = currentApplet.height + (currentApplet.y - handle.y); } else { handle.x += (mouse.x - lastX); handle.width = currentApplet.width + (currentApplet.x - handle.x); } lastX = mouse.x; lastY = mouse.y; return; } else if (isResizingRight) { if (plasmoid.formFactor === PlasmaCore.Types.Vertical) { handle.height = mouse.y - handle.y; } else { handle.width = mouse.x - handle.x; } lastX = mouse.x; lastY = mouse.y; return; } } var padding = units.gridUnit * 3; if (currentApplet && (mouse.x < -padding || mouse.y < -padding || mouse.x > width + padding || mouse.y > height + padding)) { var newCont = plasmoid.containmentAt(mouse.x, mouse.y); if (newCont && newCont != plasmoid) { var newPos = newCont.mapFromApplet(plasmoid, mouse.x, mouse.y); newCont.addApplet(currentApplet.applet, newPos.x, newPos.y); root.dragOverlay.currentApplet = null; return; } } if (plasmoid.formFactor === PlasmaCore.Types.Vertical) { currentApplet.y += (mouse.y - lastY); handle.y = currentApplet.y; } else { currentApplet.x += (mouse.x - lastX); handle.x = currentApplet.x; } lastX = mouse.x; lastY = mouse.y; var item = currentLayout.childAt(mouse.x, mouse.y); if (item && item !== placeHolder) { placeHolder.width = item.width; placeHolder.height = item.height; placeHolder.parent = configurationArea; var posInItem = mapToItem(item, mouse.x, mouse.y); if ((plasmoid.formFactor === PlasmaCore.Types.Vertical && posInItem.y < item.height/2) || (plasmoid.formFactor !== PlasmaCore.Types.Vertical && posInItem.x < item.width/2)) { root.layoutManager.insertBefore(item, placeHolder); } else { root.layoutManager.insertAfter(item, placeHolder); } } } else { var item = currentLayout.childAt(mouse.x, mouse.y); if (root.dragOverlay && item && item !== lastSpacer) { root.dragOverlay.currentApplet = item; } else { root.dragOverlay.currentApplet = null; } } if (root.dragOverlay.currentApplet) { hideTimer.stop(); tooltip.visible = true; tooltip.raise(); } } onExited: hideTimer.restart(); onCurrentAppletChanged: { if (!currentApplet || !root.dragOverlay.currentApplet) { hideTimer.start(); return; } handle.x = currentApplet.x; handle.y = currentApplet.y; handle.width = currentApplet.width; handle.height = currentApplet.height; } onPressed: { if (!root.dragOverlay.currentApplet) { return; } if (currentApplet.applet.pluginName == "org.kde.plasma.panelspacer") { if (plasmoid.formFactor === PlasmaCore.Types.Vertical) { if ((mouse.y - handle.y) < spacerHandleSize) { configurationArea.isResizingLeft = true; configurationArea.isResizingRight = false; } else if ((mouse.y - handle.y) > (handle.height - spacerHandleSize)) { configurationArea.isResizingLeft = false; configurationArea.isResizingRight = true; } else { configurationArea.isResizingLeft = false; configurationArea.isResizingRight = false; } } else { if ((mouse.x - handle.x) < spacerHandleSize) { configurationArea.isResizingLeft = true; configurationArea.isResizingRight = false; } else if ((mouse.x - handle.x) > (handle.width - spacerHandleSize)) { configurationArea.isResizingLeft = false; configurationArea.isResizingRight = true; } else { configurationArea.isResizingLeft = false; configurationArea.isResizingRight = false; } } } lastX = mouse.x; lastY = mouse.y; placeHolder.width = currentApplet.width; placeHolder.height = currentApplet.height; root.layoutManager.insertBefore(currentApplet, placeHolder); - currentApplet.parent = root; + currentApplet.parent = moveAppletLayer; currentApplet.z = 900; } onReleased: { if (!root.dragOverlay.currentApplet) { return; } if (plasmoid.formFactor === PlasmaCore.Types.Vertical) { currentApplet.applet.configuration.length = handle.height; } else { currentApplet.applet.configuration.length = handle.width; } configurationArea.isResizingLeft = false; configurationArea.isResizingRight = false; root.layoutManager.insertBefore(placeHolder, currentApplet); placeHolder.parent = configurationArea; currentApplet.z = 1; handle.x = currentApplet.x; handle.y = currentApplet.y; handle.width = currentApplet.width; handle.height = currentApplet.height; root.layoutManager.save(); } Item { id: placeHolder visible: configurationArea.containsMouse Layout.fillWidth: currentApplet ? currentApplet.Layout.fillWidth : false Layout.fillHeight: currentApplet ? currentApplet.Layout.fillHeight : false } Timer { id: hideTimer interval: units.longDuration * 3 onTriggered: tooltip.visible = false; } Connections { target: currentApplet onXChanged: handle.x = currentApplet.x onYChanged: handle.y = currentApplet.y onWidthChanged: handle.width = currentApplet.width onHeightChanged: handle.height = currentApplet.height } Rectangle { id: handle visible: configurationArea.containsMouse color: theme.backgroundColor radius: 3 opacity: currentApplet ? 0.5 : 0 PlasmaCore.IconItem { source: "transform-move" width: Math.min(parent.width, parent.height) height: width anchors.centerIn: parent } Rectangle { anchors { left: parent.left top: parent.top bottom: (plasmoid.formFactor !== PlasmaCore.Types.Vertical) ? parent.bottom : undefined right: (plasmoid.formFactor !== PlasmaCore.Types.Vertical) ? undefined : parent.right } visible: currentApplet && currentApplet.applet.pluginName == "org.kde.plasma.panelspacer" opacity: visible && !xAnim.running && !yAnim.running ? 1.0 : 0 width: configurationArea.spacerHandleSize height: configurationArea.spacerHandleSize color: theme.textColor Behavior on opacity { NumberAnimation { duration: units.longDuration easing.type: Easing.InOutQuad } } } Rectangle { anchors { right: parent.right top: (plasmoid.formFactor !== PlasmaCore.Types.Vertical) ? parent.top : undefined bottom: parent.bottom left: (plasmoid.formFactor !== PlasmaCore.Types.Vertical) ? undefined : parent.left } visible: currentApplet && currentApplet.applet.pluginName == "org.kde.plasma.panelspacer" opacity: visible && !xAnim.running && !yAnim.running ? 1.0 : 0 width: configurationArea.spacerHandleSize height: configurationArea.spacerHandleSize color: theme.textColor Behavior on opacity { NumberAnimation { duration: units.longDuration easing.type: Easing.InOutQuad } } } Behavior on x { enabled: !configurationArea.pressed NumberAnimation { id: xAnim duration: units.longDuration easing.type: Easing.InOutQuad } } Behavior on y { id: yAnim enabled: !configurationArea.pressed NumberAnimation { duration: units.longDuration easing.type: Easing.InOutQuad } } Behavior on width { enabled: !configurationArea.pressed NumberAnimation { duration: units.longDuration easing.type: Easing.InOutQuad } } Behavior on height { enabled: !configurationArea.pressed NumberAnimation { duration: units.longDuration easing.type: Easing.InOutQuad } } Behavior on opacity { NumberAnimation { duration: units.longDuration easing.type: Easing.InOutQuad } } } PlasmaCore.Dialog { id: tooltip visualParent: currentApplet type: PlasmaCore.Dialog.Dock flags: Qt.WindowStaysOnTopHint|Qt.WindowDoesNotAcceptFocus|Qt.BypassWindowManagerHint location: plasmoid.location onVisualParentChanged: { if (visualParent) { configureButton.visible = currentApplet.applet.action("configure") && currentApplet.applet.action("configure").enabled; closeButton.visible = currentApplet.applet.action("remove") && currentApplet.applet.action("remove").enabled; label.text = currentApplet.applet.title; } } mainItem: MouseArea { enabled: currentApplet width: handleRow.childrenRect.width + (2 * handleRow.spacing) height: Math.max(configureButton.height, label.contentHeight, closeButton.height) hoverEnabled: true onEntered: hideTimer.stop(); onExited: hideTimer.restart(); + + LayoutMirroring.enabled: Qt.application.layoutDirection === Qt.RightToLeft + LayoutMirroring.childrenInherit: true + Row { id: handleRow anchors.horizontalCenter: parent.horizontalCenter spacing: units.smallSpacing PlasmaComponents.ToolButton { id: configureButton anchors.verticalCenter: parent.verticalCenter iconSource: "configure" onClicked: { tooltip.visible = false; currentApplet.applet.action("configure").trigger() } } PlasmaComponents.Label { id: label anchors.verticalCenter: parent.verticalCenter textFormat: Text.PlainText maximumLineCount: 1 } PlasmaComponents.ToolButton { id: closeButton anchors.verticalCenter: parent.verticalCenter iconSource: "window-close" onClicked: { tooltip.visible = false; currentApplet.applet.action("remove").trigger(); } } } } } } diff --git a/containments/panel/contents/ui/main.qml b/containments/panel/contents/ui/main.qml index 35d8d96cc..5b977f930 100644 --- a/containments/panel/contents/ui/main.qml +++ b/containments/panel/contents/ui/main.qml @@ -1,462 +1,470 @@ /* * Copyright 2013 Marco Martin * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 2.010-1301, USA. */ import QtQuick 2.1 import QtQuick.Layouts 1.1 import org.kde.plasma.plasmoid 2.0 import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.components 2.0 as PlasmaComponents import org.kde.kquickcontrolsaddons 2.0 import org.kde.draganddrop 2.0 as DragDrop import "LayoutManager.js" as LayoutManager DragDrop.DropArea { id: root width: 640 height: 48 //BEGIN properties Layout.minimumWidth: fixedWidth > 0 ? fixedWidth : (currentLayout.Layout.minimumWidth + (isHorizontal && toolBox ? toolBox.width : 0)) Layout.maximumWidth: fixedWidth > 0 ? fixedWidth : (currentLayout.Layout.maximumWidth + (isHorizontal && toolBox ? toolBox.width : 0)) Layout.preferredWidth: fixedWidth > 0 ? fixedWidth : (currentLayout.Layout.preferredWidth + (isHorizontal && toolBox ? toolBox.width : 0)) Layout.minimumHeight: fixedHeight > 0 ? fixedHeight : (currentLayout.Layout.minimumHeight + (!isHorizontal && toolBox ? toolBox.height : 0)) Layout.maximumHeight: fixedHeight > 0 ? fixedHeight : (currentLayout.Layout.maximumHeight + (!isHorizontal && toolBox ? toolBox.height : 0)) Layout.preferredHeight: fixedHeight > 0 ? fixedHeight : (currentLayout.Layout.preferredHeight + (!isHorizontal && toolBox? toolBox.height : 0)) property Item toolBox property var layoutManager: LayoutManager property Item dragOverlay property bool isHorizontal: plasmoid.formFactor != PlasmaCore.Types.Vertical property int fixedWidth: 0 property int fixedHeight: 0 //END properties //BEGIN functions function addApplet(applet, x, y) { var container = appletContainerComponent.createObject(root, { applet: applet, // don't show applet if it choses to be hidden but still make it // accessible in the panelcontroller visible: Qt.binding(function() { return applet.status !== PlasmaCore.Types.HiddenStatus || (!plasmoid.immutable && plasmoid.userConfiguring) }) }); applet.parent = container; applet.anchors.fill = container; applet.visible = true; // Is there a DND placeholder? Replace it! if (dndSpacer.parent === currentLayout) { LayoutManager.insertBefore(dndSpacer, container); dndSpacer.parent = root; return; // If the provided position is valid, use it. } else if (x >= 0 && y >= 0) { var index = LayoutManager.insertAtCoordinates(container, x , y); // Fall through to determining an appropriate insert position. } else { var before = null; container.animationsEnabled = false; if (lastSpacer.parent === currentLayout) { before = lastSpacer; } // Insert icons to the left of whatever is at the center (usually a Task Manager), // if it exists. // FIXME TODO: This is a real-world fix to produce a sensible initial position for // launcher icons added by launcher menu applets. The basic approach has been used // since Plasma 1. However, "add launcher to X" is a generic-enough concept and // frequent-enough occurence that we'd like to abstract it further in the future // and get rid of the uglyness of parties external to the containment adding applets // of a specific type, and the containment caring about the applet type. In a better // system the containment would be informed of requested launchers, and determine by // itself what it wants to do with that information. if (!startupTimer.running && applet.pluginName == "org.kde.plasma.icon") { var middle = currentLayout.childAt(root.width / 2, root.height / 2); if (middle) { before = middle; } // Otherwise if lastSpacer is here, enqueue before it. } if (before) { LayoutManager.insertBefore(before, container); // Fall through to adding at the end. } else { container.parent = currentLayout; } //event compress the enable of animations startupTimer.restart(); } if (applet.Layout.fillWidth) { lastSpacer.parent = root; } } function checkLastSpacer() { lastSpacer.parent = root var expands = false; if (isHorizontal) { for (var container in currentLayout.children) { var item = currentLayout.children[container]; if (item.Layout && item.Layout.fillWidth) { expands = true; } } } else { for (var container in currentLayout.children) { var item = currentLayout.children[container]; if (item.Layout && item.Layout.fillHeight) { expands = true; } } } if (!expands) { lastSpacer.parent = currentLayout } } //END functions //BEGIN connections Component.onCompleted: { currentLayout.isLayoutHorizontal = isHorizontal LayoutManager.plasmoid = plasmoid; LayoutManager.root = root; LayoutManager.layout = currentLayout; LayoutManager.lastSpacer = lastSpacer; LayoutManager.restore(); containmentSizeSyncTimer.restart(); plasmoid.action("configure").visible = Qt.binding(function() { return !plasmoid.immutable; }); plasmoid.action("configure").enabled = Qt.binding(function() { return !plasmoid.immutable; }); } onDragEnter: { if (plasmoid.immutable) { event.ignore(); return; } //during drag operations we disable panel auto resize if (root.isHorizontal) { root.fixedWidth = root.width } else { root.fixedHeight = root.height } LayoutManager.insertAtCoordinates(dndSpacer, event.x, event.y) } onDragMove: { LayoutManager.insertAtCoordinates(dndSpacer, event.x, event.y) } onDragLeave: { dndSpacer.parent = root; root.fixedWidth = 0; root.fixedHeight = 0; } onDrop: { plasmoid.processMimeData(event.mimeData, event.x, event.y); event.accept(event.proposedAction); root.fixedWidth = 0; root.fixedHeight = 0; containmentSizeSyncTimer.restart(); } Containment.onAppletAdded: { addApplet(applet, x, y); LayoutManager.save(); } Containment.onAppletRemoved: { LayoutManager.removeApplet(applet); var flexibleFound = false; for (var i = 0; i < currentLayout.children.length; ++i) { var applet = currentLayout.children[i].applet; if (((root.isHorizontal && applet.Layout.fillWidth) || (!root.isHorizontal && applet.Layout.fillHeight)) && applet.visible) { flexibleFound = true; break } } if (!flexibleFound) { lastSpacer.parent = currentLayout; } LayoutManager.save(); } Plasmoid.onUserConfiguringChanged: { if (plasmoid.immutable) { if (dragOverlay) { dragOverlay.destroy(); } return; } if (plasmoid.userConfiguring) { for (var i = 0; i < plasmoid.applets.length; ++i) { plasmoid.applets[i].expanded = false; } if (!dragOverlay) { var component = Qt.createComponent("ConfigOverlay.qml"); if (component.status === Component.Ready) { dragOverlay = component.createObject(root); } else { console.log("Could not create ConfigOverlay:", component.errorString()); } component.destroy(); } else { dragOverlay.visible = true; } } else { dragOverlay.destroy(); } } Plasmoid.onFormFactorChanged: containmentSizeSyncTimer.restart(); Plasmoid.onImmutableChanged: containmentSizeSyncTimer.restart(); onToolBoxChanged: { containmentSizeSyncTimer.restart(); if (startupTimer.running) { startupTimer.restart(); } } //END connections //BEGIN components Component { id: appletContainerComponent Item { id: container visible: false property bool animationsEnabled: true //when the applet moves caused by its resize, don't animate. //this is completely heuristic, but looks way less "jumpy" property bool movingForResize: false Layout.fillWidth: applet && applet.Layout.fillWidth Layout.onFillWidthChanged: { if (plasmoid.formFactor != PlasmaCore.Types.Vertical) { checkLastSpacer(); } } Layout.fillHeight: applet && applet.Layout.fillHeight Layout.onFillHeightChanged: { if (plasmoid.formFactor == PlasmaCore.Types.Vertical) { checkLastSpacer(); } } Layout.minimumWidth: (currentLayout.isLayoutHorizontal ? (applet && applet.Layout.minimumWidth > 0 ? applet.Layout.minimumWidth : root.height) : root.width) Layout.minimumHeight: (!currentLayout.isLayoutHorizontal ? (applet && applet.Layout.minimumHeight > 0 ? applet.Layout.minimumHeight : root.width) : root.height) Layout.preferredWidth: (currentLayout.isLayoutHorizontal ? (applet && applet.Layout.preferredWidth > 0 ? applet.Layout.preferredWidth : root.height) : root.width) Layout.preferredHeight: (!currentLayout.isLayoutHorizontal ? (applet && applet.Layout.preferredHeight > 0 ? applet.Layout.preferredHeight : root.width) : root.height) Layout.maximumWidth: (currentLayout.isLayoutHorizontal ? (applet && applet.Layout.maximumWidth > 0 ? applet.Layout.maximumWidth : (Layout.fillWidth ? root.width : root.height)) : root.height) Layout.maximumHeight: (!currentLayout.isLayoutHorizontal ? (applet && applet.Layout.maximumHeight > 0 ? applet.Layout.maximumHeight : (Layout.fillHeight ? root.height : root.width)) : root.width) property int oldX: x property int oldY: y property Item applet onAppletChanged: { if (!applet) { destroy(); } } Layout.onMinimumWidthChanged: movingForResize = true; Layout.onMinimumHeightChanged: movingForResize = true; Layout.onMaximumWidthChanged: movingForResize = true; Layout.onMaximumHeightChanged: movingForResize = true; PlasmaComponents.BusyIndicator { z: 1000 visible: applet && applet.busy running: visible anchors.centerIn: parent width: Math.min(parent.width, parent.height) height: width } onXChanged: { if (movingForResize) { movingForResize = false; return; } if (!animationsEnabled) { startupTimer.restart(); return; } translation.x = oldX - x translation.y = oldY - y translAnim.running = true oldX = x oldY = y } onYChanged: { if (movingForResize) { movingForResize = false; return; } if (!animationsEnabled) { startupTimer.restart(); return; } translation.x = oldX - x translation.y = oldY - y translAnim.running = true oldX = x oldY = y } transform: Translate { id: translation } NumberAnimation { id: translAnim duration: units.longDuration easing.type: Easing.InOutQuad target: translation properties: "x,y" to: 0 } } } //END components //BEGIN UI elements Item { id: lastSpacer parent: currentLayout Layout.fillWidth: true Layout.fillHeight: true } Item { id: dndSpacer Layout.preferredWidth: width Layout.preferredHeight: height width: (plasmoid.formFactor == PlasmaCore.Types.Vertical) ? currentLayout.width : theme.mSize(theme.defaultFont).width * 10 height: (plasmoid.formFactor == PlasmaCore.Types.Vertical) ? theme.mSize(theme.defaultFont).width * 10 : currentLayout.height } + // while the user is moving the applet when configuring the panel, the applet is reparented + // here so it can be moved freely; previously it was reparented to "root" but this one does not + // take into account the toolbox (which is left-of) the layout in right-to-left languages + Item { + id: moveAppletLayer + anchors.fill: currentLayout + } + GridLayout { id: currentLayout property bool isLayoutHorizontal rowSpacing: units.smallSpacing columnSpacing: units.smallSpacing Layout.preferredWidth: { var width = 0; for (var i = 0, length = currentLayout.children.length; i < length; ++i) { var item = currentLayout.children[i]; if (item.Layout) { width += Math.max(item.Layout.minimumWidth, item.Layout.preferredWidth); } } return width; } Layout.preferredHeight: { var height = 0; for (var i = 0, length = currentLayout.children.length; i < length; ++i) { var item = currentLayout.children[i]; if (item.Layout) { height += Math.max(item.Layout.minimumHeight, item.Layout.preferredHeight); } } return height; } rows: 1 columns: 1 //when horizontal layout top-to-bottom, this way it will obey our limit of one row and actually lay out left to right flow: isHorizontal ? GridLayout.TopToBottom : GridLayout.LeftToRight layoutDirection: Qt.application.layoutDirection } onWidthChanged: { containmentSizeSyncTimer.restart() if (startupTimer.running) { startupTimer.restart(); } } onHeightChanged: { containmentSizeSyncTimer.restart() if (startupTimer.running) { startupTimer.restart(); } } Timer { id: containmentSizeSyncTimer interval: 150 onTriggered: { dndSpacer.parent = root; currentLayout.x = (Qt.application.layoutDirection === Qt.RightToLeft && !plasmoid.immutable) ? toolBox.width : 0; currentLayout.y = 0 currentLayout.width = root.width - (isHorizontal && toolBox && !plasmoid.immutable ? toolBox.width : 0) currentLayout.height = root.height - (!isHorizontal && toolBox && !plasmoid.immutable ? toolBox.height : 0) currentLayout.isLayoutHorizontal = isHorizontal } } //FIXME: I don't see other ways at the moment a way to see when the UI is REALLY ready Timer { id: startupTimer interval: 4000 onTriggered: { for (var i = 0; i < currentLayout.children.length; ++i) { var item = currentLayout.children[i]; if (item.hasOwnProperty("animationsEnabled")) { item.animationsEnabled = true; } } } } //END UI elements }