diff --git a/kcms/desktoptheme/package/contents/ui/main.qml b/kcms/desktoptheme/package/contents/ui/main.qml --- a/kcms/desktoptheme/package/contents/ui/main.qml +++ b/kcms/desktoptheme/package/contents/ui/main.qml @@ -24,11 +24,11 @@ import QtQuick.Controls 1.0 as QtControls import org.kde.kcm 1.0 -import org.kde.plasma.core 2.0 // for units +import org.kde.kirigami 2.0 // for units Item { - implicitWidth: units.gridUnit * 20 - implicitHeight: units.gridUnit * 20 + implicitWidth: Units.gridUnit * 20 + implicitHeight: Units.gridUnit * 20 ConfigModule.quickHelp: i18n("This module lets you configure the desktop theme.") @@ -45,7 +45,7 @@ GridView { id: grid model: kcm.desktopThemeModel - cellWidth: Math.floor(grid.width / Math.max(Math.floor(grid.width / (units.gridUnit * 12)), 3)) + cellWidth: Math.floor(grid.width / Math.max(Math.floor(grid.width / (Units.gridUnit * 12)), 3)) cellHeight: cellWidth / 1.6 onCountChanged: { @@ -61,7 +61,7 @@ Rectangle { anchors { fill: parent - margins: units.smallSpacing + margins: Units.smallSpacing } Connections { target: kcm @@ -80,7 +80,7 @@ Item { anchors { fill: parent - margins: units.smallSpacing * 2 + margins: Units.smallSpacing * 2 } ThemePreview { id: preview @@ -97,8 +97,8 @@ anchors { bottom: parent.bottom horizontalCenter: parent.horizontalCenter - leftMargin: units.smallSpacing * 2 - rightMargin: units.smallSpacing * 2 + leftMargin: Units.smallSpacing * 2 + rightMargin: Units.smallSpacing * 2 } height: paintedHeight width: parent.width @@ -112,12 +112,12 @@ Rectangle { opacity: grid.currentIndex == index ? 1.0 : 0 anchors.fill: parent - border.width: units.smallSpacing * 2 + border.width: Units.smallSpacing * 2 border.color: syspal.highlight color: "transparent" Behavior on opacity { PropertyAnimation { - duration: units.longDuration + duration: Units.longDuration easing.type: Easing.OutQuad } } diff --git a/kcms/ksplash/package/contents/ui/main.qml b/kcms/ksplash/package/contents/ui/main.qml --- a/kcms/ksplash/package/contents/ui/main.qml +++ b/kcms/ksplash/package/contents/ui/main.qml @@ -21,21 +21,20 @@ import QtQuick.Controls 1.0 as QtControls import org.kde.kquickcontrolsaddons 2.0 import QtQuick.Controls.Private 1.0 -//We need units from it -import org.kde.plasma.core 2.0 as PlasmaCore +import org.kde.kirigami 2.0 // for Units import org.kde.plasma.components 2.0 as PlasmaComponents Item { - implicitWidth: units.gridUnit * 20 - implicitHeight: units.gridUnit * 20 + implicitWidth: Units.gridUnit * 20 + implicitHeight: Units.gridUnit * 20 SystemPalette {id: syspal} QtControls.ScrollView { anchors.fill: parent GridView { id: grid model: kcm.splashModel - cellWidth: Math.floor(grid.width / Math.max(Math.floor(grid.width / (units.gridUnit*12)), 3)) + cellWidth: Math.floor(grid.width / Math.max(Math.floor(grid.width / (Units.gridUnit*12)), 3)) cellHeight: cellWidth / 1.6 onCountChanged: { @@ -49,7 +48,7 @@ Rectangle { anchors { fill: parent - margins: units.smallSpacing + margins: Units.smallSpacing } Connections { @@ -63,15 +62,15 @@ QIconItem { id: icon anchors.centerIn: parent - width: units.iconSizes.large + width: Units.iconSizes.large height: width icon: "view-preview" } Image { id: image anchors { fill: parent - margins: units.smallSpacing * 2 + margins: Units.smallSpacing * 2 } source: model.screenshot || "" Rectangle { @@ -103,12 +102,12 @@ Rectangle { opacity: grid.currentIndex == index ? 1.0 : 0 anchors.fill: parent - border.width: units.smallSpacing * 2 + border.width: Units.smallSpacing * 2 border.color: syspal.highlight color: "transparent" Behavior on opacity { PropertyAnimation { - duration: units.longDuration + duration: Units.longDuration easing.type: Easing.OutQuad } } @@ -133,7 +132,7 @@ anchors { top: parent.top right: parent.right - margins: units.smallSpacing + margins: Units.smallSpacing } visible: model.pluginName != "None" iconSource: "media-playback-start" @@ -143,7 +142,7 @@ opacity: parent.containsMouse ? 1 : 0 Behavior on opacity { PropertyAnimation { - duration: units.longDuration + duration: Units.longDuration easing.type: Easing.OutQuad } } diff --git a/kcms/lookandfeel/package/contents/ui/main.qml b/kcms/lookandfeel/package/contents/ui/main.qml --- a/kcms/lookandfeel/package/contents/ui/main.qml +++ b/kcms/lookandfeel/package/contents/ui/main.qml @@ -22,15 +22,14 @@ import QtQuick.Controls 1.0 as QtControls import org.kde.kquickcontrolsaddons 2.0 import QtQuick.Controls.Private 1.0 -//We need units from it -import org.kde.plasma.core 2.0 as PlasmaCore +import org.kde.kirigami 2.0 import org.kde.plasma.components 2.0 as PlasmaComponents import org.kde.kcm 1.0 Item { id: root - implicitWidth: units.gridUnit * 20 - implicitHeight: units.gridUnit * 20 + implicitWidth: Units.gridUnit * 20 + implicitHeight: Units.gridUnit * 20 ConfigModule.quickHelp: i18n("This module lets you configure the look of the whole workspace with some ready to go presets.") @@ -49,7 +48,7 @@ GridView { id: grid model: kcm.lookAndFeelModel - cellWidth: Math.floor(root.width / Math.max(Math.floor(root.width / (units.gridUnit*12)), 3)) - units.gridUnit + cellWidth: Math.floor(root.width / Math.max(Math.floor(root.width / (Units.gridUnit*12)), 3)) - Units.gridUnit cellHeight: cellWidth / 1.6 onCountChanged: { @@ -63,7 +62,7 @@ Rectangle { anchors { fill: parent - margins: units.smallSpacing + margins: Units.smallSpacing } Connections { target: kcm @@ -76,14 +75,14 @@ QIconItem { id: icon anchors.centerIn: parent - width: units.iconSizes.large + width: Units.iconSizes.large height: width icon: "view-preview" } Image { anchors { fill: parent - margins: units.smallSpacing * 2 + margins: Units.smallSpacing * 2 } source: model.screenshot @@ -116,12 +115,12 @@ Rectangle { opacity: grid.currentIndex == index ? 1.0 : 0 anchors.fill: parent - border.width: units.smallSpacing * 2 + border.width: Units.smallSpacing * 2 border.color: syspal.highlight color: "transparent" Behavior on opacity { PropertyAnimation { - duration: units.longDuration + duration: Units.longDuration easing.type: Easing.OutQuad } } @@ -147,7 +146,7 @@ anchors { top: parent.top right: parent.right - margins: units.smallSpacing + margins: Units.smallSpacing } visible: model.fullScreenPreview != "" iconSource: "media-playback-start" @@ -160,7 +159,7 @@ opacity: parent.containsMouse ? 1 : 0 Behavior on opacity { PropertyAnimation { - duration: units.longDuration + duration: Units.longDuration easing.type: Easing.OutQuad } }