diff --git a/examples/applets/compactrepresentation/contents/ui/main.qml b/examples/applets/compactrepresentation/contents/ui/main.qml index 8a1ef7196..78c81576a 100644 --- a/examples/applets/compactrepresentation/contents/ui/main.qml +++ b/examples/applets/compactrepresentation/contents/ui/main.qml @@ -19,13 +19,14 @@ */ import QtQuick 2.0 +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 Item { - property int minimumWidth: 200 - property int minimumHeight: 300 - property Component compactRepresentation: Component { + Layout.minimumWidth: 200 + Layout.minimumHeight: 300 + Plasmoid.compactRepresentation: Component { PlasmaComponents.Button { text: i18n("Click me") onClicked: plasmoid.expanded = !plasmoid.expanded diff --git a/examples/applets/conditionalloader/contents/ui/main.qml b/examples/applets/conditionalloader/contents/ui/main.qml index 0f855da24..985868ff4 100644 --- a/examples/applets/conditionalloader/contents/ui/main.qml +++ b/examples/applets/conditionalloader/contents/ui/main.qml @@ -17,6 +17,7 @@ */ import QtQuick 2.0 +import org.kde.plasma.plasmoid 2.0 import QtQuick.Layouts 1.0 import org.kde.plasma.core 2.0 as PlasmaCore @@ -30,10 +31,10 @@ Rectangle { height: 100 radius: 10 smooth: true - property int minimumWidth: units.gridUnit * 20 - property int minimumHeight: column.implicitHeight + Layout.minimumWidth: units.gridUnit * 20 + Layout.minimumHeight: column.implicitHeight - property Component compactRepresentation: Component { + Plasmoid.compactRepresentation: Component { Rectangle { MouseArea { anchors.fill: parent diff --git a/examples/applets/config/contents/ui/main.qml b/examples/applets/config/contents/ui/main.qml index 15969b0bc..2c0cb62ce 100644 --- a/examples/applets/config/contents/ui/main.qml +++ b/examples/applets/config/contents/ui/main.qml @@ -26,8 +26,8 @@ Item { id: root width: 100 height: 100 - property int minimumWidth: units.gridUnit * 20 - property int minimumHeight: column.implicitHeight + Layout.minimumWidth: units.gridUnit * 20 + Layout.minimumHeight: column.implicitHeight ColumnLayout { diff --git a/examples/applets/dataenginemodel/contents/ui/main.qml b/examples/applets/dataenginemodel/contents/ui/main.qml index d64e71f48..e28741200 100644 --- a/examples/applets/dataenginemodel/contents/ui/main.qml +++ b/examples/applets/dataenginemodel/contents/ui/main.qml @@ -19,6 +19,7 @@ */ import QtQuick 2.0 +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.plasma.extras 2.0 as PlasmaExtras @@ -26,8 +27,8 @@ import org.kde.plasma.extras 2.0 as PlasmaExtras Column { width: 500 height: 500 - property int minimumWidth: 200 - property int minimumHeight: 300 + Layout.minimumWidth: 200 + Layout.minimumHeight: 300 PlasmaCore.DataSource { id: source diff --git a/examples/applets/helloworld/contents/ui/main.qml b/examples/applets/helloworld/contents/ui/main.qml index 810d5f8b1..c6746f5b2 100644 --- a/examples/applets/helloworld/contents/ui/main.qml +++ b/examples/applets/helloworld/contents/ui/main.qml @@ -19,12 +19,13 @@ */ import QtQuick 2.0 +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 Item { - property int minimumWidth: 200 - property int minimumHeight: 300 + Layout.minimumWidth: 200 + Layout.minimumHeight: 300 PlasmaComponents.Label { text: i18n("Hello world") diff --git a/examples/applets/notes/contents/ui/main.qml b/examples/applets/notes/contents/ui/main.qml index d0c5e13fc..b74e15203 100644 --- a/examples/applets/notes/contents/ui/main.qml +++ b/examples/applets/notes/contents/ui/main.qml @@ -18,12 +18,13 @@ */ import QtQuick 2.0 +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 PlasmaCore.SvgItem { - property int minimumWidth: 150 - property int minimumHeight: 150 + Layout.minimumWidth: 150 + Layout.minimumHeight: 150 svg: PlasmaCore.Svg("widgets/notes") elementId: "yellow-notes" diff --git a/examples/applets/qmltasks/contents/ui/qmltasks.qml b/examples/applets/qmltasks/contents/ui/qmltasks.qml index 91a99106e..e6e538a74 100644 --- a/examples/applets/qmltasks/contents/ui/qmltasks.qml +++ b/examples/applets/qmltasks/contents/ui/qmltasks.qml @@ -27,8 +27,8 @@ Item { width: 400 height: 32 - property bool fillWidth: true - property bool fillHeight: true + Layout.fillWidth: true + Layout.fillHeight: true implicitWidth: tasksModel.count * 50 PlasmaCore.DataSource { diff --git a/examples/applets/testcomponents/contents/ui/testcomponents.qml b/examples/applets/testcomponents/contents/ui/testcomponents.qml index 8b6c3f0d1..19909a95b 100644 --- a/examples/applets/testcomponents/contents/ui/testcomponents.qml +++ b/examples/applets/testcomponents/contents/ui/testcomponents.qml @@ -28,8 +28,8 @@ Item { width: 100 height: 100 clip: true - property int minimumWidth: units.gridUnit * 20 - property int minimumHeight: units.gridUnit * 30 + Layout.minimumWidth: units.gridUnit * 20 + Layout.minimumHeight: units.gridUnit * 30 property int _s: units.iconSizes.small property int _h: units.iconSizes.desktop diff --git a/examples/applets/testshaders/contents/ui/testshaderapplet.qml b/examples/applets/testshaders/contents/ui/testshaderapplet.qml index b6ed67e59..f517383e9 100644 --- a/examples/applets/testshaders/contents/ui/testshaderapplet.qml +++ b/examples/applets/testshaders/contents/ui/testshaderapplet.qml @@ -28,8 +28,8 @@ Item { width: 400 height: 400 - property int minimumWidth: units.gridUnit * 20 - property int minimumHeight: units.gridUnit * 30 + Layout.minimumWidth: units.gridUnit * 20 + Layout.minimumHeight: units.gridUnit * 30 property int _s: units.iconSizes.small property int _h: units.iconSizes.desktop property int _m: 12 diff --git a/examples/applets/testtheme/contents/ui/testtheme.qml b/examples/applets/testtheme/contents/ui/testtheme.qml index 2fcaa02c1..8e4f0c02a 100644 --- a/examples/applets/testtheme/contents/ui/testtheme.qml +++ b/examples/applets/testtheme/contents/ui/testtheme.qml @@ -28,8 +28,8 @@ Item { width: 300 height: 400 clip: true - property int minimumWidth: units.gridUnit * 10 - property int minimumHeight: units.gridUnit * 10 + Layout.minimumWidth: units.gridUnit * 10 + Layout.minimumHeight: units.gridUnit * 10 property int _s: units.iconSizes.small property int _h: units.iconSizes.medium diff --git a/examples/applets/widgetgallery/contents/ui/main.qml b/examples/applets/widgetgallery/contents/ui/main.qml index 6c0e0ea81..68d84089a 100644 --- a/examples/applets/widgetgallery/contents/ui/main.qml +++ b/examples/applets/widgetgallery/contents/ui/main.qml @@ -18,40 +18,40 @@ */ import QtQuick 2.0 +import org.kde.plasma.plasmoid 2.0 import QtQuick.Layouts 1.1 import org.kde.plasma.components 2.0 -import org.kde.plasma.shell 2.0 Item { - Layout.minimumWidth: 300 - Layout.minimumHeight: 400 - - Plasmoid.title: "bah" Plasmoid.switchWidth: 300 Plasmoid.switchHeight: 400 - ToolBar { - id: toolBar - z: 10 - //AppletInterface.title: "bah" - anchors { - top: parent.top - left: parent.left - right: parent.right - } - } + Plasmoid.fullRepresentation: Item { + Layout.minimumWidth: 300 + Layout.minimumHeight: 400 - - PageStack { - id: pageStack - toolBar: toolBar - clip: true - anchors { - top: toolBar.bottom - left: parent.left - right: parent.right - bottom: parent.bottom + ToolBar { + id: toolBar + z: 10 + //AppletInterface.title: "bah" + anchors { + top: parent.top + left: parent.left + right: parent.right + } + } + + PageStack { + id: pageStack + toolBar: toolBar + clip: true + anchors { + top: toolBar.bottom + left: parent.left + right: parent.right + bottom: parent.bottom + } + initialPage: Qt.createComponent("Menu.qml") } - initialPage: Qt.createComponent("Menu.qml") } } diff --git a/examples/applets/widgetgallery/platformcontents/application/tablet/ui/main.qml b/examples/applets/widgetgallery/platformcontents/application/tablet/ui/main.qml index fe51e5044..057dd3d99 100644 --- a/examples/applets/widgetgallery/platformcontents/application/tablet/ui/main.qml +++ b/examples/applets/widgetgallery/platformcontents/application/tablet/ui/main.qml @@ -18,11 +18,12 @@ */ import QtQuick 2.0 +import org.kde.plasma.plasmoid 2.0 import org.kde.plasma.components 2.0 Image { - property int minimumWidth: 300 - property int minimumHeight: 400 + Layout.minimumWidth: 300 + Layout.minimumHeight: 400 source: "image://appbackgrounds/standard" fillMode: Image.Tile asynchronous: true diff --git a/examples/applets/windowthumbnails/contents/ui/main.qml b/examples/applets/windowthumbnails/contents/ui/main.qml index 92ec7f282..bf8f01b25 100644 --- a/examples/applets/windowthumbnails/contents/ui/main.qml +++ b/examples/applets/windowthumbnails/contents/ui/main.qml @@ -20,6 +20,7 @@ */ import QtQuick 2.0 +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.plasma.extras 2.0 as PlasmaExtras @@ -28,8 +29,8 @@ Item { width: 400 height: 32 - property bool fillWidth: true - property bool fillHeight: true + Layout.fillWidth: true + Layout.fillHeight: true PlasmaCore.DataSource { id: tasksSource