From 4bba6ac402dd163520b56709d38ebf724c3aeb24 Mon Sep 17 00:00:00 2001 From: Aleix Pol Date: Mon, 13 Sep 2021 18:40:56 +0200 Subject: [PATCH] units -> PlasmaCore.Units --- applets/activities/contents/ui/main.qml | 4 ++-- applets/krunner/contents/ui/main.qml | 6 ++--- .../qml/AppDrawer.qml | 20 ++++++++-------- .../qml/DrawerDelegate.qml | 16 ++++++------- .../qml/FavoriteStrip.qml | 4 ++-- .../qml/FlickablePages.qml | 6 ++--- .../qml/HomeScreenContents.qml | 8 +++---- .../qml/LauncherContainer.qml | 12 +++++----- .../qml/LauncherGrid.qml | 2 +- .../qml/LauncherRepeater.qml | 4 ++-- .../qml/MobileAppletContainer.qml | 4 ++-- .../qml/private/ActionButton.qml | 4 ++-- .../qml/private/OpenDrawerButton.qml | 4 ++-- .../qml/private/ScrollIndicator.qml | 4 ++-- .../package/contents/applet/CompactApplet.qml | 4 ++-- .../package/contents/ui/IndicatorsRow.qml | 2 +- .../package/contents/ui/SlidingContainer.qml | 4 ++-- .../panel/package/contents/ui/main.qml | 8 +++---- .../contents/ui/quicksettings/Delegate.qml | 8 +++---- .../ui/quicksettings/QuickSettingsPanel.qml | 16 ++++++------- .../taskpanel/package/contents/ui/Button.qml | 2 +- .../taskpanel/package/contents/ui/Task.qml | 14 +++++------ .../package/contents/ui/TaskSwitcher.qml | 16 ++++++------- .../contents/components/ActionButton.qml | 16 ++++++------- .../contents/components/DialerButton.qml | 2 +- .../contents/components/DialerIconButton.qml | 4 ++-- .../contents/components/UserDelegate.qml | 14 +++++------ look-and-feel/contents/lockscreen/Clock.qml | 2 +- .../contents/lockscreen/DraggableDelegate.qml | 2 +- look-and-feel/contents/lockscreen/Keypad.qml | 14 +++++------ .../contents/lockscreen/LockScreen.qml | 12 +++++----- .../contents/lockscreen/MediaControls.qml | 6 ++--- look-and-feel/contents/lockscreen/OsdItem.qml | 18 +++++++------- .../contents/lockscreen/PasswordBar.qml | 6 ++--- .../contents/lockscreen/SimpleHeaderBar.qml | 2 +- .../lockscreen/SimpleNotification.qml | 24 +++++++++---------- look-and-feel/contents/logout/Logout.qml | 16 ++++++------- shell/contents/components/DialerButton.qml | 2 +- .../contents/components/DialerIconButton.qml | 2 +- shell/contents/views/Pin.qml | 22 ++++++++--------- 40 files changed, 168 insertions(+), 168 deletions(-) diff --git a/applets/activities/contents/ui/main.qml b/applets/activities/contents/ui/main.qml index f6adb1aa..8f9e1a5a 100644 --- a/applets/activities/contents/ui/main.qml +++ b/applets/activities/contents/ui/main.qml @@ -82,7 +82,7 @@ ColumnLayout { id: xAnim target: delegate from: delegate.x - duration: units.longDuration + duration: PlasmaCore.Units.longDuration easing.type: Easing.InOutQuad } ScriptAction { @@ -126,7 +126,7 @@ ColumnLayout { id: label text: model.name anchors.verticalCenter: parent.verticalCenter - x: units.smallSpacing + x: PlasmaCore.Units.smallSpacing } PlasmaComponents.TextField { id: edit diff --git a/applets/krunner/contents/ui/main.qml b/applets/krunner/contents/ui/main.qml index f6590048..ba86864a 100644 --- a/applets/krunner/contents/ui/main.qml +++ b/applets/krunner/contents/ui/main.qml @@ -29,7 +29,7 @@ Item { left: parent.left right: parent.right verticalCenter: parent.verticalCenter - margins: units.gridUnit + margins: PlasmaCore.Units.gridUnit } radius: height/2 height: layout.implicitHeight + PlasmaCore.Units.largeSpacing @@ -190,8 +190,8 @@ Item { Kirigami.Icon { anchors.centerIn: parent - width: units.iconSizes.small - height: units.iconSizes.small + width: PlasmaCore.Units.iconSizes.small + height: PlasmaCore.Units.iconSizes.small // ToolButton cannot cope with QIcon source: modelData.icon || "" active: parent.hovered || parent.checked diff --git a/components/mobilehomescreencomponents/qml/AppDrawer.qml b/components/mobilehomescreencomponents/qml/AppDrawer.qml index b524e0c3..a45b0815 100644 --- a/components/mobilehomescreencomponents/qml/AppDrawer.qml +++ b/components/mobilehomescreencomponents/qml/AppDrawer.qml @@ -60,11 +60,11 @@ Item { signal dragStarted readonly property int reservedSpaceForLabel: metrics.height - property int availableCellHeight: units.iconSizes.huge + reservedSpaceForLabel + property int availableCellHeight: PlasmaCore.Units.iconSizes.huge + reservedSpaceForLabel property alias flickable: view - readonly property real openFactor: Math.min(1, Math.max(0, Math.min(1, (view.contentY + view.originY + view.height*2 - root.closedPositionOffset*2) / (units.gridUnit * 10)))) + readonly property real openFactor: Math.min(1, Math.max(0, Math.min(1, (view.contentY + view.originY + view.height*2 - root.closedPositionOffset*2) / (PlasmaCore.Units.gridUnit * 10)))) function open() { if (root.status === AppDrawer.Status.Open) { @@ -114,7 +114,7 @@ Item { id: scrollAnim target: view properties: "contentY" - duration: units.longDuration * 2 + duration: PlasmaCore.Units.longDuration * 2 easing.type: Easing.OutQuad easing.amplitude: 2.0 } @@ -148,7 +148,7 @@ Item { rightMargin: -1 } border.color: Qt.rgba(1, 1, 1, 0.5) - radius: units.gridUnit + radius: PlasmaCore.Units.gridUnit color: "black" opacity: 0.4 * root.openFactor height: root.height + radius * 2 @@ -181,7 +181,7 @@ Item { } visible: root.status !== AppDrawer.Status.Closed - cellWidth: view.width / Math.floor(view.width / ((root.availableCellHeight - root.reservedSpaceForLabel) + units.smallSpacing*4)) + cellWidth: view.width / Math.floor(view.width / ((root.availableCellHeight - root.reservedSpaceForLabel) + PlasmaCore.Units.smallSpacing*4)) cellHeight: root.availableCellHeight clip: true @@ -258,11 +258,11 @@ Item { enabled: false Behavior on opacity { OpacityAnimator { - duration: units.longDuration * 2 + duration: PlasmaCore.Units.longDuration * 2 easing.type: Easing.InOutQuad } } - implicitWidth: Math.round(units.gridUnit/3) + implicitWidth: Math.round(PlasmaCore.Units.gridUnit/3) contentItem: Rectangle { radius: width/2 color: Qt.rgba(1, 1, 1, 0.3) @@ -276,8 +276,8 @@ Item { left: parent.left right: parent.right bottom: parent.bottom - leftMargin: units.gridUnit + root.leftPadding - rightMargin: units.gridUnit + root.rightPadding + leftMargin: PlasmaCore.Units.gridUnit + root.leftPadding + rightMargin: PlasmaCore.Units.gridUnit + root.rightPadding bottomMargin: root.bottomPadding - height } height: 1 @@ -293,7 +293,7 @@ Item { opacity: root.status !== AppDrawer.Status.Closed ? 0.6 : 0 Behavior on opacity { OpacityAnimator { - duration: units.longDuration * 2 + duration: PlasmaCore.Units.longDuration * 2 easing.type: Easing.InOutQuad } } diff --git a/components/mobilehomescreencomponents/qml/DrawerDelegate.qml b/components/mobilehomescreencomponents/qml/DrawerDelegate.qml index 80329e02..c28a55c8 100644 --- a/components/mobilehomescreencomponents/qml/DrawerDelegate.qml +++ b/components/mobilehomescreencomponents/qml/DrawerDelegate.qml @@ -41,7 +41,7 @@ MouseArea { if (model.applicationRunning) { delegate.launch(0, 0, "", model.applicationName, model.applicationStorageId); } else { - delegate.launch(delegate.x + (units.smallSpacing * 2), delegate.y + (units.smallSpacing * 2), icon.source, model.applicationName, model.applicationStorageId); + delegate.launch(delegate.x + (PlasmaCore.Units.smallSpacing * 2), delegate.y + (PlasmaCore.Units.smallSpacing * 2), icon.source, model.applicationName, model.applicationStorageId); } } @@ -49,10 +49,10 @@ MouseArea { ColumnLayout { anchors { fill: parent - leftMargin: units.smallSpacing * 2 - topMargin: units.smallSpacing * 2 - rightMargin: units.smallSpacing * 2 - bottomMargin: units.smallSpacing * 2 + leftMargin: PlasmaCore.Units.smallSpacing * 2 + topMargin: PlasmaCore.Units.smallSpacing * 2 + rightMargin: PlasmaCore.Units.smallSpacing * 2 + bottomMargin: PlasmaCore.Units.smallSpacing * 2 } spacing: 0 @@ -74,7 +74,7 @@ MouseArea { } visible: model.applicationRunning radius: width - width: units.smallSpacing + width: PlasmaCore.Units.smallSpacing height: width color: PlasmaCore.Theme.highlightColor } @@ -87,8 +87,8 @@ MouseArea { Layout.fillWidth: true Layout.preferredHeight: delegate.reservedSpaceForLabel wrapMode: Text.WordWrap - Layout.leftMargin: -parent.anchors.leftMargin + units.smallSpacing - Layout.rightMargin: -parent.anchors.rightMargin + units.smallSpacing + Layout.leftMargin: -parent.anchors.leftMargin + PlasmaCore.Units.smallSpacing + Layout.rightMargin: -parent.anchors.rightMargin + PlasmaCore.Units.smallSpacing horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignTop maximumLineCount: 2 diff --git a/components/mobilehomescreencomponents/qml/FavoriteStrip.qml b/components/mobilehomescreencomponents/qml/FavoriteStrip.qml index 26b134a6..fe0f8ec6 100644 --- a/components/mobilehomescreencomponents/qml/FavoriteStrip.qml +++ b/components/mobilehomescreencomponents/qml/FavoriteStrip.qml @@ -27,13 +27,13 @@ LauncherContainer { Behavior on height { NumberAnimation { - duration: units.longDuration + duration: PlasmaCore.Units.longDuration easing.type: Easing.InOutQuad } } Behavior on opacity { OpacityAnimator { - duration: units.longDuration * 4 + duration: PlasmaCore.Units.longDuration * 4 easing.type: Easing.InOutQuad } } diff --git a/components/mobilehomescreencomponents/qml/FlickablePages.qml b/components/mobilehomescreencomponents/qml/FlickablePages.qml index 3b064e4f..9c5015e3 100644 --- a/components/mobilehomescreencomponents/qml/FlickablePages.qml +++ b/components/mobilehomescreencomponents/qml/FlickablePages.qml @@ -140,7 +140,7 @@ Flickable { id: scrollAnim target: mainFlickable properties: "contentX" - duration: units.longDuration + duration: PlasmaCore.Units.longDuration easing.type: Easing.InOutQuad } @@ -197,7 +197,7 @@ Flickable { id: scrollLeftIndicator anchors { left: parent.left - leftMargin: units.smallSpacing + leftMargin: PlasmaCore.Units.smallSpacing } elementId: "left-arrow" } @@ -205,7 +205,7 @@ Flickable { id: scrollRightIndicator anchors { right: parent.right - rightMargin: units.smallSpacing + rightMargin: PlasmaCore.Units.smallSpacing } elementId: "right-arrow" } diff --git a/components/mobilehomescreencomponents/qml/HomeScreenContents.qml b/components/mobilehomescreencomponents/qml/HomeScreenContents.qml index 424b9246..63b3b575 100644 --- a/components/mobilehomescreencomponents/qml/HomeScreenContents.qml +++ b/components/mobilehomescreencomponents/qml/HomeScreenContents.qml @@ -83,10 +83,10 @@ DragDrop.DropArea { let scenePos = mapToItem(null, event.x, event.y); //SCROLL LEFT - if (scenePos.x < units.gridUnit) { + if (scenePos.x < PlasmaCore.Units.gridUnit) { mainFlickable.scrollLeft(); //SCROLL RIGHT - } else if (scenePos.x > mainFlickable.width - units.gridUnit) { + } else if (scenePos.x > mainFlickable.width - PlasmaCore.Units.gridUnit) { mainFlickable.scrollRight(); //DON't SCROLL } else { @@ -183,10 +183,10 @@ DragDrop.DropArea { // Sets the containment in edit mode when we go in edit mode as well onEditModeChanged: plasmoid.editMode = editMode; - minimumItemWidth: units.gridUnit * 3 + minimumItemWidth: PlasmaCore.Units.gridUnit * 3 minimumItemHeight: minimumItemWidth - defaultItemWidth: units.gridUnit * 6 + defaultItemWidth: PlasmaCore.Units.gridUnit * 6 defaultItemHeight: defaultItemWidth acceptsAppletCallback: function(applet, x, y) { diff --git a/components/mobilehomescreencomponents/qml/LauncherContainer.qml b/components/mobilehomescreencomponents/qml/LauncherContainer.qml index b1b55f90..b167e174 100644 --- a/components/mobilehomescreencomponents/qml/LauncherContainer.qml +++ b/components/mobilehomescreencomponents/qml/LauncherContainer.qml @@ -19,9 +19,9 @@ Item { id: root readonly property int reservedSpaceForLabel: metrics.height - readonly property int cellWidth: root.width / Math.floor(root.width / ((availableCellHeight - reservedSpaceForLabel) + units.smallSpacing*4)) + readonly property int cellWidth: root.width / Math.floor(root.width / ((availableCellHeight - reservedSpaceForLabel) + PlasmaCore.Units.smallSpacing*4)) readonly property int cellHeight: availableCellHeight - property int availableCellHeight: units.iconSizes.huge + reservedSpaceForLabel + property int availableCellHeight: PlasmaCore.Units.iconSizes.huge + reservedSpaceForLabel property ContainmentLayoutManager.AppletsLayout appletsLayout @@ -29,7 +29,7 @@ Item { property alias flow: applicationsFlow implicitWidth: frame.implicitWidth - implicitHeight: Math.max(units.gridUnit*3, frame.implicitHeight) + implicitHeight: Math.max(PlasmaCore.Units.gridUnit*3, frame.implicitHeight) Controls.Label { id: metrics @@ -40,7 +40,7 @@ Item { Item { id: spacer - width: units.gridUnit * 4 + width: PlasmaCore.Units.gridUnit * 4 height: width } @@ -68,7 +68,7 @@ Item { move: Transition { NumberAnimation { - duration: units.longDuration + duration: PlasmaCore.Units.longDuration easing.type: Easing.InOutQuad properties: "x,y" } @@ -77,7 +77,7 @@ Item { } Behavior on implicitWidth { NumberAnimation { - duration: units.longDuration + duration: PlasmaCore.Units.longDuration easing.type: Easing.InOutQuad } } diff --git a/components/mobilehomescreencomponents/qml/LauncherGrid.qml b/components/mobilehomescreencomponents/qml/LauncherGrid.qml index 029c1f48..d49c3647 100644 --- a/components/mobilehomescreencomponents/qml/LauncherGrid.qml +++ b/components/mobilehomescreencomponents/qml/LauncherGrid.qml @@ -23,7 +23,7 @@ LauncherContainer { id: root readonly property int columns: Math.floor(root.flow.width / cellWidth) - readonly property int cellWidth: root.flow.width / Math.floor(root.flow.width / ((availableCellHeight - reservedSpaceForLabel) + units.smallSpacing*4)) + readonly property int cellWidth: root.flow.width / Math.floor(root.flow.width / ((availableCellHeight - reservedSpaceForLabel) + PlasmaCore.Units.smallSpacing*4)) readonly property int cellHeight: availableCellHeight signal launched diff --git a/components/mobilehomescreencomponents/qml/LauncherRepeater.qml b/components/mobilehomescreencomponents/qml/LauncherRepeater.qml index 8e6f841e..e342c7f4 100644 --- a/components/mobilehomescreencomponents/qml/LauncherRepeater.qml +++ b/components/mobilehomescreencomponents/qml/LauncherRepeater.qml @@ -72,10 +72,10 @@ Repeater { var pos = plasmoid.fullRepresentationItem.mapFromItem(delegate, dragCenter.x, dragCenter.y); //SCROLL LEFT - if (pos.x < units.gridUnit) { + if (pos.x < PlasmaCore.Units.gridUnit) { launcherRepeater.scrollLeftRequested(); //SCROLL RIGHT - } else if (pos.x > mainFlickable.width - units.gridUnit) { + } else if (pos.x > mainFlickable.width - PlasmaCore.Units.gridUnit) { launcherRepeater.scrollRightRequested(); //DON't SCROLL } else { diff --git a/components/mobilehomescreencomponents/qml/MobileAppletContainer.qml b/components/mobilehomescreencomponents/qml/MobileAppletContainer.qml index 1c8f7cba..93da28b9 100644 --- a/components/mobilehomescreencomponents/qml/MobileAppletContainer.qml +++ b/components/mobilehomescreencomponents/qml/MobileAppletContainer.qml @@ -59,10 +59,10 @@ ContainmentLayoutManager.BasicAppletContainer { var pos = plasmoid.fullRepresentationItem.mapFromItem(appletContainer, dragCenter.x, dragCenter.y); //SCROLL LEFT - if (pos.x < units.gridUnit) { + if (pos.x < PlasmaCore.Units.gridUnit) { launcherRepeater.scrollLeftRequested(); //SCROLL RIGHT - } else if (pos.x > mainFlickable.width - units.gridUnit) { + } else if (pos.x > mainFlickable.width - PlasmaCore.Units.gridUnit) { launcherRepeater.scrollRightRequested(); //DON't SCROLL } else { diff --git a/components/mobilehomescreencomponents/qml/private/ActionButton.qml b/components/mobilehomescreencomponents/qml/private/ActionButton.qml index bc0595eb..dfaa658c 100644 --- a/components/mobilehomescreencomponents/qml/private/ActionButton.qml +++ b/components/mobilehomescreencomponents/qml/private/ActionButton.qml @@ -21,7 +21,7 @@ PlasmaCore.ToolTipArea { property alias elementId: icon.elementId property QtObject action property bool backgroundVisible: false - property int iconSize: units.iconSizes.large + property int iconSize: PlasmaCore.Units.iconSizes.large property int pressedOffset: 1 property bool checked: false property bool toggle: false @@ -35,7 +35,7 @@ PlasmaCore.ToolTipArea { Behavior on opacity { NumberAnimation { - duration: units.longDuration + duration: PlasmaCore.Units.longDuration easing.type: Easing.InOutQuad } } diff --git a/components/mobilehomescreencomponents/qml/private/OpenDrawerButton.qml b/components/mobilehomescreencomponents/qml/private/OpenDrawerButton.qml index 198a5843..15397000 100644 --- a/components/mobilehomescreencomponents/qml/private/OpenDrawerButton.qml +++ b/components/mobilehomescreencomponents/qml/private/OpenDrawerButton.qml @@ -25,7 +25,7 @@ MouseArea { property Flickable flickable property real factor: 0 - height: units.iconSizes.medium + height: PlasmaCore.Units.iconSizes.medium signal openRequested signal closeRequested @@ -41,7 +41,7 @@ MouseArea { Item { anchors.centerIn: parent - width: units.iconSizes.medium + width: PlasmaCore.Units.iconSizes.medium height: width Rectangle { diff --git a/components/mobilehomescreencomponents/qml/private/ScrollIndicator.qml b/components/mobilehomescreencomponents/qml/private/ScrollIndicator.qml index 83c05a7f..b354d225 100644 --- a/components/mobilehomescreencomponents/qml/private/ScrollIndicator.qml +++ b/components/mobilehomescreencomponents/qml/private/ScrollIndicator.qml @@ -20,7 +20,7 @@ PlasmaCore.SvgItem { colorGroup: PlasmaCore.Theme.ComplementaryColorGroup } elementId: "left-arrow" - width: units.iconSizes.large + width: PlasmaCore.Units.iconSizes.large height: width layer.enabled: true layer.effect: DropShadow { @@ -33,7 +33,7 @@ PlasmaCore.SvgItem { } Behavior on opacity { OpacityAnimator { - duration: units.longDuration * 2 + duration: PlasmaCore.Units.longDuration * 2 easing.type: Easing.InOutQuad } } diff --git a/containments/panel/package/contents/applet/CompactApplet.qml b/containments/panel/package/contents/applet/CompactApplet.qml index 32e69dbd..7a62dece 100644 --- a/containments/panel/package/contents/applet/CompactApplet.qml +++ b/containments/panel/package/contents/applet/CompactApplet.qml @@ -44,7 +44,7 @@ PlasmaCore.ToolTipArea { case PlasmaCore.Types.Horizontal: return height; default: - return units.gridUnit * 3; + return PlasmaCore.Units.gridUnit * 3; } } @@ -55,7 +55,7 @@ PlasmaCore.ToolTipArea { case PlasmaCore.Types.Horizontal: return 0; default: - return units.gridUnit * 3; + return PlasmaCore.Units.gridUnit * 3; } } diff --git a/containments/panel/package/contents/ui/IndicatorsRow.qml b/containments/panel/package/contents/ui/IndicatorsRow.qml index 93e407d8..95760b6a 100644 --- a/containments/panel/package/contents/ui/IndicatorsRow.qml +++ b/containments/panel/package/contents/ui/IndicatorsRow.qml @@ -142,7 +142,7 @@ Item { top: parent.top bottom: parent.bottom right: parent.right - rightMargin: units.smallSpacing + rightMargin: PlasmaCore.Units.smallSpacing } Indicators.Bluetooth { provider: bluetoothProvider } Indicators.Wifi { provider: wifiProvider } diff --git a/containments/panel/package/contents/ui/SlidingContainer.qml b/containments/panel/package/contents/ui/SlidingContainer.qml index 11055397..b043b521 100644 --- a/containments/panel/package/contents/ui/SlidingContainer.qml +++ b/containments/panel/package/contents/ui/SlidingContainer.qml @@ -28,7 +28,7 @@ NanoShell.FullScreenOverlay { readonly property int openedContentY: wideScreen || offset > (collapsedHeight + openThreshold) ? -topEmptyAreaHeight : offsetToContentY(collapsedHeight) readonly property int closedContentY: mainFlickable.contentHeight - readonly property bool wideScreen: width > height || width > units.gridUnit * 45 + readonly property bool wideScreen: width > height || width > PlasmaCore.Units.gridUnit * 45 readonly property int drawerWidth: wideScreen ? contentItem.implicitWidth : width property int drawerX: 0 @@ -99,7 +99,7 @@ NanoShell.FullScreenOverlay { function updateState() { cancelAnimations(); if (window.offset <= 0) { - // close immediately, so that we don't have to wait units.longDuration + // close immediately, so that we don't have to wait PlasmaCore.Units.longDuration window.visible = false; close(); } else if (window.direction === SlidingContainer.MovementDirection.None) { diff --git a/containments/panel/package/contents/ui/main.qml b/containments/panel/package/contents/ui/main.qml index b1285d6c..0f64c8cd 100644 --- a/containments/panel/package/contents/ui/main.qml +++ b/containments/panel/package/contents/ui/main.qml @@ -246,7 +246,7 @@ Item { z: 4 Layout.alignment: Qt.AlignTop - Layout.preferredWidth: slidingPanel.wideScreen ? Math.min(slidingPanel.width/2, units.gridUnit * 25) : panelContents.width + Layout.preferredWidth: slidingPanel.wideScreen ? Math.min(slidingPanel.width/2, PlasmaCore.Units.gridUnit * 25) : panelContents.width parentSlidingPanel: slidingPanel onExpandRequested: slidingPanel.expand() @@ -256,10 +256,10 @@ Item { // notifications and media player ListView { id: fullRepresentationView - implicitHeight: units.gridUnit * 20 + implicitHeight: PlasmaCore.Units.gridUnit * 20 Layout.preferredWidth: slidingPanel.wideScreen ? Math.min(slidingPanel.width/2, quickSettings.width*fullRepresentationModel.count) : panelContents.width Layout.preferredHeight: slidingPanel.wideScreen - ? Math.min(units.gridUnit * 20, Math.max(units.gridUnit * 15, quickSettings.implicitHeight)) + ? Math.min(PlasmaCore.Units.gridUnit * 20, Math.max(PlasmaCore.Units.gridUnit * 15, quickSettings.implicitHeight)) : Math.min(plasmoid.screenGeometry.height - quickSettings.implicitHeight - bottomBar.height + slidingPanel.topEmptyAreaHeight, implicitHeight) z: 1 @@ -279,7 +279,7 @@ Item { cacheBuffer: width * 100 highlightFollowsCurrentItem: true highlightRangeMode: ListView.ApplyRange - highlightMoveDuration: units.longDuration + highlightMoveDuration: PlasmaCore.Units.longDuration snapMode: slidingPanel.wideScreen ? ListView.NoSnap : ListView.SnapOneItem model: ObjectModel { id: fullRepresentationModel diff --git a/containments/panel/package/contents/ui/quicksettings/Delegate.qml b/containments/panel/package/contents/ui/quicksettings/Delegate.qml index 18599cbc..80176ae6 100644 --- a/containments/panel/package/contents/ui/quicksettings/Delegate.qml +++ b/containments/panel/package/contents/ui/quicksettings/Delegate.qml @@ -14,7 +14,7 @@ import org.kde.plasma.private.nanoshell 2.0 as NanoShell ColumnLayout { id: delegateRoot - spacing: units.smallSpacing + spacing: PlasmaCore.Units.smallSpacing signal closeRequested signal panelClosed @@ -99,7 +99,7 @@ ColumnLayout { Layout.alignment: Qt.AlignHCenter text: delegateRoot.text - bottomPadding: units.smallSpacing * 2 + bottomPadding: PlasmaCore.Units.smallSpacing * 2 horizontalAlignment: Text.AlignHCenter font.pixelSize: PlasmaCore.Theme.defaultFont.pixelSize * 0.8 elide: Text.ElideRight @@ -109,10 +109,10 @@ ColumnLayout { anchors { left: parent.right verticalCenter: parent.verticalCenter - verticalCenterOffset: -units.smallSpacing + verticalCenterOffset: -PlasmaCore.Units.smallSpacing } visible: delegateRoot.settingsCommand - width: units.iconSizes.small/2 + width: PlasmaCore.Units.iconSizes.small/2 height: width elementId: "down-arrow" svg: PlasmaCore.Svg { diff --git a/containments/panel/package/contents/ui/quicksettings/QuickSettingsPanel.qml b/containments/panel/package/contents/ui/quicksettings/QuickSettingsPanel.qml index dec1823d..c1835654 100644 --- a/containments/panel/package/contents/ui/quicksettings/QuickSettingsPanel.qml +++ b/containments/panel/package/contents/ui/quicksettings/QuickSettingsPanel.qml @@ -66,7 +66,7 @@ Item { } signal plasmoidTriggered(var applet, var id) - Layout.minimumHeight: flow.implicitHeight + units.largeSpacing*2 + Layout.minimumHeight: flow.implicitHeight + PlasmaCore.Units.largeSpacing*2 onClosed: quickSettingsModel.panelClosed() @@ -94,7 +94,7 @@ Item { spacing: 0 height: Layout.minimumHeight * (1 - root.expandedRatio) + (Layout.maximumHeight * root.expandedRatio) - readonly property real cellSizeHint: units.iconSizes.large + units.smallSpacing * 6 + readonly property real cellSizeHint: PlasmaCore.Units.iconSizes.large + PlasmaCore.Units.smallSpacing * 6 readonly property real columnWidth: Math.floor(width / Math.floor(width / cellSizeHint)) // top indicators (clock, widgets, etc.) @@ -125,7 +125,7 @@ Item { Layout.preferredHeight: implicitHeight Layout.maximumHeight: (flow.cellSizeHint * Math.ceil((flow.children.length - 1) / flow.columns)) - readonly property real cellSizeHint: units.iconSizes.large + units.smallSpacing * 6 + readonly property real cellSizeHint: PlasmaCore.Units.iconSizes.large + PlasmaCore.Units.smallSpacing * 6 readonly property real columns: Math.floor(width / cellSizeHint) readonly property real columnWidth: Math.floor(width / columns) @@ -162,7 +162,7 @@ Item { move: Transition { NumberAnimation { - duration: units.shortDuration + duration: PlasmaCore.Units.shortDuration easing.type: Easing.Linear properties: "x,y" } @@ -170,10 +170,10 @@ Item { } BrightnessItem { id: brightnessSlider - Layout.topMargin: units.largeSpacing - Layout.bottomMargin: units.smallSpacing - Layout.leftMargin: units.largeSpacing - Layout.rightMargin: units.largeSpacing + Layout.topMargin: PlasmaCore.Units.largeSpacing + Layout.bottomMargin: PlasmaCore.Units.smallSpacing + Layout.leftMargin: PlasmaCore.Units.largeSpacing + Layout.rightMargin: PlasmaCore.Units.largeSpacing Layout.fillWidth: true opacity: root.expandedRatio diff --git a/containments/taskpanel/package/contents/ui/Button.qml b/containments/taskpanel/package/contents/ui/Button.qml index 531bd67b..85fb5f1c 100644 --- a/containments/taskpanel/package/contents/ui/Button.qml +++ b/containments/taskpanel/package/contents/ui/Button.qml @@ -52,7 +52,7 @@ Item { } NumberAnimation on opacity { id: opacityAnimator - duration: units.shortDuration + duration: PlasmaCore.Units.shortDuration easing.type: Easing.InOutQuad onFinished: { // animate the state back diff --git a/containments/taskpanel/package/contents/ui/Task.qml b/containments/taskpanel/package/contents/ui/Task.qml index abd91972..47d87068 100644 --- a/containments/taskpanel/package/contents/ui/Task.qml +++ b/containments/taskpanel/package/contents/ui/Task.qml @@ -55,7 +55,7 @@ Item { Item { anchors { fill: parent - margins: units.smallSpacing + margins: PlasmaCore.Units.smallSpacing } SequentialAnimation { @@ -65,7 +65,7 @@ Item { id: internalSlideAnim target: background properties: "x" - duration: units.longDuration + duration: PlasmaCore.Units.longDuration easing.type: Easing.InOutQuad } ScriptAction { @@ -81,7 +81,7 @@ Item { width: parent.width height: parent.height - radius: units.smallSpacing + radius: PlasmaCore.Units.smallSpacing color: PlasmaCore.Theme.backgroundColor opacity: 1 * (1-Math.abs(x)/width) @@ -112,13 +112,13 @@ Item { ColumnLayout { anchors { fill: parent - margins: units.smallSpacing + margins: PlasmaCore.Units.smallSpacing } RowLayout { z: 99 Layout.fillWidth: true - Layout.maximumHeight: units.gridUnit + Layout.maximumHeight: PlasmaCore.Units.gridUnit PlasmaCore.IconItem { Layout.fillHeight: true Layout.preferredWidth: height @@ -149,8 +149,8 @@ Item { PlasmaComponents.ToolButton { z: 99 icon.name: "window-close" - icon.width: units.iconSizes.medium - icon.height: units.iconSizes.medium + icon.width: PlasmaCore.Units.iconSizes.medium + icon.height: PlasmaCore.Units.iconSizes.medium onClicked: { slideAnim.to = -background.width*2; slideAnim.running = true; diff --git a/containments/taskpanel/package/contents/ui/TaskSwitcher.qml b/containments/taskpanel/package/contents/ui/TaskSwitcher.qml index 112a05b9..f6b1d329 100644 --- a/containments/taskpanel/package/contents/ui/TaskSwitcher.qml +++ b/containments/taskpanel/package/contents/ui/TaskSwitcher.qml @@ -20,7 +20,7 @@ NanoShell.FullScreenOverlay { width: Screen.width height: Screen.height property int offset: 0 - property int overShoot: units.gridUnit * 2 + property int overShoot: PlasmaCore.Units.gridUnit * 2 property int tasksCount: window.model.count property int currentTaskIndex: -1 property TaskManager.TasksModel model @@ -122,7 +122,7 @@ NanoShell.FullScreenOverlay { id: internalAnim target: tasksView properties: "contentY" - duration: units.longDuration + duration: PlasmaCore.Units.longDuration easing.type: Easing.InOutQuad } ScriptAction { @@ -160,7 +160,7 @@ NanoShell.FullScreenOverlay { target: window.contentItem from: 1 to: 0 - duration: units.longDuration + duration: PlasmaCore.Units.longDuration easing.type: Easing.InOutQuad } ScaleAnimator { @@ -168,7 +168,7 @@ NanoShell.FullScreenOverlay { from: 1 to: 2 // To try tosync up with kwin animation - duration: units.longDuration * 0.85 + duration: PlasmaCore.Units.longDuration * 0.85 easing.type: Easing.InOutQuad } } @@ -280,7 +280,7 @@ NanoShell.FullScreenOverlay { Behavior on y { NumberAnimation { - duration: units.longDuration + duration: PlasmaCore.Units.longDuration easing.type: Easing.InOutQuad } } @@ -294,7 +294,7 @@ NanoShell.FullScreenOverlay { enabled: false NumberAnimation { properties: "x,y" - duration: units.longDuration + duration: PlasmaCore.Units.longDuration easing.type: Easing.InOutQuad } } @@ -309,8 +309,8 @@ NanoShell.FullScreenOverlay { bottom: parent.bottom } icon.name: "start-here-kde" - icon.width: units.iconSizes.medium - icon.height: units.iconSizes.medium + icon.width: PlasmaCore.Units.iconSizes.medium + icon.height: PlasmaCore.Units.iconSizes.medium onClicked: { currentTaskIndex = -1; window.hide(); diff --git a/look-and-feel/contents/components/ActionButton.qml b/look-and-feel/contents/components/ActionButton.qml index b47b034f..e7cf536a 100644 --- a/look-and-feel/contents/components/ActionButton.qml +++ b/look-and-feel/contents/components/ActionButton.qml @@ -23,15 +23,15 @@ Item { activeFocusOnTab: true - property int iconSize: units.gridUnit * 3 + property int iconSize: PlasmaCore.Units.gridUnit * 3 - implicitWidth: Math.max(iconSize + units.largeSpacing * 2, label.contentWidth) - implicitHeight: iconSize + units.smallSpacing + label.implicitHeight + implicitWidth: Math.max(iconSize + PlasmaCore.Units.largeSpacing * 2, label.contentWidth) + implicitHeight: iconSize + PlasmaCore.Units.smallSpacing + label.implicitHeight opacity: activeFocus || containsMouse ? 1 : 0.85 Behavior on opacity { PropertyAnimation { // OpacityAnimator makes it turn black at random intervals - duration: units.longDuration + duration: PlasmaCore.Units.longDuration easing.type: Easing.InOutQuad } } @@ -39,14 +39,14 @@ Item { Rectangle { id: iconCircle anchors.centerIn: icon - width: iconSize + units.smallSpacing + width: iconSize + PlasmaCore.Units.smallSpacing height: width radius: width / 2 color: softwareRendering ? PlasmaCore.ColorScope.backgroundColor : PlasmaCore.ColorScope.textColor opacity: activeFocus || containsMouse ? (softwareRendering ? 0.8 : 0.15) : (softwareRendering ? 0.6 : 0) Behavior on opacity { PropertyAnimation { // OpacityAnimator makes it turn black at random intervals - duration: units.longDuration + duration: PlasmaCore.Units.longDuration easing.type: Easing.InOutQuad } } @@ -62,7 +62,7 @@ Item { opacity: 0.15 Behavior on scale { PropertyAnimation { - duration: units.shortDuration + duration: PlasmaCore.Units.shortDuration easing.type: Easing.InOutQuart } } @@ -86,7 +86,7 @@ Item { font.pointSize: Math.max(fontSize + 1,PlasmaCore.Theme.defaultFont.pointSize + 1) anchors { top: icon.bottom - topMargin: (softwareRendering ? 1.5 : 1) * units.smallSpacing + topMargin: (softwareRendering ? 1.5 : 1) * PlasmaCore.Units.smallSpacing left: parent.left right: parent.right } diff --git a/look-and-feel/contents/components/DialerButton.qml b/look-and-feel/contents/components/DialerButton.qml index 98031333..87454604 100644 --- a/look-and-feel/contents/components/DialerButton.qml +++ b/look-and-feel/contents/components/DialerButton.qml @@ -12,7 +12,7 @@ import org.kde.plasma.components 2.0 as PlasmaComponents PlasmaComponents.Label { horizontalAlignment: Qt.AlignHCenter verticalAlignment: Qt.AlignVCenter - font.pixelSize: units.gridUnit * 1.6 + font.pixelSize: PlasmaCore.Units.gridUnit * 1.6 property alias sub: longHold.text property var callback Layout.fillWidth: true diff --git a/look-and-feel/contents/components/DialerIconButton.qml b/look-and-feel/contents/components/DialerIconButton.qml index 86483711..458a82d0 100644 --- a/look-and-feel/contents/components/DialerIconButton.qml +++ b/look-and-feel/contents/components/DialerIconButton.qml @@ -2,7 +2,7 @@ import QtQuick 2.0 import org.kde.plasma.core 2.0 as PlasmaCore Item { - width: units.iconSizes.smallMedium + width: PlasmaCore.Units.iconSizes.smallMedium height: width property var callback property string text @@ -11,7 +11,7 @@ Item { PlasmaCore.IconItem { id: icon - width: units.iconSizes.medium + width: PlasmaCore.Units.iconSizes.medium height: width anchors.centerIn: parent colorGroup: PlasmaCore.ColorScope.colorGroup diff --git a/look-and-feel/contents/components/UserDelegate.qml b/look-and-feel/contents/components/UserDelegate.qml index 1af13f95..bceb4a42 100644 --- a/look-and-feel/contents/components/UserDelegate.qml +++ b/look-and-feel/contents/components/UserDelegate.qml @@ -29,13 +29,13 @@ Item { property int fontSize: config.fontSize signal clicked() - property real faceSize: Math.min(width, height - usernameDelegate.height - units.smallSpacing) + property real faceSize: Math.min(width, height - usernameDelegate.height - PlasmaCore.Units.smallSpacing) opacity: isCurrent ? 1.0 : 0.5 Behavior on opacity { OpacityAnimator { - duration: units.longDuration + duration: PlasmaCore.Units.longDuration } } @@ -54,16 +54,16 @@ Item { id: imageSource anchors { bottom: usernameDelegate.top - bottomMargin: units.largeSpacing + bottomMargin: PlasmaCore.Units.largeSpacing horizontalCenter: parent.horizontalCenter } Behavior on width { PropertyAnimation { from: faceSize - duration: units.longDuration * 2; + duration: PlasmaCore.Units.longDuration * 2; } } - width: isCurrent ? faceSize : faceSize - units.largeSpacing + width: isCurrent ? faceSize : faceSize - PlasmaCore.Units.largeSpacing height: width //Image takes priority, taking a full path to a file, if that doesn't exist we show an icon @@ -80,7 +80,7 @@ Item { source: iconSource visible: (face.status == Image.Error || face.status == Image.Null) anchors.fill: parent - anchors.margins: units.gridUnit * 0.5 // because mockup says so... + anchors.margins: PlasmaCore.Units.gridUnit * 0.5 // because mockup says so... colorGroup: PlasmaCore.ColorScope.colorGroup } } @@ -88,7 +88,7 @@ Item { ShaderEffect { anchors { bottom: usernameDelegate.top - bottomMargin: units.largeSpacing + bottomMargin: PlasmaCore.Units.largeSpacing horizontalCenter: parent.horizontalCenter } diff --git a/look-and-feel/contents/lockscreen/Clock.qml b/look-and-feel/contents/lockscreen/Clock.qml index 5e1806d5..d8021e7d 100644 --- a/look-and-feel/contents/lockscreen/Clock.qml +++ b/look-and-feel/contents/lockscreen/Clock.qml @@ -15,7 +15,7 @@ ColumnLayout { property int alignment Layout.alignment: alignment - spacing: units.gridUnit + spacing: Units.gridUnit Label { text: Qt.formatTime(timeSource.data["Local"]["DateTime"], root.is24HourTime ? "h:mm" : "h:mm ap") diff --git a/look-and-feel/contents/lockscreen/DraggableDelegate.qml b/look-and-feel/contents/lockscreen/DraggableDelegate.qml index 162695c5..d93833b3 100644 --- a/look-and-feel/contents/lockscreen/DraggableDelegate.qml +++ b/look-and-feel/contents/lockscreen/DraggableDelegate.qml @@ -37,6 +37,6 @@ MouseArea { target: delegate property: "x" to: 0 - duration: units.longDuration + duration: PlasmaCore.Units.longDuration } } diff --git a/look-and-feel/contents/lockscreen/Keypad.qml b/look-and-feel/contents/lockscreen/Keypad.qml index 7397dcd4..62db391e 100644 --- a/look-and-feel/contents/lockscreen/Keypad.qml +++ b/look-and-feel/contents/lockscreen/Keypad.qml @@ -133,18 +133,18 @@ Rectangle { right: parent.right top: passwordBar.bottom bottom: parent.bottom - topMargin: units.gridUnit - bottomMargin: units.gridUnit + topMargin: PlasmaCore.Units.gridUnit + bottomMargin: PlasmaCore.Units.gridUnit } - spacing: units.gridUnit + spacing: PlasmaCore.Units.gridUnit GridLayout { property string thePw Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter - Layout.leftMargin: units.gridUnit * 0.5 - Layout.rightMargin: units.gridUnit * 0.5 - Layout.maximumWidth: units.gridUnit * 22 - Layout.maximumHeight: units.gridUnit * 12.5 + Layout.leftMargin: PlasmaCore.Units.gridUnit * 0.5 + Layout.rightMargin: PlasmaCore.Units.gridUnit * 0.5 + Layout.maximumWidth: PlasmaCore.Units.gridUnit * 22 + Layout.maximumHeight: PlasmaCore.Units.gridUnit * 12.5 columns: 4 // numpad keys diff --git a/look-and-feel/contents/lockscreen/LockScreen.qml b/look-and-feel/contents/lockscreen/LockScreen.qml index 5f3156cc..2dd553ad 100644 --- a/look-and-feel/contents/lockscreen/LockScreen.qml +++ b/look-and-feel/contents/lockscreen/LockScreen.qml @@ -41,7 +41,7 @@ PlasmaCore.ColorScope { property: "contentY" from: 0 to: passwordFlickable.contentHeight - passwordFlickable.height - duration: units.longDuration + duration: PlasmaCore.Units.longDuration easing.type: Easing.InOutQuad } @@ -79,7 +79,7 @@ PlasmaCore.ColorScope { left: parent.left right: parent.right } - height: units.gridUnit + height: PlasmaCore.Units.gridUnit opacity: 1 - (passwordFlickable.contentY / passwordFlickable.columnHeight) sourceComponent: SimpleHeaderBar {} } @@ -124,7 +124,7 @@ PlasmaCore.ColorScope { Clock { id: phoneClock alignment: Qt.AlignHCenter - Layout.bottomMargin: units.gridUnit * 2 // keep spacing even if media controls are gone + Layout.bottomMargin: PlasmaCore.Units.gridUnit * 2 // keep spacing even if media controls are gone } MediaControls { Layout.alignment: Qt.AlignHCenter @@ -222,7 +222,7 @@ PlasmaCore.ColorScope { PlasmaCore.IconItem { id: scrollUpIcon anchors.bottom: parent.bottom - anchors.bottomMargin: units.gridUnit + passwordFlickable.contentY * 0.5 + anchors.bottomMargin: PlasmaCore.Units.gridUnit + passwordFlickable.contentY * 0.5 anchors.horizontalCenter: parent.horizontalCenter opacity: 1 - (passwordFlickable.contentY / passwordFlickable.columnHeight) @@ -235,7 +235,7 @@ PlasmaCore.ColorScope { anchors.fill: parent - property int columnHeight: units.gridUnit * 20 + property int columnHeight: PlasmaCore.Units.gridUnit * 20 property int oldContentY: contentY height: columnHeight + root.height @@ -266,7 +266,7 @@ PlasmaCore.ColorScope { anchors.bottom: parent.bottom width: parent.width - spacing: units.gridUnit + spacing: PlasmaCore.Units.gridUnit // scroll down icon PlasmaCore.IconItem { diff --git a/look-and-feel/contents/lockscreen/MediaControls.qml b/look-and-feel/contents/lockscreen/MediaControls.qml index b6f54b0c..2c5621bc 100644 --- a/look-and-feel/contents/lockscreen/MediaControls.qml +++ b/look-and-feel/contents/lockscreen/MediaControls.qml @@ -20,9 +20,9 @@ Item { RowLayout { id: controlsRow anchors.bottom: parent.bottom - y: units.smallSpacing // some distance to the password field + y: PlasmaCore.Units.smallSpacing // some distance to the password field width: parent.width - height: units.gridUnit * 3 + height: PlasmaCore.Units.gridUnit * 3 spacing: 0 enabled: mpris2Source.canControl @@ -94,7 +94,7 @@ Item { } Item { // spacer - width: units.smallSpacing + width: PlasmaCore.Units.smallSpacing height: 1 } diff --git a/look-and-feel/contents/lockscreen/OsdItem.qml b/look-and-feel/contents/lockscreen/OsdItem.qml index a11cfacf..dc9ad033 100644 --- a/look-and-feel/contents/lockscreen/OsdItem.qml +++ b/look-and-feel/contents/lockscreen/OsdItem.qml @@ -26,15 +26,15 @@ RowLayout { // false for displaying the value as normal text property bool showingProgress: false - spacing: units.smallSpacing + spacing: PlasmaCore.Units.smallSpacing - width: Math.max(Math.min(Screen.desktopAvailableWidth / 2, implicitWidth), units.gridUnit * 15) - height: units.iconSizes.medium + width: Math.max(Math.min(Screen.desktopAvailableWidth / 2, implicitWidth), PlasmaCore.Units.gridUnit * 15) + height: PlasmaCore.Units.iconSizes.medium PlasmaCore.IconItem { - Layout.leftMargin: units.smallSpacing - Layout.preferredWidth: units.iconSizes.medium - Layout.preferredHeight: units.iconSizes.medium + Layout.leftMargin: PlasmaCore.Units.smallSpacing + Layout.preferredWidth: PlasmaCore.Units.iconSizes.medium + Layout.preferredHeight: PlasmaCore.Units.iconSizes.medium Layout.alignment: Qt.AlignVCenter source: icon visible: valid @@ -46,7 +46,7 @@ RowLayout { Layout.alignment: Qt.AlignVCenter // So it never exceeds the minimum popup size Layout.preferredWidth: 1 - Layout.rightMargin: units.smallSpacing + Layout.rightMargin: PlasmaCore.Units.smallSpacing visible: showingProgress from: 0 to: osdMaxValue @@ -66,7 +66,7 @@ RowLayout { id: percentageLabel Layout.fillHeight: true Layout.preferredWidth: widestLabelSize.width - Layout.rightMargin: units.smallSpacing + Layout.rightMargin: PlasmaCore.Units.smallSpacing Layout.alignment: Qt.AlignVCenter level: 3 horizontalAlignment: Text.AlignHCenter @@ -93,7 +93,7 @@ RowLayout { id: label Layout.fillWidth: true Layout.fillHeight: true - Layout.rightMargin: units.smallSpacing + Layout.rightMargin: PlasmaCore.Units.smallSpacing Layout.alignment: Qt.AlignVCenter level: 3 horizontalAlignment: Text.AlignHCenter diff --git a/look-and-feel/contents/lockscreen/PasswordBar.qml b/look-and-feel/contents/lockscreen/PasswordBar.qml index c3921451..3f8a380b 100644 --- a/look-and-feel/contents/lockscreen/PasswordBar.qml +++ b/look-and-feel/contents/lockscreen/PasswordBar.qml @@ -16,7 +16,7 @@ import org.kde.plasma.workspace.keyboardlayout 1.0 as Keyboards Rectangle { id: root - implicitHeight: units.gridUnit * 2.5 + implicitHeight: PlasmaCore.Units.gridUnit * 2.5 // toggle between pin and password mode property bool isPinMode: true @@ -182,7 +182,7 @@ Rectangle { anchors.right: parent.right anchors.top: parent.top anchors.bottom: parent.bottom - anchors.margins: units.smallSpacing + anchors.margins: PlasmaCore.Units.smallSpacing implicitWidth: height icon.name: "input-keyboard-virtual-symbolic" onClicked: { @@ -212,7 +212,7 @@ Rectangle { ListView { id: dotDisplay - property int dotWidth: Math.round(units.gridUnit * 0.35) + property int dotWidth: Math.round(PlasmaCore.Units.gridUnit * 0.35) Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter Layout.bottomMargin: Math.round(dotWidth / 2) diff --git a/look-and-feel/contents/lockscreen/SimpleHeaderBar.qml b/look-and-feel/contents/lockscreen/SimpleHeaderBar.qml index d27e4119..aed7044e 100644 --- a/look-and-feel/contents/lockscreen/SimpleHeaderBar.qml +++ b/look-and-feel/contents/lockscreen/SimpleHeaderBar.qml @@ -84,7 +84,7 @@ PlasmaCore.ColorScope { top: parent.top bottom: parent.bottom right: parent.right - rightMargin: units.smallSpacing + rightMargin: PlasmaCore.Units.smallSpacing } Indicators.Bluetooth {} Indicators.Wifi {} diff --git a/look-and-feel/contents/lockscreen/SimpleNotification.qml b/look-and-feel/contents/lockscreen/SimpleNotification.qml index ac44e8e9..301412a2 100644 --- a/look-and-feel/contents/lockscreen/SimpleNotification.qml +++ b/look-and-feel/contents/lockscreen/SimpleNotification.qml @@ -27,7 +27,7 @@ Item { anchors.left: parent.left anchors.right: parent.right - height: notifLayout.height + units.gridUnit + height: notifLayout.height + PlasmaCore.Units.gridUnit opacity: 1 - Math.min(1, 1.5 * Math.abs(rect.x) / width) // opacity during dismiss swipe @@ -57,20 +57,20 @@ Item { id: notifLayout anchors { left: parent.left - leftMargin: units.gridUnit * 0.5 + leftMargin: PlasmaCore.Units.gridUnit * 0.5 right: parent.right - rightMargin: units.gridUnit * 0.5 + rightMargin: PlasmaCore.Units.gridUnit * 0.5 verticalCenter: parent.verticalCenter } RowLayout { Layout.fillWidth: true - spacing: units.smallSpacing / 2 + spacing: PlasmaCore.Units.smallSpacing / 2 // notif body ColumnLayout { id: textLayout Layout.fillWidth: true Layout.alignment: Qt.AlignVCenter | Qt.AlignLeft - spacing: units.gridUnit / 2 + spacing: PlasmaCore.Units.gridUnit / 2 Label { text: notification.summary @@ -97,10 +97,10 @@ Item { id: iconContainer Layout.alignment: Qt.AlignVCenter | Qt.AlignRight - Layout.preferredWidth: units.iconSizes.large - Layout.preferredHeight: units.iconSizes.large - Layout.topMargin: units.smallSpacing - Layout.bottomMargin: units.smallSpacing + Layout.preferredWidth: PlasmaCore.Units.iconSizes.large + Layout.preferredHeight: PlasmaCore.Units.iconSizes.large + Layout.topMargin: PlasmaCore.Units.smallSpacing + Layout.bottomMargin: PlasmaCore.Units.smallSpacing visible: iconItem.active || imageItem.active @@ -135,7 +135,7 @@ Item { Flow { id: actionsflow Layout.fillWidth: true - spacing: units.smallSpacing + spacing: PlasmaCore.Units.smallSpacing layoutDirection: Qt.RightToLeft Repeater { id: actionRepeater @@ -192,7 +192,7 @@ Item { } else { slideAnim.restart(); } - if (notificationItem.notification.hasDefaultAction && Math.abs(rect.x) < units.gridUnit) { + if (notificationItem.notification.hasDefaultAction && Math.abs(rect.x) < PlasmaCore.Units.gridUnit) { if (notificationItem.notification.category === "x-kde.incoming-call") { notifModel.invokeDefaultAction(notificationItem.notification.notificationId); } else { @@ -208,7 +208,7 @@ Item { target: rect property: "x" to: 0 - duration: units.longDuration + duration: PlasmaCore.Units.longDuration } } } diff --git a/look-and-feel/contents/logout/Logout.qml b/look-and-feel/contents/logout/Logout.qml index 60fdea55..1ddba985 100644 --- a/look-and-feel/contents/logout/Logout.qml +++ b/look-and-feel/contents/logout/Logout.qml @@ -61,21 +61,21 @@ PlasmaCore.ColorScope { target: lay from: 10 to: 1 - duration: units.longDuration + duration: PlasmaCore.Units.longDuration easing.type: Easing.InOutQuad } OpacityAnimator { target: lay from: 0 to: 1 - duration: units.longDuration + duration: PlasmaCore.Units.longDuration easing.type: Easing.InOutQuad } OpacityAnimator { target: background from: 0 to: 0.6 - duration: units.longDuration + duration: PlasmaCore.Units.longDuration easing.type: Easing.InOutQuad } } @@ -92,21 +92,21 @@ PlasmaCore.ColorScope { target: lay from: 1 to: 10 - duration: units.longDuration + duration: PlasmaCore.Units.longDuration easing.type: Easing.InOutQuad } OpacityAnimator { target: lay from: 1 to: 0 - duration: units.longDuration + duration: PlasmaCore.Units.longDuration easing.type: Easing.InOutQuad } OpacityAnimator { target: background from: 0.6 to: 0 - duration: units.longDuration + duration: PlasmaCore.Units.longDuration easing.type: Easing.InOutQuad } } @@ -125,8 +125,8 @@ PlasmaCore.ColorScope { id: lay anchors.centerIn: parent columns: 2 - rowSpacing: units.gridUnit * 2 - columnSpacing: units.gridUnit * 2 + rowSpacing: PlasmaCore.Units.gridUnit * 2 + columnSpacing: PlasmaCore.Units.gridUnit * 2 scale: 2 opacity: 0 ActionButton { diff --git a/shell/contents/components/DialerButton.qml b/shell/contents/components/DialerButton.qml index 784cb55f..9d2a46cb 100644 --- a/shell/contents/components/DialerButton.qml +++ b/shell/contents/components/DialerButton.qml @@ -7,7 +7,7 @@ Text { horizontalAlignment: Qt.AlignHCenter verticalAlignment: Qt.AlignVCenter color: dialer.textColor - font.pixelSize: Math.floor((width - (units.largeSpacing)) / 2) + font.pixelSize: Math.floor((width - (PlasmaCore.Units.largeSpacing)) / 2) property alias sub: longHold.text property var callback diff --git a/shell/contents/components/DialerIconButton.qml b/shell/contents/components/DialerIconButton.qml index 254fb0e0..7eb07843 100644 --- a/shell/contents/components/DialerIconButton.qml +++ b/shell/contents/components/DialerIconButton.qml @@ -11,7 +11,7 @@ Item { PlasmaCore.IconItem { id: icon - width: units.iconSizes.medium + width: PlasmaCore.Units.iconSizes.medium height: width anchors.centerIn: parent } diff --git a/shell/contents/views/Pin.qml b/shell/contents/views/Pin.qml index 3fa74e78..cafbf952 100644 --- a/shell/contents/views/Pin.qml +++ b/shell/contents/views/Pin.qml @@ -128,9 +128,9 @@ PlasmaCore.ColorScope { ColumnLayout { anchors.fill: parent - anchors.topMargin: 2*units.gridUnit - anchors.bottomMargin: units.gridUnit - spacing: units.gridUnit + anchors.topMargin: 2*PlasmaCore.Units.gridUnit + anchors.bottomMargin: PlasmaCore.Units.gridUnit + spacing: PlasmaCore.Units.gridUnit // pin dot display Item { @@ -166,7 +166,7 @@ PlasmaCore.ColorScope { anchors.left: parent.left anchors.right: parent.right anchors.top: simLabel.bottom - anchors.topMargin: units.gridUnit + anchors.topMargin: PlasmaCore.Units.gridUnit horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignVCenter font.pointSize: 12 @@ -179,14 +179,14 @@ PlasmaCore.ColorScope { RowLayout { id: dotDisplay anchors.centerIn: parent - height: units.gridUnit * 2.5 // maintain height when letter is shown + height: PlasmaCore.Units.gridUnit * 2.5 // maintain height when letter is shown spacing: 6 Repeater { model: root.pin.length delegate: Rectangle { // dot visible: index !== root.pin.length-1 || root.lastKey === "" // hide dot if number is shown - Layout.preferredWidth: units.gridUnit * 0.5 + Layout.preferredWidth: PlasmaCore.Units.gridUnit * 0.5 Layout.preferredHeight: Layout.preferredWidth Layout.alignment: Qt.AlignVCenter radius: width @@ -206,10 +206,10 @@ PlasmaCore.ColorScope { // number keys GridLayout { Layout.alignment: Qt.AlignHCenter | Qt.AlignBottom - Layout.leftMargin: units.gridUnit * 0.5 - Layout.rightMargin: units.gridUnit * 0.5 - Layout.maximumWidth: units.gridUnit * 22 - Layout.maximumHeight: (root.height > root.width) ? units.gridUnit * 17.5 : units.gridUnit * 12.5 + Layout.leftMargin: PlasmaCore.Units.gridUnit * 0.5 + Layout.rightMargin: PlasmaCore.Units.gridUnit * 0.5 + Layout.maximumWidth: PlasmaCore.Units.gridUnit * 22 + Layout.maximumHeight: (root.height > root.width) ? PlasmaCore.Units.gridUnit * 17.5 : PlasmaCore.Units.gridUnit * 12.5 columns: 3 Repeater { @@ -283,7 +283,7 @@ PlasmaCore.ColorScope { } } Item { - height: units.gridUnit * 0.5 + height: PlasmaCore.Units.gridUnit * 0.5 } } }