From 127bbdf653d167e219b772e62f7c38b416cf69fc Mon Sep 17 00:00:00 2001 From: Alexey Andreyev Date: Tue, 25 Jul 2023 01:13:52 +0000 Subject: [PATCH] Port away from PlasmaCore and PlasmaExtras to Kirigami See also: https://pointieststick.com/2023/06/14/call-to-action-easy-porting-opportunity-in-plasma/ --- .../qml/actiondrawer/ActionDrawer.qml | 14 ++--- .../qml/actiondrawer/ActionDrawerWindow.qml | 1 - .../LandscapeContentContainer.qml | 19 +++--- .../actiondrawer/PortraitContentContainer.qml | 15 ++--- .../quicksettings/BrightnessItem.qml | 10 +-- .../qml/actiondrawer/quicksettings/Handle.qml | 6 +- .../quicksettings/QuickSettings.qml | 30 ++++----- .../quicksettings/QuickSettingsDelegate.qml | 8 +-- .../quicksettings/QuickSettingsDrawer.qml | 24 ++++---- .../QuickSettingsFullDelegate.qml | 14 ++--- .../QuickSettingsMinimizedDelegate.qml | 6 +- .../quicksettings/QuickSettingsPanel.qml | 12 ++-- .../mobileshell/qml/components/Constants.qml | 6 +- .../qml/components/MarqueeLabel.qml | 8 +-- .../qml/components/StartupFeedback.qml | 8 +-- .../qml/dataproviders/BatteryInfo.qml | 1 - .../qml/dataproviders/BluetoothInfo.qml | 1 - .../mobileshell/qml/homescreen/HomeScreen.qml | 1 - .../qml/navigationpanel/NavigationPanel.qml | 10 +-- .../navigationpanel/NavigationPanelButton.qml | 7 ++- .../mobileshell/qml/statusbar/ClockText.qml | 3 +- .../mobileshell/qml/statusbar/StatusBar.qml | 21 ++++--- .../mobileshell/qml/statusbar/TaskWidget.qml | 3 +- .../statusbar/indicators/BatteryIndicator.qml | 7 ++- .../indicators/BluetoothIndicator.qml | 3 +- .../indicators/InternetIndicator.qml | 3 +- .../indicators/SignalStrengthIndicator.qml | 9 +-- .../statusbar/indicators/VolumeIndicator.qml | 3 +- .../mobileshell/qml/volumeosd/AudioApplet.qml | 61 +++++++++---------- .../qml/volumeosd/ListItemBase.qml | 28 ++++----- .../mobileshell/qml/volumeosd/PopupCard.qml | 8 +-- .../mobileshell/qml/volumeosd/VolumeOSD.qml | 50 ++++++++------- .../qml/widgets/krunner/KRunnerWidget.qml | 54 ++++++++-------- .../mediacontrols/BlurredBackground.qml | 4 +- .../mediacontrols/MediaControlsSource.qml | 1 - .../mediacontrols/MediaControlsWidget.qml | 29 +++++---- .../notifications/BaseNotificationItem.qml | 2 - .../notifications/NotificationCard.qml | 17 +++--- .../NotificationFooterActions.qml | 10 +-- .../notifications/NotificationGroupHeader.qml | 15 +++-- .../notifications/NotificationItem.qml | 23 ++++--- .../notifications/NotificationReplyField.qml | 4 +- .../notifications/NotificationTimeText.qml | 4 +- .../notifications/NotificationsWidget.qml | 19 +++--- .../widgets/notifications/ThumbnailStrip.qml | 6 +- .../package/contents/ui/FavoriteStrip.qml | 7 ++- .../package/contents/ui/FlickContainer.qml | 1 - .../package/contents/ui/HomeDelegate.qml | 26 ++++---- .../folio/package/contents/ui/HomeScreen.qml | 1 - .../contents/ui/HomeScreenContents.qml | 13 ++-- .../package/contents/ui/HomeScreenPages.qml | 19 +++--- .../package/contents/ui/HomeScreenState.qml | 8 +-- .../package/contents/ui/LauncherContainer.qml | 17 +++--- .../package/contents/ui/LauncherRepeater.qml | 5 +- .../contents/ui/MobileAppletContainer.qml | 7 ++- .../ui/appdrawer/AbstractAppDrawer.qml | 10 ++- .../contents/ui/appdrawer/AppDrawerHeader.qml | 29 ++++----- .../contents/ui/appdrawer/AppDrawerLoader.qml | 5 +- .../ui/appdrawer/DrawerGridDelegate.qml | 12 ++-- .../ui/appdrawer/DrawerListDelegate.qml | 20 +++--- .../ui/appdrawer/GridViewAppDrawer.qml | 8 +-- .../ui/appdrawer/ListViewAppDrawer.qml | 8 +-- .../folio/package/contents/ui/main.qml | 5 +- .../contents/ui/private/ActionButton.qml | 7 ++- .../contents/ui/private/ConfigOverlay.qml | 9 +-- .../ui/private/DelegateRemoveButton.qml | 7 ++- .../contents/ui/private/GradientBar.qml | 8 +-- .../contents/ui/private/OpenDrawerButton.qml | 7 ++- .../contents/ui/private/ScrollIndicator.qml | 8 +-- .../halcyon/package/contents/ui/Clock.qml | 4 +- .../contents/ui/FavoritesAppDelegate.qml | 37 ++++++----- .../package/contents/ui/FavoritesGrid.qml | 10 ++- .../package/contents/ui/FavoritesView.qml | 12 ++-- .../package/contents/ui/FolderGrid.qml | 14 ++--- .../package/contents/ui/GridAppDelegate.qml | 11 ++-- .../package/contents/ui/GridAppList.qml | 12 ++-- .../package/contents/ui/HomeScreen.qml | 2 - .../halcyon/package/contents/ui/main.qml | 4 +- .../panel/package/contents/ui/main.qml | 4 +- .../contents/ui/NavigationPanelComponent.qml | 5 +- .../taskpanel/package/contents/ui/main.qml | 9 ++- .../cellular/package/contents/ui/main.qml | 2 +- .../prepare/package/contents/ui/main.qml | 1 - .../modules/time/package/contents/ui/main.qml | 11 ++-- .../package/contents/ui/ConnectDialog.qml | 2 +- .../contents/ui/ConnectionItemDelegate.qml | 5 +- .../modules/wifi/package/contents/ui/main.qml | 5 +- initialstart/qml/LandingComponent.qml | 6 +- initialstart/qml/Wizard.qml | 15 +++-- kcms/cellularnetwork/ui/AvailableNetworks.qml | 2 +- kcms/cellularnetwork/ui/MessagesList.qml | 2 +- kcms/cellularnetwork/ui/ModemPage.qml | 2 +- kcms/cellularnetwork/ui/PopupDialog.qml | 4 +- kcms/cellularnetwork/ui/ProfileList.qml | 8 +-- kcms/cellularnetwork/ui/SimLockPage.qml | 14 ++--- kcms/cellularnetwork/ui/SimPage.qml | 8 +-- kcms/cellularnetwork/ui/main.qml | 10 +-- kcms/hotspot/ui/main.qml | 2 +- kcms/info/ui/main.qml | 4 +- kcms/mobileshell/ui/QuickSettingsForm.qml | 4 +- kcms/mobileshell/ui/main.qml | 6 +- kcms/powermanagement/ui/BatteryPage.qml | 3 +- kcms/powermanagement/ui/main.qml | 5 +- kcms/time/ui/TimePicker.qml | 2 +- kcms/time/ui/main.qml | 2 +- kcms/virtualkeyboard/ui/main.qml | 4 +- kcms/wifi/ui/ConnectDialog.qml | 6 +- kcms/wifi/ui/ConnectionItemDelegate.qml | 7 +-- kcms/wifi/ui/main.qml | 2 +- kwin/mobiletaskswitcher/qml/Task.qml | 17 +++--- kwin/mobiletaskswitcher/qml/TaskList.qml | 4 +- kwin/mobiletaskswitcher/qml/TaskSwitcher.qml | 22 +++---- .../qml/TaskSwitcherState.qml | 12 ++-- lookandfeel/contents/lockscreen/Clock.qml | 4 +- .../contents/lockscreen/FlickContainer.qml | 4 +- .../contents/lockscreen/HeaderComponent.qml | 3 +- lookandfeel/contents/lockscreen/Keypad.qml | 30 ++++----- .../contents/lockscreen/LockScreen.qml | 31 +++++----- .../lockscreen/LockScreenNarrowContent.qml | 22 +++---- .../LockScreenWideScreenContent.qml | 30 ++++----- .../lockscreen/NotificationsComponent.qml | 6 +- .../contents/lockscreen/PasswordBar.qml | 11 ++-- lookandfeel/contents/logout/ActionButton.qml | 19 +++--- lookandfeel/contents/logout/Logout.qml | 23 +++---- .../contents/systemdialog/SystemDialog.qml | 12 ++-- .../private/MobileSystemDialogButton.qml | 8 +-- quicksettings/caffeine/contents/ui/main.qml | 1 - .../keyboardtoggle/contents/ui/main.qml | 1 - .../powermenu/package/contents/ui/main.qml | 1 - .../configuration/ConfigurationAppletPage.qml | 2 +- .../ConfigurationContainmentAppearance.qml | 1 - .../ContainmentConfiguration.qml | 33 +++++----- .../configuration/WallpaperSelector.qml | 18 +++--- shell/contents/views/Desktop.qml | 6 +- shell/contents/views/Panel.qml | 2 +- tests/ActionDrawerTest.qml | 8 +-- tests/LockScreenTest.qml | 1 - 137 files changed, 709 insertions(+), 726 deletions(-) diff --git a/components/mobileshell/qml/actiondrawer/ActionDrawer.qml b/components/mobileshell/qml/actiondrawer/ActionDrawer.qml index e5f3ea75..5f820e90 100644 --- a/components/mobileshell/qml/actiondrawer/ActionDrawer.qml +++ b/components/mobileshell/qml/actiondrawer/ActionDrawer.qml @@ -10,10 +10,10 @@ import QtQuick.Controls 2.15 import QtQuick.Layouts 1.1 import QtQuick.Window 2.2 -import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.components 3.0 as PlasmaComponents import org.kde.plasma.private.nanoshell 2.0 as NanoShell import org.kde.plasma.private.mobileshell 1.0 as MobileShell +import org.kde.kirigami 2.20 as Kirigami import "../components" as Components @@ -81,7 +81,7 @@ Item { /** * At some point, even if the screen is technically portrait, if we have a ton of width it'd be best to just show the landscape mode. */ - readonly property real largePortraitThreshold: PlasmaCore.Units.gridUnit * 35 + readonly property real largePortraitThreshold: Kirigami.Units.gridUnit * 35 enum Mode { Portrait = 0, @@ -167,10 +167,10 @@ Item { function updateState() { cancelAnimations(); - let openThreshold = PlasmaCore.Units.gridUnit; + let openThreshold = Kirigami.Units.gridUnit; if (root.offset <= 0) { - // close immediately, so that we don't have to wait PlasmaCore.Units.longDuration + // close immediately, so that we don't have to wait Kirigami.Units.longDuration root.visible = false; close(); } else if (root.direction === MobileShell.Direction.None || !root.opened) { @@ -206,7 +206,7 @@ Item { PropertyAnimation on offset { id: closeAnim - duration: PlasmaCore.Units.veryLongDuration + duration: Kirigami.Units.veryLongDuration easing.type: Easing.OutExpo to: 0 onFinished: { @@ -216,14 +216,14 @@ Item { } PropertyAnimation on offset { id: openAnim - duration: PlasmaCore.Units.veryLongDuration + duration: Kirigami.Units.veryLongDuration easing.type: Easing.OutExpo to: contentContainerLoader.minimizedQuickSettingsOffset onFinished: root.opened = true } PropertyAnimation on offset { id: expandAnim - duration: PlasmaCore.Units.veryLongDuration + duration: Kirigami.Units.veryLongDuration easing.type: Easing.OutExpo to: contentContainerLoader.maximizedQuickSettingsOffset onFinished: root.opened = true; diff --git a/components/mobileshell/qml/actiondrawer/ActionDrawerWindow.qml b/components/mobileshell/qml/actiondrawer/ActionDrawerWindow.qml index b0ed2a51..c5897280 100644 --- a/components/mobileshell/qml/actiondrawer/ActionDrawerWindow.qml +++ b/components/mobileshell/qml/actiondrawer/ActionDrawerWindow.qml @@ -9,7 +9,6 @@ import QtQuick.Controls 2.15 import QtQuick.Layouts 1.1 import QtQuick.Window 2.2 -import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.components 3.0 as PlasmaComponents import org.kde.plasma.private.nanoshell 2.0 as NanoShell diff --git a/components/mobileshell/qml/actiondrawer/LandscapeContentContainer.qml b/components/mobileshell/qml/actiondrawer/LandscapeContentContainer.qml index 47947e24..dfd400bd 100644 --- a/components/mobileshell/qml/actiondrawer/LandscapeContentContainer.qml +++ b/components/mobileshell/qml/actiondrawer/LandscapeContentContainer.qml @@ -24,7 +24,7 @@ import "quicksettings" /** * Root element that contains all of the ActionDrawer's contents, and is anchored to the screen. */ -PlasmaCore.ColorScope { +Item { id: root required property var actionDrawer @@ -37,18 +37,19 @@ PlasmaCore.ColorScope { readonly property real minWidthHeight: Math.min(root.width, root.height) readonly property real opacityValue: Math.max(0, Math.min(1, actionDrawer.offset / root.minimizedQuickSettingsOffset)) - colorGroup: PlasmaCore.Theme.ViewColorGroup + Kirigami.Theme.colorSet: Kirigami.Theme.View + Kirigami.Theme.inherit: false // fullscreen background Rectangle { anchors.fill: parent // darken if there are notifications - color: Qt.rgba(PlasmaCore.Theme.backgroundColor.r, - PlasmaCore.Theme.backgroundColor.g, - PlasmaCore.Theme.backgroundColor.b, + color: Qt.rgba(Kirigami.Theme.backgroundColor.r, + Kirigami.Theme.backgroundColor.g, + Kirigami.Theme.backgroundColor.b, notificationWidget.hasNotifications ? 0.95 : 0.9) - Behavior on color { ColorAnimation { duration: PlasmaCore.Units.longDuration } } + Behavior on color { ColorAnimation { duration: Kirigami.Units.longDuration } } opacity: opacityValue } @@ -101,7 +102,7 @@ PlasmaCore.ColorScope { onBackgroundClicked: root.actionDrawer.close(); // don't allow notifications widget to get too wide - Layout.maximumWidth: PlasmaCore.Units.gridUnit * 25 + Layout.maximumWidth: Kirigami.Units.gridUnit * 25 Layout.fillHeight: true Layout.fillWidth: true Layout.topMargin: minWidthHeight * 0.02 @@ -137,7 +138,7 @@ PlasmaCore.ColorScope { left: parent.left top: clock.bottom bottom: isOnLargeScreen ? columnLayout.top : mediaWidget.top - topMargin: PlasmaCore.Units.smallSpacing + topMargin: Kirigami.Units.smallSpacing leftMargin: columnLayout.anchors.margins } @@ -147,7 +148,7 @@ PlasmaCore.ColorScope { MediaControls.MediaControlsWidget { id: mediaWidget - property real fullHeight: visible ? height + PlasmaCore.Units.smallSpacing * 6 : 0 + property real fullHeight: visible ? height + Kirigami.Units.smallSpacing * 6 : 0 y: isOnLargeScreen ? date.y - height + date.implicitHeight : date.y + date.implicitHeight + columnLayout.anchors.margins / 2 diff --git a/components/mobileshell/qml/actiondrawer/PortraitContentContainer.qml b/components/mobileshell/qml/actiondrawer/PortraitContentContainer.qml index d1188832..aed70878 100644 --- a/components/mobileshell/qml/actiondrawer/PortraitContentContainer.qml +++ b/components/mobileshell/qml/actiondrawer/PortraitContentContainer.qml @@ -9,8 +9,8 @@ import QtQuick.Controls 2.15 import QtQuick.Layouts 1.1 import QtQuick.Window 2.2 -import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.components 3.0 as PlasmaComponents +import org.kde.kirigami 2.20 as Kirigami import "../components" as Components import "../widgets/notifications" as Notifications @@ -19,7 +19,7 @@ import "quicksettings" /** * Root element that contains all of the ActionDrawer's contents, and is anchored to the screen. */ -PlasmaCore.ColorScope { +Item { id: root required property var actionDrawer @@ -32,7 +32,8 @@ PlasmaCore.ColorScope { // fully open position readonly property real maximizedQuickSettingsOffset: minimizedQuickSettingsOffset + quickSettings.maxAddedHeight - colorGroup: PlasmaCore.Theme.ViewColorGroup + Kirigami.Theme.colorSet: Kirigami.Theme.View + Kirigami.Theme.inherit: false function applyMinMax(val) { return Math.max(0, Math.min(1, val)); @@ -42,11 +43,11 @@ PlasmaCore.ColorScope { Rectangle { anchors.fill: parent // darken if there are notifications - color: Qt.rgba(PlasmaCore.Theme.backgroundColor.r, - PlasmaCore.Theme.backgroundColor.g, - PlasmaCore.Theme.backgroundColor.b, + color: Qt.rgba(Kirigami.Theme.backgroundColor.r, + Kirigami.Theme.backgroundColor.g, + Kirigami.Theme.backgroundColor.b, 0.95) - Behavior on color { ColorAnimation { duration: PlasmaCore.Units.longDuration } } + Behavior on color { ColorAnimation { duration: Kirigami.Units.longDuration } } opacity: Math.max(0, Math.min(1, actionDrawer.offset / root.minimizedQuickSettingsOffset)) } diff --git a/components/mobileshell/qml/actiondrawer/quicksettings/BrightnessItem.qml b/components/mobileshell/qml/actiondrawer/quicksettings/BrightnessItem.qml index 0245eb64..b803d354 100644 --- a/components/mobileshell/qml/actiondrawer/quicksettings/BrightnessItem.qml +++ b/components/mobileshell/qml/actiondrawer/quicksettings/BrightnessItem.qml @@ -83,7 +83,7 @@ Item { RowLayout { id: brightnessRow - spacing: PlasmaCore.Units.smallSpacing * 2 + spacing: Kirigami.Units.smallSpacing * 2 anchors.left: parent.left anchors.right: parent.right @@ -91,8 +91,8 @@ Item { PlasmaCore.IconItem { Layout.alignment: Qt.AlignVCenter - Layout.leftMargin: PlasmaCore.Units.smallSpacing - Layout.preferredWidth: PlasmaCore.Units.iconSizes.smallMedium + Layout.leftMargin: Kirigami.Units.smallSpacing + Layout.preferredWidth: Kirigami.Units.iconSizes.smallMedium Layout.preferredHeight: width source: "low-brightness" } @@ -123,8 +123,8 @@ Item { PlasmaCore.IconItem { Layout.alignment: Qt.AlignVCenter - Layout.rightMargin: PlasmaCore.Units.smallSpacing - Layout.preferredWidth: PlasmaCore.Units.iconSizes.smallMedium + Layout.rightMargin: Kirigami.Units.smallSpacing + Layout.preferredWidth: Kirigami.Units.iconSizes.smallMedium Layout.preferredHeight: width source: "high-brightness" } diff --git a/components/mobileshell/qml/actiondrawer/quicksettings/Handle.qml b/components/mobileshell/qml/actiondrawer/quicksettings/Handle.qml index 5ac0afe7..4759e07a 100644 --- a/components/mobileshell/qml/actiondrawer/quicksettings/Handle.qml +++ b/components/mobileshell/qml/actiondrawer/quicksettings/Handle.qml @@ -6,17 +6,17 @@ import QtQuick 2.15 -import org.kde.plasma.core 2.0 as PlasmaCore +import org.kde.kirigami 2.20 as Kirigami Rectangle { id: handle signal tapped() - implicitWidth: PlasmaCore.Units.gridUnit * 3 + implicitWidth: Kirigami.Units.gridUnit * 3 implicitHeight: 3 radius: height - color: PlasmaCore.Theme.textColor + color: Kirigami.Theme.textColor opacity: 0.5 TapHandler { diff --git a/components/mobileshell/qml/actiondrawer/quicksettings/QuickSettings.qml b/components/mobileshell/qml/actiondrawer/quicksettings/QuickSettings.qml index 963699f4..95eb8b83 100644 --- a/components/mobileshell/qml/actiondrawer/quicksettings/QuickSettings.qml +++ b/components/mobileshell/qml/actiondrawer/quicksettings/QuickSettings.qml @@ -10,9 +10,9 @@ import QtQuick.Controls 2.15 import QtQuick.Layouts 1.1 import QtQuick.Window 2.2 -import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.components 3.0 as PlasmaComponents import org.kde.plasma.private.mobileshell.quicksettingsplugin as QS +import org.kde.kirigami 2.20 as Kirigami import "../../components" as Components import "../../components/util.js" as Util @@ -41,8 +41,8 @@ Item { readonly property real fullHeight: fullView.implicitHeight readonly property real intendedColumnWidth: 120 - readonly property real intendedMinimizedColumnWidth: PlasmaCore.Units.gridUnit * 3 + PlasmaCore.Units.largeSpacing - readonly property real minimizedRowHeight: PlasmaCore.Units.gridUnit * 3 + PlasmaCore.Units.largeSpacing + readonly property real intendedMinimizedColumnWidth: Kirigami.Units.gridUnit * 3 + Kirigami.Units.gridUnit + readonly property real minimizedRowHeight: Kirigami.Units.gridUnit * 3 + Kirigami.Units.gridUnit property real minimizedViewProgress: 0 property real fullViewProgress: 1 @@ -110,9 +110,9 @@ Item { BrightnessItem { id: brightnessItem - Layout.bottomMargin: PlasmaCore.Units.smallSpacing * 2 - Layout.leftMargin: PlasmaCore.Units.smallSpacing - Layout.rightMargin: PlasmaCore.Units.smallSpacing + Layout.bottomMargin: Kirigami.Units.smallSpacing * 2 + Layout.leftMargin: Kirigami.Units.smallSpacing + Layout.rightMargin: Kirigami.Units.smallSpacing Layout.fillWidth: true } } @@ -139,8 +139,8 @@ Item { implicitHeight: root.minimizedRowHeight implicitWidth: root.minimizedColumnWidth - horizontalPadding: (width - PlasmaCore.Units.gridUnit * 3) / 2 - verticalPadding: (height - PlasmaCore.Units.gridUnit * 3) / 2 + horizontalPadding: (width - Kirigami.Units.gridUnit * 3) / 2 + verticalPadding: (height - Kirigami.Units.gridUnit * 3) / 2 contentItem: QuickSettingsMinimizedDelegate { restrictedPermissions: actionDrawer.restrictedPermissions @@ -203,9 +203,9 @@ Item { id: indicatorLoader Layout.alignment: Qt.AlignCenter - Layout.topMargin: PlasmaCore.Units.smallSpacing - Layout.leftMargin: PlasmaCore.Units.smallSpacing - Layout.rightMargin: PlasmaCore.Units.smallSpacing + Layout.topMargin: Kirigami.Units.smallSpacing + Layout.leftMargin: Kirigami.Units.smallSpacing + Layout.rightMargin: Kirigami.Units.smallSpacing // Avoid wasting space when not loaded Layout.maximumHeight: active ? item.implicitHeight : 0 @@ -222,7 +222,7 @@ Item { implicitHeight: count > 1 ? 8 : 0 radius: parent.width / 2 - color: PlasmaCore.Theme.disabledTextColor + color: Kirigami.Theme.disabledTextColor opacity: index === currentIndex ? 0.95 : 0.45 } @@ -253,14 +253,14 @@ Item { position: 0.1 contentItem: Item { - implicitWidth: PlasmaCore.Units.smallSpacing / 4 + implicitWidth: Kirigami.Units.smallSpacing / 4 Rectangle { // shift over the indicator a bit to the right anchors.fill: parent anchors.leftMargin: 2 anchors.rightMargin: -2 - color: PlasmaCore.Theme.textColor + color: Kirigami.Theme.textColor opacity: scrollIndicator.active ? 0.5 : 0 Behavior on opacity { NumberAnimation {} } @@ -296,7 +296,7 @@ Item { Components.BaseItem { height: root.rowHeight width: root.columnWidth - padding: PlasmaCore.Units.smallSpacing + padding: Kirigami.Units.smallSpacing contentItem: QuickSettingsFullDelegate { restrictedPermissions: actionDrawer.restrictedPermissions diff --git a/components/mobileshell/qml/actiondrawer/quicksettings/QuickSettingsDelegate.qml b/components/mobileshell/qml/actiondrawer/quicksettings/QuickSettingsDelegate.qml index 195297ca..69a73f6e 100644 --- a/components/mobileshell/qml/actiondrawer/quicksettings/QuickSettingsDelegate.qml +++ b/components/mobileshell/qml/actiondrawer/quicksettings/QuickSettingsDelegate.qml @@ -37,10 +37,10 @@ Components.BaseItem { property var iconItem readonly property color enabledButtonBorderColor: Qt.darker(PlasmaCore.ColorScope.highlightColor, 1.25) - readonly property color disabledButtonBorderColor: Kirigami.ColorUtils.tintWithAlpha(PlasmaCore.ColorScope.textColor, PlasmaCore.ColorScope.backgroundColor, 0.75) - readonly property color enabledButtonColor: Kirigami.ColorUtils.tintWithAlpha(PlasmaCore.ColorScope.highlightColor, PlasmaCore.ColorScope.backgroundColor, 0.6) - readonly property color enabledButtonPressedColor: Kirigami.ColorUtils.tintWithAlpha(PlasmaCore.ColorScope.highlightColor, PlasmaCore.ColorScope.backgroundColor, 0.4); - readonly property color disabledButtonColor: PlasmaCore.Theme.backgroundColor + readonly property color disabledButtonBorderColor: Kirigami.ColorUtils.tintWithAlpha(Kirigami.Theme.textColor, Kirigami.Theme.backgroundColor, 0.75) + readonly property color enabledButtonColor: Kirigami.ColorUtils.tintWithAlpha(PlasmaCore.ColorScope.highlightColor, Kirigami.Theme.backgroundColor, 0.6) + readonly property color enabledButtonPressedColor: Kirigami.ColorUtils.tintWithAlpha(PlasmaCore.ColorScope.highlightColor, Kirigami.Theme.backgroundColor, 0.4); + readonly property color disabledButtonColor: Kirigami.Theme.backgroundColor readonly property color disabledButtonPressedColor: Qt.darker(disabledButtonColor, 1.1) // scale animation on press diff --git a/components/mobileshell/qml/actiondrawer/quicksettings/QuickSettingsDrawer.qml b/components/mobileshell/qml/actiondrawer/quicksettings/QuickSettingsDrawer.qml index 79ecedd8..a600ed48 100644 --- a/components/mobileshell/qml/actiondrawer/quicksettings/QuickSettingsDrawer.qml +++ b/components/mobileshell/qml/actiondrawer/quicksettings/QuickSettingsDrawer.qml @@ -45,7 +45,7 @@ Components.BaseItem { /** * Height of just the QuickSettings component in minimized mode. */ - readonly property real minimizedQuickSettingsHeight: quickSettings.minimizedRowHeight + PlasmaCore.Units.gridUnit + readonly property real minimizedQuickSettingsHeight: quickSettings.minimizedRowHeight + Kirigami.Units.gridUnit /** * Progress of showing the full quick settings view from pinned. @@ -53,10 +53,10 @@ Components.BaseItem { property real minimizedToFullProgress: 1 // we need extra padding if the background side border is enabled - topPadding: PlasmaCore.Units.smallSpacing - leftPadding: PlasmaCore.Units.smallSpacing - rightPadding: PlasmaCore.Units.smallSpacing - bottomPadding: PlasmaCore.Units.smallSpacing * 4 + topPadding: Kirigami.Units.smallSpacing + leftPadding: Kirigami.Units.smallSpacing + rightPadding: Kirigami.Units.smallSpacing + bottomPadding: Kirigami.Units.smallSpacing * 4 background: KSvg.FrameSvgItem { enabledBorders: PlasmaCore.FrameSvg.BottomBorder @@ -78,9 +78,9 @@ Components.BaseItem { StatusBar.StatusBar { id: statusBar Layout.fillWidth: true - Layout.preferredHeight: Components.Constants.topPanelHeight + PlasmaCore.Units.gridUnit * 0.8 + Layout.preferredHeight: Components.Constants.topPanelHeight + Kirigami.Units.gridUnit * 0.8 - colorGroup: PlasmaCore.Theme.NormalColorGroup + colorGroup: Kirigami.Theme.Window backgroundColor: "transparent" showSecondRow: true showDropShadow: false @@ -92,7 +92,7 @@ Components.BaseItem { QuickSettings { id: quickSettings Layout.preferredHeight: root.minimizedQuickSettingsHeight + root.addedHeight - Layout.topMargin: PlasmaCore.Units.smallSpacing + Layout.topMargin: Kirigami.Units.smallSpacing Layout.fillWidth: true mode: QuickSettings.Pages @@ -107,16 +107,16 @@ Components.BaseItem { id: mediaWidget property real fullHeight: height + Layout.topMargin Layout.fillWidth: true - Layout.topMargin: PlasmaCore.Units.smallSpacing - Layout.leftMargin: Kirigami.Units.largeSpacing - Layout.rightMargin: Kirigami.Units.largeSpacing + Layout.topMargin: Kirigami.Units.smallSpacing + Layout.leftMargin: Kirigami.Units.gridUnit + Layout.rightMargin: Kirigami.Units.gridUnit } Handle { id: handle property real fullHeight: height + Layout.topMargin Layout.alignment: Qt.AlignHCenter - Layout.topMargin: PlasmaCore.Units.smallSpacing * 2 + Layout.topMargin: Kirigami.Units.smallSpacing * 2 onTapped: { if (root.minimizedToFullProgress < 0.5) { diff --git a/components/mobileshell/qml/actiondrawer/quicksettings/QuickSettingsFullDelegate.qml b/components/mobileshell/qml/actiondrawer/quicksettings/QuickSettingsFullDelegate.qml index 8cbb5f70..c6dcedab 100644 --- a/components/mobileshell/qml/actiondrawer/quicksettings/QuickSettingsFullDelegate.qml +++ b/components/mobileshell/qml/actiondrawer/quicksettings/QuickSettingsFullDelegate.qml @@ -19,7 +19,7 @@ import "../../components" as Components QuickSettingsDelegate { id: root - padding: PlasmaCore.Units.smallSpacing * 2 + padding: Kirigami.Units.smallSpacing * 2 iconItem: icon // scale animation on press @@ -34,14 +34,14 @@ QuickSettingsDelegate { anchors.right: parent.right height: parent.height - radius: PlasmaCore.Units.smallSpacing + radius: Kirigami.Units.smallSpacing color: Qt.rgba(0, 0, 0, 0.075) } // background color Rectangle { anchors.fill: parent - radius: PlasmaCore.Units.smallSpacing + radius: Kirigami.Units.smallSpacing border.width: 1 border.color: root.enabled ? root.enabledButtonBorderColor : root.disabledButtonBorderColor color: { @@ -74,14 +74,14 @@ QuickSettingsDelegate { id: icon anchors.top: parent.top anchors.left: parent.left - implicitWidth: PlasmaCore.Units.iconSizes.small + implicitWidth: Kirigami.Units.iconSizes.small implicitHeight: width source: root.icon } ColumnLayout { id: column - spacing: PlasmaCore.Units.smallSpacing + spacing: Kirigami.Units.smallSpacing anchors.right: parent.right anchors.left: parent.left anchors.bottom: parent.bottom @@ -90,7 +90,7 @@ QuickSettingsDelegate { Layout.fillWidth: true elide: Text.ElideRight text: root.text - font.pointSize: PlasmaCore.Theme.defaultFont.pointSize * 0.75 // TODO base height off of size of delegate + font.pointSize: Kirigami.Theme.defaultFont.pointSize * 0.75 // TODO base height off of size of delegate font.weight: Font.Bold } @@ -100,7 +100,7 @@ QuickSettingsDelegate { opacity: 0.6 Layout.fillWidth: true - font.pointSize: PlasmaCore.Theme.defaultFont.pointSize * 0.75 + font.pointSize: Kirigami.Theme.defaultFont.pointSize * 0.75 } } } diff --git a/components/mobileshell/qml/actiondrawer/quicksettings/QuickSettingsMinimizedDelegate.qml b/components/mobileshell/qml/actiondrawer/quicksettings/QuickSettingsMinimizedDelegate.qml index b1203aa0..29728b88 100644 --- a/components/mobileshell/qml/actiondrawer/quicksettings/QuickSettingsMinimizedDelegate.qml +++ b/components/mobileshell/qml/actiondrawer/quicksettings/QuickSettingsMinimizedDelegate.qml @@ -33,14 +33,14 @@ QuickSettingsDelegate { anchors.right: parent.right height: parent.height - radius: PlasmaCore.Units.smallSpacing + radius: Kirigami.Units.smallSpacing color: Qt.rgba(0, 0, 0, 0.075) } // background Rectangle { anchors.fill: parent - radius: PlasmaCore.Units.smallSpacing + radius: Kirigami.Units.smallSpacing border.color: root.enabled ? root.enabledButtonBorderColor : root.disabledButtonBorderColor color: { if (root.enabled) { @@ -71,7 +71,7 @@ QuickSettingsDelegate { PlasmaCore.IconItem { id: icon anchors.centerIn: parent - implicitWidth: PlasmaCore.Units.iconSizes.smallMedium + implicitWidth: Kirigami.Units.iconSizes.smallMedium implicitHeight: width source: root.icon } diff --git a/components/mobileshell/qml/actiondrawer/quicksettings/QuickSettingsPanel.qml b/components/mobileshell/qml/actiondrawer/quicksettings/QuickSettingsPanel.qml index 55cb2234..a6c023e1 100644 --- a/components/mobileshell/qml/actiondrawer/quicksettings/QuickSettingsPanel.qml +++ b/components/mobileshell/qml/actiondrawer/quicksettings/QuickSettingsPanel.qml @@ -34,10 +34,10 @@ Components.BaseItem { readonly property real contentImplicitHeight: column.implicitHeight // we need extra padding since the background side border is enabled - topPadding: PlasmaCore.Units.smallSpacing * 4 - leftPadding: PlasmaCore.Units.smallSpacing * 4 - rightPadding: PlasmaCore.Units.smallSpacing * 4 - bottomPadding: PlasmaCore.Units.smallSpacing * 4 + topPadding: Kirigami.Units.smallSpacing * 4 + leftPadding: Kirigami.Units.smallSpacing * 4 + rightPadding: Kirigami.Units.smallSpacing * 4 + bottomPadding: Kirigami.Units.smallSpacing * 4 background: KSvg.FrameSvgItem { enabledBorders: PlasmaCore.FrameSvg.AllBorders @@ -63,7 +63,7 @@ Components.BaseItem { Layout.preferredHeight: Kirigami.Units.gridUnit * 1.5 Layout.maximumHeight: Kirigami.Units.gridUnit * 1.5 - colorGroup: PlasmaCore.Theme.NormalColorGroup + colorGroup: Kirigami.Theme.Window backgroundColor: "transparent" showSecondRow: false showDropShadow: false @@ -82,7 +82,7 @@ Components.BaseItem { Layout.alignment: Qt.AlignTop Layout.fillWidth: true - Layout.maximumHeight: root.fullScreenHeight - root.topPadding - root.bottomPadding - statusBar.height - PlasmaCore.Units.smallSpacing + Layout.maximumHeight: root.fullScreenHeight - root.topPadding - root.bottomPadding - statusBar.height - Kirigami.Units.smallSpacing Layout.maximumWidth: column.width actionDrawer: root.actionDrawer diff --git a/components/mobileshell/qml/components/Constants.qml b/components/mobileshell/qml/components/Constants.qml index feb9ed39..a36d4920 100644 --- a/components/mobileshell/qml/components/Constants.qml +++ b/components/mobileshell/qml/components/Constants.qml @@ -3,7 +3,7 @@ import QtQuick -import org.kde.plasma.core as PlasmaCore +import org.kde.kirigami 2.20 as Kirigami import org.kde.plasma.private.mobileshell.shellsettingsplugin as ShellSettings // NOTE: This is a singleton in the mobileshell library, so we need to be careful to @@ -12,6 +12,6 @@ import org.kde.plasma.private.mobileshell.shellsettingsplugin as ShellSettings pragma Singleton QtObject { - readonly property real topPanelHeight: PlasmaCore.Units.gridUnit + PlasmaCore.Units.smallSpacing - readonly property real bottomPanelHeight: ShellSettings.Settings.navigationPanelEnabled ? PlasmaCore.Units.gridUnit * 2 : 0 + readonly property real topPanelHeight: Kirigami.Units.gridUnit + Kirigami.Units.smallSpacing + readonly property real bottomPanelHeight: ShellSettings.Settings.navigationPanelEnabled ? Kirigami.Units.gridUnit * 2 : 0 } diff --git a/components/mobileshell/qml/components/MarqueeLabel.qml b/components/mobileshell/qml/components/MarqueeLabel.qml index e3c28b4d..9ca064e5 100644 --- a/components/mobileshell/qml/components/MarqueeLabel.qml +++ b/components/mobileshell/qml/components/MarqueeLabel.qml @@ -3,7 +3,7 @@ import QtQuick 2.15 -import org.kde.plasma.core 2.0 as PlasmaCore +import org.kde.kirigami 2.20 as Kirigami import org.kde.plasma.components 3.0 as PlasmaComponents /** @@ -16,7 +16,7 @@ PlasmaComponents.Label { required property string inputText readonly property string filteredText: inputText.replace(/\n/g, ' ') // remove new line characters - property int interval: PlasmaCore.Units.longDuration + property int interval: Kirigami.Units.longDuration readonly property int charactersOverflow: Math.ceil((txtMeter.advanceWidth - root.width) / (txtMeter.advanceWidth / filteredText.length)) property int step: 0 @@ -36,7 +36,7 @@ PlasmaComponents.Label { onTriggered: { if (paused) { if (step != 0) { - interval = PlasmaCore.Units.veryLongDuration; + interval = Kirigami.Units.veryLongDuration; step = 0; } else { interval = root.interval; @@ -45,7 +45,7 @@ PlasmaComponents.Label { } else { step = (step + 1) % filteredText.length; if (step === charactersOverflow) { - interval = PlasmaCore.Units.veryLongDuration * 3; + interval = Kirigami.Units.veryLongDuration * 3; paused = true; } } diff --git a/components/mobileshell/qml/components/StartupFeedback.qml b/components/mobileshell/qml/components/StartupFeedback.qml index 4eb0719e..2b709712 100644 --- a/components/mobileshell/qml/components/StartupFeedback.qml +++ b/components/mobileshell/qml/components/StartupFeedback.qml @@ -93,7 +93,7 @@ MouseArea { // use mousearea to ensure clicks don't go behind ParallelAnimation { id: parallelAnim - property real animationDuration: PlasmaCore.Units.longDuration + PlasmaCore.Units.shortDuration + property real animationDuration: Kirigami.Units.longDuration + Kirigami.Units.shortDuration ScaleAnimator { target: background @@ -153,7 +153,7 @@ MouseArea { // use mousearea to ensure clicks don't go behind properties: "opacity" from: 0 to: 1 - duration: PlasmaCore.Units.longDuration + duration: Kirigami.Units.longDuration easing.type: Easing.OutCubic } @@ -180,13 +180,13 @@ MouseArea { // use mousearea to ensure clicks don't go behind Item { id: iconParent anchors.centerIn: background - width: PlasmaCore.Units.iconSizes.enormous + width: Kirigami.Units.iconSizes.enormous height: width PlasmaCore.IconItem { id: icon anchors.fill: parent - colorGroup: PlasmaCore.Theme.ComplementaryColorGroup + colorGroup: Kirigami.Theme.ComplementaryColorGroup } MultiEffect { diff --git a/components/mobileshell/qml/dataproviders/BatteryInfo.qml b/components/mobileshell/qml/dataproviders/BatteryInfo.qml index bf564072..0bdbedf4 100644 --- a/components/mobileshell/qml/dataproviders/BatteryInfo.qml +++ b/components/mobileshell/qml/dataproviders/BatteryInfo.qml @@ -8,7 +8,6 @@ import QtQuick import QtQuick.Layouts -import org.kde.plasma.core as PlasmaCore import org.kde.plasma.plasma5support as P5Support import org.kde.plasma.workspace.components as PW diff --git a/components/mobileshell/qml/dataproviders/BluetoothInfo.qml b/components/mobileshell/qml/dataproviders/BluetoothInfo.qml index 9ad8f81a..422230d1 100644 --- a/components/mobileshell/qml/dataproviders/BluetoothInfo.qml +++ b/components/mobileshell/qml/dataproviders/BluetoothInfo.qml @@ -8,7 +8,6 @@ import QtQuick 2.2 import QtQuick.Layouts 1.4 -import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.bluezqt 1.0 as BluezQt QtObject { diff --git a/components/mobileshell/qml/homescreen/HomeScreen.qml b/components/mobileshell/qml/homescreen/HomeScreen.qml index ef9ec380..e9d8a3db 100644 --- a/components/mobileshell/qml/homescreen/HomeScreen.qml +++ b/components/mobileshell/qml/homescreen/HomeScreen.qml @@ -4,7 +4,6 @@ import QtQuick import QtQuick.Window -import org.kde.plasma.core as PlasmaCore import org.kde.plasma.plasmoid import org.kde.taskmanager as TaskManager diff --git a/components/mobileshell/qml/navigationpanel/NavigationPanel.qml b/components/mobileshell/qml/navigationpanel/NavigationPanel.qml index 6464e765..a7710901 100644 --- a/components/mobileshell/qml/navigationpanel/NavigationPanel.qml +++ b/components/mobileshell/qml/navigationpanel/NavigationPanel.qml @@ -10,8 +10,8 @@ import QtQuick.Layouts import QtQuick.Window import QtQuick.Effects +import org.kde.kirigami 2.20 as Kirigami import org.kde.taskmanager 0.1 as TaskManager -import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.kquickcontrolsaddons 2.0 import org.kde.plasma.private.mobileshell.state 1.0 as MobileShellState @@ -120,7 +120,7 @@ Item { when: root.width < root.height PropertyChanges { target: icons - buttonLength: Math.min(PlasmaCore.Units.gridUnit * 10, icons.height * 0.7 / 3) + buttonLength: Math.min(Kirigami.Units.gridUnit * 10, icons.height * 0.7 / 3) } AnchorChanges { target: leftButton @@ -160,7 +160,7 @@ Item { } PropertyChanges { target: rightCornerButton - height: PlasmaCore.Units.gridUnit * 2 + height: Kirigami.Units.gridUnit * 2 width: icons.width } }, State { @@ -168,7 +168,7 @@ Item { when: root.width >= root.height PropertyChanges { target: icons - buttonLength: Math.min(PlasmaCore.Units.gridUnit * 8, icons.width * 0.7 / 3) + buttonLength: Math.min(Kirigami.Units.gridUnit * 8, icons.width * 0.7 / 3) } AnchorChanges { target: leftButton @@ -209,7 +209,7 @@ Item { PropertyChanges { target: rightCornerButton height: parent.height - width: PlasmaCore.Units.gridUnit * 2 + width: Kirigami.Units.gridUnit * 2 } } ] diff --git a/components/mobileshell/qml/navigationpanel/NavigationPanelButton.qml b/components/mobileshell/qml/navigationpanel/NavigationPanelButton.qml index bb7c76c7..9bf682a3 100644 --- a/components/mobileshell/qml/navigationpanel/NavigationPanelButton.qml +++ b/components/mobileshell/qml/navigationpanel/NavigationPanelButton.qml @@ -10,6 +10,7 @@ import QtQuick.Layouts import QtQuick.Controls as Controls import org.kde.plasma.core 2.0 as PlasmaCore +import org.kde.kirigami 2.20 as Kirigami import org.kde.kquickcontrolsaddons 2.0 Controls.AbstractButton { @@ -26,7 +27,7 @@ Controls.AbstractButton { radius: height/2 anchors.fill: parent opacity: 0 - color: PlasmaCore.ColorScope.textColor + color: Kirigami.Theme.textColor // this way of calculating animations lets the animation fully complete before switching back (tap runs the full animation) property bool buttonHeld: button.pressed && button.enabled @@ -49,7 +50,7 @@ Controls.AbstractButton { } NumberAnimation on opacity { id: opacityAnimator - duration: PlasmaCore.Units.shortDuration + duration: Kirigami.Units.shortDuration easing.type: Easing.InOutQuad onFinished: { // animate the state back @@ -69,6 +70,6 @@ Controls.AbstractButton { fill: parent margins: Math.round((side - side * iconSizeFactor * 0.6) / 2) } - colorGroup: PlasmaCore.ColorScope.colorGroup + colorSet: Kirigami.Theme.colorSet } } diff --git a/components/mobileshell/qml/statusbar/ClockText.qml b/components/mobileshell/qml/statusbar/ClockText.qml index b0d023e1..463b6b95 100644 --- a/components/mobileshell/qml/statusbar/ClockText.qml +++ b/components/mobileshell/qml/statusbar/ClockText.qml @@ -8,7 +8,6 @@ import QtQuick 2.12 import QtQuick.Layouts 1.15 -import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.plasma5support 2.0 as P5Support import org.kde.plasma.components 3.0 as PlasmaComponents import org.kde.plasma.private.mobileshell 1.0 as MobileShell @@ -23,6 +22,6 @@ PlasmaComponents.Label { property bool is24HourTime: MobileShell.ShellUtil.isSystem24HourFormat text: Qt.formatTime(source.data.Local.DateTime, is24HourTime ? "h:mm" : "h:mm ap") - color: PlasmaCore.ColorScope.textColor + color: Kirigami.Theme.textColor verticalAlignment: Qt.AlignVCenter } diff --git a/components/mobileshell/qml/statusbar/StatusBar.qml b/components/mobileshell/qml/statusbar/StatusBar.qml index 60f84840..2c036d0b 100644 --- a/components/mobileshell/qml/statusbar/StatusBar.qml +++ b/components/mobileshell/qml/statusbar/StatusBar.qml @@ -12,6 +12,8 @@ import QtQuick.Effects import QtQuick.Controls as Controls import QtQml.Models +import org.kde.kirigami 2.20 as Kirigami + import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.plasma5support 2.0 as P5Support import org.kde.plasma.components 3.0 as PlasmaComponents @@ -57,7 +59,7 @@ Item { readonly property real textPixelSize: 11 readonly property real smallerTextPixelSize: 9 - readonly property real elementSpacing: PlasmaCore.Units.smallSpacing * 1.5 + readonly property real elementSpacing: Kirigami.Units.smallSpacing * 1.5 P5Support.DataSource { id: timeSource @@ -97,18 +99,19 @@ Item { } // screen top panel - PlasmaCore.ColorScope { + Item { id: icons z: 1 - colorGroup: root.colorGroup + Kirigami.Theme.colorSet: root.Kirigami.Theme.colorSet + Kirigami.Theme.inherit: false anchors.fill: parent Controls.Control { id: control - topPadding: PlasmaCore.Units.smallSpacing - bottomPadding: PlasmaCore.Units.smallSpacing - rightPadding: PlasmaCore.Units.smallSpacing * 3 - leftPadding: PlasmaCore.Units.smallSpacing * 3 + topPadding: Kirigami.Units.smallSpacing + bottomPadding: Kirigami.Units.smallSpacing + rightPadding: Kirigami.Units.smallSpacing * 3 + leftPadding: Kirigami.Units.smallSpacing * 3 anchors.fill: parent background: Rectangle { @@ -116,7 +119,7 @@ Item { } contentItem: ColumnLayout { - spacing: PlasmaCore.Units.smallSpacing / 2 + spacing: Kirigami.Units.smallSpacing / 2 RowLayout { id: row @@ -163,7 +166,7 @@ Item { // system indicators RowLayout { id: indicators - Layout.leftMargin: PlasmaCore.Units.smallSpacing // applets have different spacing needs + Layout.leftMargin: Kirigami.Units.smallSpacing // applets have different spacing needs Layout.fillHeight: true spacing: root.elementSpacing diff --git a/components/mobileshell/qml/statusbar/TaskWidget.qml b/components/mobileshell/qml/statusbar/TaskWidget.qml index 15c28cd3..c38836c2 100644 --- a/components/mobileshell/qml/statusbar/TaskWidget.qml +++ b/components/mobileshell/qml/statusbar/TaskWidget.qml @@ -6,6 +6,7 @@ import QtQuick 2.1 import org.kde.plasma.core 2.0 as PlasmaCore +import org.kde.kirigami 2.20 as Kirigami Item { id: taskIcon @@ -28,7 +29,7 @@ Item { width: Math.min(parent.width, parent.height) height: width anchors.centerIn: parent - colorGroup: PlasmaCore.ColorScope.colorGroup + colorSet: Kirigami.Theme.colorSet } MouseArea { diff --git a/components/mobileshell/qml/statusbar/indicators/BatteryIndicator.qml b/components/mobileshell/qml/statusbar/indicators/BatteryIndicator.qml index 941ac572..fa72a8f4 100644 --- a/components/mobileshell/qml/statusbar/indicators/BatteryIndicator.qml +++ b/components/mobileshell/qml/statusbar/indicators/BatteryIndicator.qml @@ -8,7 +8,8 @@ import QtQuick 2.6 import QtQuick.Layouts 1.4 -import org.kde.plasma.core 2.0 as PlasmaCore +import org.kde.kirigami 2.20 as Kirigami + import org.kde.plasma.components 3.0 as PlasmaComponents import org.kde.plasma.workspace.components 2.0 as PW @@ -16,7 +17,7 @@ import "../../dataproviders" as DataProviders RowLayout { readonly property var provider: DataProviders.BatteryInfo {} - property real textPixelSize: PlasmaCore.Units.gridUnit * 0.6 + property real textPixelSize: Kirigami.Units.gridUnit * 0.6 visible: provider.isVisible @@ -37,7 +38,7 @@ RowLayout { text: i18n("%1%", provider.percent) Layout.alignment: Qt.AlignVCenter - color: PlasmaCore.ColorScope.textColor + color: Kirigami.Theme.textColor font.pixelSize: textPixelSize } } diff --git a/components/mobileshell/qml/statusbar/indicators/BluetoothIndicator.qml b/components/mobileshell/qml/statusbar/indicators/BluetoothIndicator.qml index 90b34867..8fe8119d 100644 --- a/components/mobileshell/qml/statusbar/indicators/BluetoothIndicator.qml +++ b/components/mobileshell/qml/statusbar/indicators/BluetoothIndicator.qml @@ -10,6 +10,7 @@ import QtQuick import QtQuick.Layouts import org.kde.plasma.core as PlasmaCore +import org.kde.kirigami 2.20 as Kirigami import org.kde.bluezqt as BluezQt import "../../dataproviders" as DataProviders @@ -20,7 +21,7 @@ PlasmaCore.IconItem { readonly property var provider: DataProviders.BluetoothInfo {} source: "network-bluetooth" // provider.icon - colorGroup: PlasmaCore.ColorScope.colorGroup + colorSet: Kirigami.Theme.colorSet visible: provider.isVisible } diff --git a/components/mobileshell/qml/statusbar/indicators/InternetIndicator.qml b/components/mobileshell/qml/statusbar/indicators/InternetIndicator.qml index 5ec3861f..af635401 100644 --- a/components/mobileshell/qml/statusbar/indicators/InternetIndicator.qml +++ b/components/mobileshell/qml/statusbar/indicators/InternetIndicator.qml @@ -11,6 +11,7 @@ import QtQuick.Layouts import org.kde.plasma.core as PlasmaCore import org.kde.plasma.components 3.0 as PlasmaComponents import org.kde.plasma.networkmanagement 0.2 as PlasmaNM +import org.kde.kirigami 2.20 as Kirigami PlasmaCore.IconItem { id: connectionIcon @@ -39,7 +40,7 @@ PlasmaCore.IconItem { // implementation source: icon - colorGroup: PlasmaCore.ColorScope.colorGroup + colorSet: Kirigami.Theme.colorSet PlasmaComponents.BusyIndicator { id: connectingIndicator diff --git a/components/mobileshell/qml/statusbar/indicators/SignalStrengthIndicator.qml b/components/mobileshell/qml/statusbar/indicators/SignalStrengthIndicator.qml index 58aaac95..af6ad5c6 100644 --- a/components/mobileshell/qml/statusbar/indicators/SignalStrengthIndicator.qml +++ b/components/mobileshell/qml/statusbar/indicators/SignalStrengthIndicator.qml @@ -10,6 +10,7 @@ import QtQuick.Layouts import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.components 3.0 as PlasmaComponents +import org.kde.kirigami 2.20 as Kirigami import "../../dataproviders" as DataProviders @@ -22,14 +23,14 @@ Item { readonly property bool isInternetIndicatorMobileData: internetIndicator && internetIndicator.icon && internetIndicator.icon.startsWith('network-mobile-') property bool showLabel: true - property real textPixelSize: PlasmaCore.Units.gridUnit * 0.6 + property real textPixelSize: Kirigami.Units.gridUnit * 0.6 width: strengthIcon.width + label.width Layout.minimumWidth: strengthIcon.width + label.width PlasmaCore.IconItem { id: strengthIcon - colorGroup: PlasmaCore.ColorScope.colorGroup + colorSet: Kirigami.Theme.colorSet anchors.left: parent.left anchors.verticalCenter: parent.verticalCenter width: height @@ -45,12 +46,12 @@ Item { id: label visible: showLabel width: visible ? implicitWidth : 0 - anchors.leftMargin: PlasmaCore.Units.smallSpacing + anchors.leftMargin: Kirigami.Units.smallSpacing anchors.left: strengthIcon.right anchors.verticalCenter: parent.verticalCenter text: provider.label - color: PlasmaCore.ColorScope.textColor + color: Kirigami.Theme.textColor font.pixelSize: textPixelSize } } diff --git a/components/mobileshell/qml/statusbar/indicators/VolumeIndicator.qml b/components/mobileshell/qml/statusbar/indicators/VolumeIndicator.qml index 92838829..0e9890d1 100644 --- a/components/mobileshell/qml/statusbar/indicators/VolumeIndicator.qml +++ b/components/mobileshell/qml/statusbar/indicators/VolumeIndicator.qml @@ -11,6 +11,7 @@ import QtQuick.Layouts import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.private.volume 0.1 +import org.kde.kirigami 2.20 as Kirigami import "../../dataproviders" as DataProviders @@ -20,7 +21,7 @@ PlasmaCore.IconItem { source: provider.icon - colorGroup: PlasmaCore.ColorScope.colorGroup + colorSet: Kirigami.Theme.colorSet visible: provider.isVisible } diff --git a/components/mobileshell/qml/volumeosd/AudioApplet.qml b/components/mobileshell/qml/volumeosd/AudioApplet.qml index ce234892..c2ab455e 100644 --- a/components/mobileshell/qml/volumeosd/AudioApplet.qml +++ b/components/mobileshell/qml/volumeosd/AudioApplet.qml @@ -10,9 +10,8 @@ import QtQuick.Layouts import QtQuick.Window import QtQuick.Controls as Controls -import org.kde.plasma.core as PlasmaCore +import org.kde.kirigami 2.20 as Kirigami import org.kde.plasma.components 3.0 as PlasmaComponents -import org.kde.plasma.extras as PlasmaExtra import org.kde.kquickcontrolsaddons as KQCAddons import org.kde.plasma.private.volume @@ -53,17 +52,17 @@ ColumnLayout { PopupCard { Layout.alignment: Qt.AlignHCenter - Layout.bottomMargin: PlasmaCore.Units.largeSpacing + Layout.bottomMargin: Kirigami.Units.gridUnit contentItem: ColumnLayout { - anchors.rightMargin: PlasmaCore.Units.smallSpacing - anchors.leftMargin: PlasmaCore.Units.smallSpacing + anchors.rightMargin: Kirigami.Units.smallSpacing + anchors.leftMargin: Kirigami.Units.smallSpacing - PlasmaExtra.Heading { + Kirigami.Heading { level: 2 text: i18n("Outputs") Layout.fillWidth: true - Layout.topMargin: PlasmaCore.Units.smallSpacing - Layout.leftMargin: PlasmaCore.Units.smallSpacing + Layout.topMargin: Kirigami.Units.smallSpacing + Layout.leftMargin: Kirigami.Units.smallSpacing } Repeater { @@ -73,7 +72,7 @@ ColumnLayout { model: paSinkFilterModel delegate: DeviceListItem { Layout.fillWidth: true - Layout.margins: PlasmaCore.Units.smallSpacing + Layout.margins: Kirigami.Units.smallSpacing type: "sink" onlyone: sinkView.count === 1 } @@ -83,17 +82,17 @@ ColumnLayout { PopupCard { Layout.alignment: Qt.AlignHCenter - Layout.bottomMargin: PlasmaCore.Units.largeSpacing + Layout.bottomMargin: Kirigami.Units.gridUnit contentItem: ColumnLayout { - anchors.rightMargin: PlasmaCore.Units.smallSpacing - anchors.leftMargin: PlasmaCore.Units.smallSpacing + anchors.rightMargin: Kirigami.Units.smallSpacing + anchors.leftMargin: Kirigami.Units.smallSpacing - PlasmaExtra.Heading { + Kirigami.Heading { level: 2 text: i18n("Inputs") Layout.fillWidth: true - Layout.topMargin: PlasmaCore.Units.smallSpacing - Layout.leftMargin: PlasmaCore.Units.smallSpacing + Layout.topMargin: Kirigami.Units.smallSpacing + Layout.leftMargin: Kirigami.Units.smallSpacing } Repeater { @@ -103,7 +102,7 @@ ColumnLayout { model: paSourceFilterModel delegate: DeviceListItem { Layout.fillWidth: true - Layout.margins: PlasmaCore.Units.smallSpacing + Layout.margins: Kirigami.Units.smallSpacing type: "source" onlyone: sinkView.count === 1 } @@ -114,17 +113,17 @@ ColumnLayout { PopupCard { visible: sourceInputView.model.count + sourceMediaInputView.model.count !== 0 Layout.alignment: Qt.AlignHCenter - Layout.bottomMargin: PlasmaCore.Units.largeSpacing + Layout.bottomMargin: Kirigami.Units.gridUnit contentItem: ColumnLayout { - anchors.rightMargin: PlasmaCore.Units.smallSpacing - anchors.leftMargin: PlasmaCore.Units.smallSpacing + anchors.rightMargin: Kirigami.Units.smallSpacing + anchors.leftMargin: Kirigami.Units.smallSpacing - PlasmaExtra.Heading { + Kirigami.Heading { level: 2 text: i18n("Playback Streams") Layout.fillWidth: true - Layout.topMargin: PlasmaCore.Units.smallSpacing - Layout.leftMargin: PlasmaCore.Units.smallSpacing + Layout.topMargin: Kirigami.Units.smallSpacing + Layout.leftMargin: Kirigami.Units.smallSpacing } Repeater { @@ -137,7 +136,7 @@ ColumnLayout { } delegate: StreamListItem { Layout.fillWidth: true - Layout.margins: PlasmaCore.Units.smallSpacing + Layout.margins: Kirigami.Units.smallSpacing width: sourceOutputView.width type: "sink-input" devicesModel: sourceView.model @@ -155,7 +154,7 @@ ColumnLayout { delegate: StreamListItem { Layout.fillWidth: true - Layout.margins: PlasmaCore.Units.smallSpacing + Layout.margins: Kirigami.Units.smallSpacing width: sourceOutputView.width type: "sink-input" devicesModel: sourceView.model @@ -167,17 +166,17 @@ ColumnLayout { PopupCard { visible: sourceOutputView.model.count !== 0 Layout.alignment: Qt.AlignHCenter - Layout.bottomMargin: PlasmaCore.Units.largeSpacing + Layout.bottomMargin: Kirigami.Units.gridUnit contentItem: ColumnLayout { - anchors.rightMargin: PlasmaCore.Units.smallSpacing - anchors.leftMargin: PlasmaCore.Units.smallSpacing + anchors.rightMargin: Kirigami.Units.smallSpacing + anchors.leftMargin: Kirigami.Units.smallSpacing - PlasmaExtra.Heading { + Kirigami.Heading { level: 2 text: i18n("Recording Streams") Layout.fillWidth: true - Layout.topMargin: PlasmaCore.Units.smallSpacing - Layout.leftMargin: PlasmaCore.Units.smallSpacing + Layout.topMargin: Kirigami.Units.smallSpacing + Layout.leftMargin: Kirigami.Units.smallSpacing } Repeater { @@ -190,7 +189,7 @@ ColumnLayout { } delegate: StreamListItem { Layout.fillWidth: true - Layout.margins: PlasmaCore.Units.smallSpacing + Layout.margins: Kirigami.Units.smallSpacing width: sourceOutputView.width type: "source-output" devicesModel: sourceView.model diff --git a/components/mobileshell/qml/volumeosd/ListItemBase.qml b/components/mobileshell/qml/volumeosd/ListItemBase.qml index eed068b6..ae4d64f2 100644 --- a/components/mobileshell/qml/volumeosd/ListItemBase.qml +++ b/components/mobileshell/qml/volumeosd/ListItemBase.qml @@ -11,11 +11,11 @@ import QtQuick.Controls 2.15 as Controls import QtQuick.Layouts 1.1 import QtQuick.Window 2.2 +import org.kde.kirigami 2.20 as Kirigami import org.kde.ksvg 1.0 as KSvg import org.kde.kquickcontrolsaddons 2.0 import org.kde.plasma.core 2.1 as PlasmaCore import org.kde.plasma.components 3.0 as PlasmaComponents -import org.kde.plasma.extras 2.0 as PlasmaExtra import org.kde.plasma.private.volume 0.1 import "icon.js" as Icon @@ -37,12 +37,12 @@ Controls.ItemDelegate { contentItem: RowLayout { id: row - spacing: PlasmaCore.Units.smallSpacing + spacing: Kirigami.Units.smallSpacing PlasmaComponents.RadioButton { id: selectButton Layout.alignment: Qt.AlignTop - Layout.topMargin: Math.round(row.height / 2 - implicitHeight - PlasmaCore.Units.smallSpacing / 2) // align with text + Layout.topMargin: Math.round(row.height / 2 - implicitHeight - Kirigami.Units.smallSpacing / 2) // align with text checked: model.PulseObject.hasOwnProperty("default") ? model.PulseObject.default : false visible: (baseItem.type == "sink" && sinkView.model.count > 1) || (baseItem.type == "source" && sourceView.model.count > 1) onClicked: model.PulseObject.default = true @@ -52,9 +52,9 @@ Controls.ItemDelegate { PlasmaCore.IconItem { id: clientIcon Layout.alignment: Qt.AlignVCenter - Layout.rightMargin: PlasmaCore.Units.smallSpacing - Layout.preferredWidth: PlasmaCore.Units.iconSizes.smallMedium - Layout.preferredHeight: PlasmaCore.Units.iconSizes.smallMedium + Layout.rightMargin: Kirigami.Units.smallSpacing + Layout.preferredWidth: Kirigami.Units.iconSizes.smallMedium + Layout.preferredHeight: Kirigami.Units.iconSizes.smallMedium visible: type === "sink-input" || type === "source-output" source: "unknown" onSourceChanged: { @@ -67,11 +67,11 @@ Controls.ItemDelegate { ColumnLayout { Layout.alignment: Qt.AlignVCenter Layout.fillWidth: true - spacing: PlasmaCore.Units.smallSpacing + spacing: Kirigami.Units.smallSpacing RowLayout { Layout.fillWidth: true - spacing: PlasmaCore.Units.smallSpacing + spacing: Kirigami.Units.smallSpacing Layout.alignment: Qt.AlignBottom PlasmaComponents.Label { @@ -84,7 +84,7 @@ Controls.ItemDelegate { PlasmaComponents.ToolButton { Layout.alignment: Qt.AlignBottom - Layout.bottomMargin: -PlasmaCore.Units.smallSpacing + Layout.bottomMargin: -Kirigami.Units.smallSpacing icon.name: "application-menu" checkable: true checked: contextMenu.visible && contextMenu.visualParent === this @@ -127,7 +127,7 @@ Controls.ItemDelegate { RowLayout { Layout.fillWidth: true - spacing: PlasmaCore.Units.smallSpacing + spacing: Kirigami.Units.smallSpacing // this slider was effectively copied from the source (linked at the top of the file) PlasmaComponents.Slider { @@ -175,7 +175,7 @@ Controls.ItemDelegate { Behavior on width { NumberAnimation { id: animation - duration: PlasmaCore.Units.shortDuration + duration: Kirigami.Units.shortDuration easing.type: Easing.OutQuad } } @@ -231,11 +231,11 @@ Controls.ItemDelegate { text: i18nc("volume percentage", "%1%", displayValue) color: { if (displayValue <= 100) { - return PlasmaCore.Theme.textColor + return Kirigami.Theme.textColor } else if (displayValue > 100 && displayValue <= 125) { - return PlasmaCore.Theme.neutralTextColor + return Kirigami.Theme.neutralTextColor } else { - return PlasmaCore.Theme.negativeTextColor + return Kirigami.Theme.negativeTextColor } } } diff --git a/components/mobileshell/qml/volumeosd/PopupCard.qml b/components/mobileshell/qml/volumeosd/PopupCard.qml index 780821c6..f29f079f 100644 --- a/components/mobileshell/qml/volumeosd/PopupCard.qml +++ b/components/mobileshell/qml/volumeosd/PopupCard.qml @@ -9,18 +9,18 @@ import QtQuick.Controls as Controls import QtQuick.Layouts import QtQuick.Window +import org.kde.kirigami 2.20 as Kirigami import org.kde.ksvg 1.0 as KSvg -import org.kde.plasma.core 2.1 as PlasmaCore import org.kde.plasma.components 3.0 as PlasmaComponents // capture presses on the audio applet so it doesn't close the overlay Controls.Control { id: content - implicitWidth: Math.min(PlasmaCore.Units.gridUnit * 20, parent.width - PlasmaCore.Units.largeSpacing * 2) - padding: PlasmaCore.Units.smallSpacing * 2 + implicitWidth: Math.min(Kirigami.Units.gridUnit * 20, parent.width - Kirigami.Units.gridUnit * 2) + padding: Kirigami.Units.smallSpacing * 2 background: KSvg.FrameSvgItem { imagePath: "widgets/background" - anchors.margins: -PlasmaCore.Units.smallSpacing * 2 + anchors.margins: -Kirigami.Units.smallSpacing * 2 anchors.fill: parent } } diff --git a/components/mobileshell/qml/volumeosd/VolumeOSD.qml b/components/mobileshell/qml/volumeosd/VolumeOSD.qml index b0589b65..1b008c60 100644 --- a/components/mobileshell/qml/volumeosd/VolumeOSD.qml +++ b/components/mobileshell/qml/volumeosd/VolumeOSD.qml @@ -11,10 +11,8 @@ import QtQuick.Controls as Controls import QtQuick.Layouts import QtQuick.Window -import org.kde.plasma.core 2.0 as PlasmaCore -import org.kde.plasma.extras 2.0 as PlasmaExtra +import org.kde.kirigami 2.20 as Kirigami import org.kde.plasma.components 3.0 as PlasmaComponents -import org.kde.plasma.extras 2.0 as PlasmaExtra import org.kde.plasma.private.nanoshell 2.0 as NanoShell import org.kde.plasma.private.mobileshell 1.0 as MobileShell import org.kde.plasma.private.mobileshell.state 1.0 as MobileShellState @@ -99,24 +97,24 @@ NanoShell.FullScreenOverlay { // osd card PopupCard { id: osd - Layout.topMargin: PlasmaCore.Units.largeSpacing + Layout.topMargin: Kirigami.Units.gridUnit Layout.alignment: Qt.AlignHCenter contentItem: RowLayout { id: containerLayout - spacing: PlasmaCore.Units.smallSpacing + spacing: Kirigami.Units.smallSpacing - anchors.leftMargin: PlasmaCore.Units.smallSpacing * 2 - anchors.rightMargin: PlasmaCore.Units.smallSpacing + anchors.leftMargin: Kirigami.Units.smallSpacing * 2 + anchors.rightMargin: Kirigami.Units.smallSpacing PlasmaComponents.ToolButton { icon.name: !audioInfo.paSinkModel.preferredSink || audioInfo.paSinkModel.preferredSink.muted ? "audio-volume-muted" : "audio-volume-high" text: !audioInfo.paSinkModel.preferredSink || audioInfo.paSinkModel.preferredSink.muted ? i18n("Unmute") : i18n("Mute") display: Controls.AbstractButton.IconOnly Layout.alignment: Qt.AlignVCenter - Layout.preferredWidth: PlasmaCore.Units.iconSizes.medium - Layout.preferredHeight: PlasmaCore.Units.iconSizes.medium - Layout.rightMargin: PlasmaCore.Units.smallSpacing + Layout.preferredWidth: Kirigami.Units.iconSizes.medium + Layout.preferredHeight: Kirigami.Units.iconSizes.medium + Layout.rightMargin: Kirigami.Units.smallSpacing onClicked: muteVolume() } @@ -124,11 +122,11 @@ NanoShell.FullScreenOverlay { id: volumeSlider Layout.fillWidth: true Layout.alignment: Qt.AlignVCenter - Layout.rightMargin: PlasmaCore.Units.smallSpacing * 2 + Layout.rightMargin: Kirigami.Units.smallSpacing * 2 value: window.volume from: 0 to: 100 - Behavior on value { NumberAnimation { duration: PlasmaCore.Units.shortDuration } } + Behavior on value { NumberAnimation { duration: Kirigami.Units.shortDuration } } } // Get the width of a three-digit number so we can size the label @@ -139,11 +137,11 @@ NanoShell.FullScreenOverlay { font: percentageLabel.font } - PlasmaExtra.Heading { + Kirigami.Heading { id: percentageLabel Layout.preferredWidth: widestLabelSize.width Layout.alignment: Qt.AlignVCenter - Layout.rightMargin: PlasmaCore.Units.smallSpacing + Layout.rightMargin: Kirigami.Units.smallSpacing level: 3 text: i18nc("Percentage value", "%1%", window.volume) @@ -154,11 +152,11 @@ NanoShell.FullScreenOverlay { // and plasma-pa:VolumeSlider.qml color: { if (volumeSlider.value <= 100) { - return PlasmaCore.Theme.textColor + return Kirigami.Theme.textColor } else if (volumeSlider.value > 100 && volumeSlider.value <= 125) { - return PlasmaCore.Theme.neutralTextColor + return Kirigami.Theme.neutralTextColor } else { - return PlasmaCore.Theme.negativeTextColor + return Kirigami.Theme.negativeTextColor } } } @@ -170,15 +168,15 @@ NanoShell.FullScreenOverlay { opacity: showFullApplet ? 1 : 0 display: Controls.AbstractButton.IconOnly Layout.alignment: Qt.AlignVCenter - Layout.preferredWidth: PlasmaCore.Units.iconSizes.medium - Layout.preferredHeight: PlasmaCore.Units.iconSizes.medium - Layout.rightMargin: PlasmaCore.Units.smallSpacing + Layout.preferredWidth: Kirigami.Units.iconSizes.medium + Layout.preferredHeight: Kirigami.Units.iconSizes.medium + Layout.rightMargin: Kirigami.Units.smallSpacing - Behavior on opacity { NumberAnimation { duration: PlasmaCore.Units.shortDuration } } + Behavior on opacity { NumberAnimation { duration: Kirigami.Units.shortDuration } } onClicked: { let coords = mapToItem(flickable, 0, 0); - MobileShellState.ShellDBusClient.openAppLaunchAnimation("audio-volume-high", i18n("Audio Settings"), coords.x, coords.y, PlasmaCore.Units.iconSizes.medium); + MobileShellState.ShellDBusClient.openAppLaunchAnimation("audio-volume-high", i18n("Audio Settings"), coords.x, coords.y, Kirigami.Units.iconSizes.medium); MobileShell.ShellUtil.executeCommand("plasma-open-settings kcm_pulseaudio"); } } @@ -188,8 +186,8 @@ NanoShell.FullScreenOverlay { text: i18n("Toggle showing audio streams") display: Controls.AbstractButton.IconOnly Layout.alignment: Qt.AlignVCenter - Layout.preferredWidth: PlasmaCore.Units.iconSizes.medium - Layout.preferredHeight: PlasmaCore.Units.iconSizes.medium + Layout.preferredWidth: Kirigami.Units.iconSizes.medium + Layout.preferredHeight: Kirigami.Units.iconSizes.medium onClicked: { window.showFullApplet = !window.showFullApplet // don't autohide applet when full applet is shown @@ -206,7 +204,7 @@ NanoShell.FullScreenOverlay { // other applet cards AudioApplet { id: applet - Layout.topMargin: PlasmaCore.Units.largeSpacing + Layout.topMargin: Kirigami.Units.gridUnit Layout.alignment: Qt.AlignHCenter Layout.preferredWidth: cards.width @@ -215,7 +213,7 @@ NanoShell.FullScreenOverlay { opacity: window.showFullApplet ? 1 : 0 visible: opacity !== 0 transform: Translate { - y: window.showFullApplet ? 0 : -PlasmaCore.Units.gridUnit + y: window.showFullApplet ? 0 : -Kirigami.Units.gridUnit Behavior on y { NumberAnimation {} } } diff --git a/components/mobileshell/qml/widgets/krunner/KRunnerWidget.qml b/components/mobileshell/qml/widgets/krunner/KRunnerWidget.qml index dd1db6d7..15ae42b6 100644 --- a/components/mobileshell/qml/widgets/krunner/KRunnerWidget.qml +++ b/components/mobileshell/qml/widgets/krunner/KRunnerWidget.qml @@ -62,7 +62,7 @@ Item { // emitted when an item on the ListView is triggered signal actionTriggered() - readonly property real closedContentY: PlasmaCore.Units.gridUnit * 5 + readonly property real closedContentY: Kirigami.Units.gridUnit * 5 readonly property real openedContentY: 0 readonly property real openFactor: Math.max(0, Math.min(1, 1 - flickable.contentY / closedContentY)) readonly property bool isOpen: openFactor != 0 @@ -118,7 +118,7 @@ Item { NumberAnimation on contentY { id: anim - duration: PlasmaCore.Units.longDuration * 2 + duration: Kirigami.Units.longDuration * 2 easing.type: Easing.OutQuad running: false onFinished: { @@ -136,16 +136,16 @@ Item { Controls.Control { opacity: root.openFactor Layout.fillWidth: true - Layout.maximumWidth: PlasmaCore.Units.gridUnit * 30 + Layout.maximumWidth: Kirigami.Units.gridUnit * 30 Layout.alignment: Qt.AlignHCenter - Layout.topMargin: PlasmaCore.Units.gridUnit - Layout.leftMargin: PlasmaCore.Units.gridUnit - Layout.rightMargin: PlasmaCore.Units.gridUnit + Layout.topMargin: Kirigami.Units.gridUnit + Layout.leftMargin: Kirigami.Units.gridUnit + Layout.rightMargin: Kirigami.Units.gridUnit - leftPadding: PlasmaCore.Units.smallSpacing - rightPadding: PlasmaCore.Units.smallSpacing - topPadding: PlasmaCore.Units.smallSpacing - bottomPadding: PlasmaCore.Units.smallSpacing + leftPadding: Kirigami.Units.smallSpacing + rightPadding: Kirigami.Units.smallSpacing + topPadding: Kirigami.Units.smallSpacing + bottomPadding: Kirigami.Units.smallSpacing background: Item { @@ -162,8 +162,8 @@ Item { Rectangle { id: rectBackground anchors.fill: parent - color: PlasmaCore.Theme.backgroundColor - radius: PlasmaCore.Units.smallSpacing + color: Kirigami.Theme.backgroundColor + radius: Kirigami.Units.smallSpacing } } @@ -189,7 +189,7 @@ Item { Controls.ScrollView { opacity: root.openFactor === 1 ? 1 : 0 Behavior on opacity { - NumberAnimation { duration: PlasmaCore.Units.shortDuration } + NumberAnimation { duration: Kirigami.Units.shortDuration } } Layout.fillWidth: true @@ -199,7 +199,7 @@ Item { id: listView queryString: queryField.text clip: true - PlasmaCore.ColorScope.colorGroup: PlasmaCore.Theme.NormalColorGroup + Kirigami.Theme.colorSet: Kirigami.Theme.Window highlight: activeFocus ? highlightComponent : null Component{ @@ -239,49 +239,49 @@ Item { anchors.fill: parent color: delegate.pressed ? Qt.rgba(255, 255, 255, 0.2) : (delegate.containsMouse ? Qt.rgba(255, 255, 255, 0.05) : "transparent") Behavior on color { - ColorAnimation { duration: PlasmaCore.Units.shortDuration } + ColorAnimation { duration: Kirigami.Units.shortDuration } } } RowLayout { id: rowLayout - height: PlasmaCore.Units.gridUnit * 3 + height: Kirigami.Units.gridUnit * 3 anchors.top: parent.top anchors.left: parent.left anchors.right: parent.right - anchors.leftMargin: PlasmaCore.Units.largeSpacing - anchors.rightMargin: PlasmaCore.Units.largeSpacing + anchors.leftMargin: Kirigami.Units.gridUnit + anchors.rightMargin: Kirigami.Units.gridUnit Kirigami.Icon { Layout.alignment: Qt.AlignVCenter source: model.decoration - implicitWidth: PlasmaCore.Units.iconSizes.medium - implicitHeight: PlasmaCore.Units.iconSizes.medium + implicitWidth: Kirigami.Units.iconSizes.medium + implicitHeight: Kirigami.Units.iconSizes.medium } ColumnLayout { Layout.fillWidth: true Layout.alignment: Qt.AlignVCenter - spacing: PlasmaCore.Units.smallSpacing + spacing: Kirigami.Units.smallSpacing PlasmaComponents.Label { id: title Layout.fillWidth: true - Layout.leftMargin: PlasmaCore.Units.smallSpacing * 2 - Layout.rightMargin: PlasmaCore.Units.largeSpacing + Layout.leftMargin: Kirigami.Units.smallSpacing * 2 + Layout.rightMargin: Kirigami.Units.gridUnit maximumLineCount: 1 elide: Text.ElideRight text: typeof modelData !== "undefined" ? modelData : model.display color: "white" - font.pointSize: PlasmaCore.Theme.defaultFont.pointSize + font.pointSize: Kirigami.Theme.defaultFont.pointSize } PlasmaComponents.Label { id: subtitle Layout.fillWidth: true - Layout.leftMargin: PlasmaCore.Units.smallSpacing * 2 - Layout.rightMargin: PlasmaCore.Units.largeSpacing + Layout.leftMargin: Kirigami.Units.smallSpacing * 2 + Layout.rightMargin: Kirigami.Units.gridUnit maximumLineCount: 1 elide: Text.ElideRight @@ -289,7 +289,7 @@ Item { color: "white" opacity: 0.8 - font.pointSize: Math.round(PlasmaCore.Theme.defaultFont.pointSize * 0.8) + font.pointSize: Math.round(Kirigami.Theme.defaultFont.pointSize * 0.8) } } diff --git a/components/mobileshell/qml/widgets/mediacontrols/BlurredBackground.qml b/components/mobileshell/qml/widgets/mediacontrols/BlurredBackground.qml index 20342d7f..5d0dfd53 100644 --- a/components/mobileshell/qml/widgets/mediacontrols/BlurredBackground.qml +++ b/components/mobileshell/qml/widgets/mediacontrols/BlurredBackground.qml @@ -5,7 +5,7 @@ import QtQuick import QtQuick.Effects import Qt5Compat.GraphicalEffects -import org.kde.plasma.core 2.0 as PlasmaCore +import org.kde.kirigami 2.20 as Kirigami Item { id: root @@ -24,7 +24,7 @@ Item { anchors.centerIn: parent width: img.width height: img.height - radius: PlasmaCore.Units.smallSpacing + radius: Kirigami.Units.smallSpacing } } } diff --git a/components/mobileshell/qml/widgets/mediacontrols/MediaControlsSource.qml b/components/mobileshell/qml/widgets/mediacontrols/MediaControlsSource.qml index 324f6785..63c232f0 100644 --- a/components/mobileshell/qml/widgets/mediacontrols/MediaControlsSource.qml +++ b/components/mobileshell/qml/widgets/mediacontrols/MediaControlsSource.qml @@ -7,7 +7,6 @@ import QtQuick -import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.plasma5support 2.0 as P5Support P5Support.DataSource { diff --git a/components/mobileshell/qml/widgets/mediacontrols/MediaControlsWidget.qml b/components/mobileshell/qml/widgets/mediacontrols/MediaControlsWidget.qml index 2265c512..07fd8e7d 100644 --- a/components/mobileshell/qml/widgets/mediacontrols/MediaControlsWidget.qml +++ b/components/mobileshell/qml/widgets/mediacontrols/MediaControlsWidget.qml @@ -12,9 +12,7 @@ import QtQuick.Controls as QQC2 import org.kde.kirigami as Kirigami import org.kde.plasma.private.mobileshell.state 1.0 as MobileShellState -import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.components 3.0 as PlasmaComponents3 -import org.kde.plasma.extras 2.0 as PlasmaExtras import "../../components" as Components @@ -25,8 +23,8 @@ Item { id: root visible: mpris2Source.hasPlayer - readonly property real padding: Kirigami.Units.largeSpacing + Kirigami.Units.smallSpacing - readonly property real contentHeight: PlasmaCore.Units.gridUnit * 2 + PlasmaCore.Units.smallSpacing + readonly property real padding: Kirigami.Units.gridUnit + Kirigami.Units.smallSpacing + readonly property real contentHeight: Kirigami.Units.gridUnit * 2 + Kirigami.Units.smallSpacing implicitHeight: visible ? padding * 2 + contentHeight : 0 MediaControlsSource { @@ -93,8 +91,9 @@ Item { imageSource: mpris2Source.albumArt(playerItem.source) } - contentItem: PlasmaCore.ColorScope { - colorGroup: PlasmaCore.Theme.ComplementaryColorGroup + contentItem: Item { + Kirigami.Theme.colorSet: Kirigami.Theme.Complementary + Kirigami.Theme.inherit: false width: playerItem.width - playerItem.leftPadding - playerItem.rightPadding RowLayout { @@ -117,7 +116,7 @@ Item { } ColumnLayout { - Layout.leftMargin: albumArt.visible ? Kirigami.Units.largeSpacing : 0 + Layout.leftMargin: albumArt.visible ? Kirigami.Units.gridUnit : 0 Layout.fillWidth: true spacing: Kirigami.Units.smallSpacing @@ -126,7 +125,7 @@ Item { inputText: mpris2Source.track(playerItem.source) || i18n("No media playing") textFormat: Text.PlainText - font.pointSize: PlasmaCore.Theme.defaultFont.pointSize + font.pointSize: Kirigami.Theme.defaultFont.pointSize color: "white" } @@ -136,7 +135,7 @@ Item { // if no artist is given, show player name instead inputText: mpris2Source.artist(playerItem.source) || modelData.application || "" textFormat: Text.PlainText - font.pointSize: PlasmaCore.Theme.defaultFont.pointSize * 0.9 + font.pointSize: Kirigami.Theme.defaultFont.pointSize * 0.9 opacity: 0.9 color: "white" } @@ -148,8 +147,8 @@ Item { enabled: mpris2Source.canGoBack(playerItem.source) icon.name: LayoutMirroring.enabled ? "media-skip-forward" : "media-skip-backward" - icon.width: PlasmaCore.Units.iconSizes.small - icon.height: PlasmaCore.Units.iconSizes.small + icon.width: Kirigami.Units.iconSizes.small + icon.height: Kirigami.Units.iconSizes.small onClicked: mpris2Source.goPrevious(playerItem.source) visible: mpris2Source.canGoBack(playerItem.source) || mpris2Source.canGoNext(playerItem.source) Accessible.name: i18nd("plasma_lookandfeel_org.kde.lookandfeel", "Previous track") @@ -160,8 +159,8 @@ Item { Layout.preferredWidth: height icon.name: mpris2Source.isPlaying(playerItem.source) ? "media-playback-pause" : "media-playback-start" - icon.width: PlasmaCore.Units.iconSizes.small - icon.height: PlasmaCore.Units.iconSizes.small + icon.width: Kirigami.Units.iconSizes.small + icon.height: Kirigami.Units.iconSizes.small onClicked: mpris2Source.playPause(playerItem.source) Accessible.name: i18nd("plasma_lookandfeel_org.kde.lookandfeel", "Play or Pause media") } @@ -172,8 +171,8 @@ Item { enabled: mpris2Source.canGoBack(playerItem.source) icon.name: LayoutMirroring.enabled ? "media-skip-backward" : "media-skip-forward" - icon.width: PlasmaCore.Units.iconSizes.small - icon.height: PlasmaCore.Units.iconSizes.small + icon.width: Kirigami.Units.iconSizes.small + icon.height: Kirigami.Units.iconSizes.small onClicked: mpris2Source.goNext(playerItem.source) visible: mpris2Source.canGoBack(playerItem.source) || mpris2Source.canGoNext(playerItem.source) Accessible.name: i18nd("plasma_lookandfeel_org.kde.lookandfeel", "Next track") diff --git a/components/mobileshell/qml/widgets/notifications/BaseNotificationItem.qml b/components/mobileshell/qml/widgets/notifications/BaseNotificationItem.qml index a4e45e26..e9f857ed 100644 --- a/components/mobileshell/qml/widgets/notifications/BaseNotificationItem.qml +++ b/components/mobileshell/qml/widgets/notifications/BaseNotificationItem.qml @@ -9,10 +9,8 @@ import QtQuick import QtQuick.Layouts import QtQuick.Window -import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.plasma5support 2.0 as P5Support import org.kde.plasma.components 3.0 as PlasmaComponents3 -import org.kde.plasma.extras 2.0 as PlasmaExtras import org.kde.notificationmanager 1.0 as NotificationManager diff --git a/components/mobileshell/qml/widgets/notifications/NotificationCard.qml b/components/mobileshell/qml/widgets/notifications/NotificationCard.qml index 97aefef2..8de94def 100644 --- a/components/mobileshell/qml/widgets/notifications/NotificationCard.qml +++ b/components/mobileshell/qml/widgets/notifications/NotificationCard.qml @@ -6,7 +6,6 @@ import QtQuick.Effects import org.kde.kirigami 2.12 as Kirigami -import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.components 3.0 as PlasmaComponents Item { @@ -27,7 +26,7 @@ Item { onContentItemChanged: { contentItem.parent = contentParent; contentItem.anchors.fill = contentParent; - contentItem.anchors.margins = Kirigami.Units.largeSpacing; + contentItem.anchors.margins = Kirigami.Units.gridUnit; contentParent.children.push(contentItem); } @@ -35,7 +34,7 @@ Item { NumberAnimation on dragOffset { id: dragAnim - duration: PlasmaCore.Units.longDuration + duration: Kirigami.Units.longDuration onFinished: { if (to !== 0) { root.dismissRequested(); @@ -52,7 +51,7 @@ Item { shadowEnabled: true shadowVerticalOffset: 1 shadowOpacity: 0.5 - shadowColor: Qt.lighter(PlasmaCore.Theme.backgroundColor, 0.1) + shadowColor: Qt.lighter(Kirigami.Theme.backgroundColor, 0.1) } // shadow @@ -63,8 +62,8 @@ Item { anchors.rightMargin: -1 anchors.bottomMargin: -1 - color: Qt.darker(PlasmaCore.Theme.backgroundColor, 1.3) - radius: PlasmaCore.Units.smallSpacing + color: Qt.darker(Kirigami.Theme.backgroundColor, 1.3) + radius: Kirigami.Units.smallSpacing } // card @@ -76,8 +75,8 @@ Item { anchors.rightMargin: root.dragOffset < 0 ? -root.dragOffset : 0 anchors.top: parent.top - color: (root.tapEnabled && mouseArea.pressed) ? Qt.darker(PlasmaCore.Theme.backgroundColor, 1.1) : PlasmaCore.Theme.backgroundColor - radius: PlasmaCore.Units.smallSpacing + color: (root.tapEnabled && mouseArea.pressed) ? Qt.darker(Kirigami.Theme.backgroundColor, 1.1) : Kirigami.Theme.backgroundColor + radius: Kirigami.Units.smallSpacing implicitHeight: contentParent.implicitHeight clip: true @@ -127,7 +126,7 @@ Item { startActive = active; if (!active) { // release event - let threshold = PlasmaCore.Units.gridUnit * 5; // drag threshold + let threshold = Kirigami.Units.gridUnit * 5; // drag threshold if (root.dragOffset > threshold) { dragAnim.to = root.width; } else if (root.dragOffset < -threshold) { diff --git a/components/mobileshell/qml/widgets/notifications/NotificationFooterActions.qml b/components/mobileshell/qml/widgets/notifications/NotificationFooterActions.qml index 3d346ffe..d7f6e6aa 100644 --- a/components/mobileshell/qml/widgets/notifications/NotificationFooterActions.qml +++ b/components/mobileshell/qml/widgets/notifications/NotificationFooterActions.qml @@ -8,7 +8,7 @@ import QtQuick 2.15 import QtQuick.Layouts 1.1 -import org.kde.plasma.core 2.0 as PlasmaCore +import org.kde.kirigami 2.20 as Kirigami import org.kde.plasma.components 3.0 as PlasmaComponents Item { @@ -22,14 +22,14 @@ Item { Flow { id: actionFlow width: parent.width - spacing: PlasmaCore.Units.smallSpacing + spacing: Kirigami.Units.smallSpacing layoutDirection: Qt.RightToLeft enabled: !replyLoader.active opacity: replyLoader.active ? 0 : 1 Behavior on opacity { NumberAnimation { - duration: PlasmaCore.Units.longDuration + duration: Kirigami.Units.longDuration easing.type: Easing.InOutQuad } } @@ -88,13 +88,13 @@ Item { Behavior on x { NumberAnimation { - duration: PlasmaCore.Units.longDuration + duration: Kirigami.Units.longDuration easing.type: Easing.InOutQuad } } Behavior on opacity { NumberAnimation { - duration: PlasmaCore.Units.longDuration + duration: Kirigami.Units.longDuration easing.type: Easing.InOutQuad } } diff --git a/components/mobileshell/qml/widgets/notifications/NotificationGroupHeader.qml b/components/mobileshell/qml/widgets/notifications/NotificationGroupHeader.qml index 9954e20a..82c8c381 100644 --- a/components/mobileshell/qml/widgets/notifications/NotificationGroupHeader.qml +++ b/components/mobileshell/qml/widgets/notifications/NotificationGroupHeader.qml @@ -14,7 +14,6 @@ import org.kde.kirigami 2.12 as Kirigami import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.plasma5support 2.0 as P5Support import org.kde.plasma.components 3.0 as PlasmaComponents -import org.kde.plasma.extras 2.0 as PlasmaExtras import org.kde.notificationmanager 1.0 as NotificationManager @@ -39,15 +38,15 @@ RowLayout { property real timeout: 5000 property real remainingTime: 0 - spacing: PlasmaCore.Units.smallSpacing - Layout.preferredHeight: Math.max(applicationNameLabel.implicitHeight, PlasmaCore.Units.iconSizes.small) + spacing: Kirigami.Units.smallSpacing + Layout.preferredHeight: Math.max(applicationNameLabel.implicitHeight, Kirigami.Units.iconSizes.small) PlasmaCore.IconItem { id: applicationIconItem - Layout.topMargin: PlasmaCore.Units.smallSpacing - Layout.bottomMargin: PlasmaCore.Units.smallSpacing - Layout.preferredWidth: PlasmaCore.Units.iconSizes.small - Layout.preferredHeight: PlasmaCore.Units.iconSizes.small + Layout.topMargin: Kirigami.Units.smallSpacing + Layout.bottomMargin: Kirigami.Units.smallSpacing + Layout.preferredWidth: Kirigami.Units.iconSizes.small + Layout.preferredHeight: Kirigami.Units.iconSizes.small source: notificationHeading.applicationIconSource usesPlasmaTheme: false visible: valid @@ -55,7 +54,7 @@ RowLayout { PlasmaComponents.Label { id: applicationNameLabel - Layout.leftMargin: PlasmaCore.Units.smallSpacing + Layout.leftMargin: Kirigami.Units.smallSpacing Layout.fillWidth: true opacity: 0.6 textFormat: Text.PlainText diff --git a/components/mobileshell/qml/widgets/notifications/NotificationItem.qml b/components/mobileshell/qml/widgets/notifications/NotificationItem.qml index af29fd25..43f287b9 100644 --- a/components/mobileshell/qml/widgets/notifications/NotificationItem.qml +++ b/components/mobileshell/qml/widgets/notifications/NotificationItem.qml @@ -11,7 +11,6 @@ import QtQuick.Window 2.2 import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.components 3.0 as PlasmaComponents -import org.kde.plasma.extras 2.0 as PlasmaExtras import org.kde.notificationmanager 1.0 as NotificationManager @@ -33,8 +32,8 @@ BaseNotificationItem { anchors.left: parent.left anchors.right: parent.right - PlasmaCore.ColorScope.colorGroup: PlasmaCore.Theme.HeaderColorGroup - PlasmaCore.ColorScope.inherit: false + Kirigami.Theme.colorSet: Kirigami.Theme.Header + Kirigami.Theme.inherit: false visible: !notificationItem.inGroup height: visible ? implicitHeight : 0 @@ -54,7 +53,7 @@ BaseNotificationItem { // notification NotificationCard { id: mainCard - anchors.topMargin: notificationHeading.visible ? Kirigami.Units.largeSpacing : 0 + anchors.topMargin: notificationHeading.visible ? Kirigami.Units.gridUnit : 0 anchors.top: notificationHeading.bottom anchors.left: parent.left anchors.right: parent.right @@ -71,7 +70,7 @@ BaseNotificationItem { // notification summary row RowLayout { Layout.fillWidth: true - Layout.bottomMargin: PlasmaCore.Units.smallSpacing + Layout.bottomMargin: Kirigami.Units.smallSpacing // notification summary PlasmaComponents.Label { @@ -101,7 +100,7 @@ BaseNotificationItem { // notification contents RowLayout { Layout.fillWidth: true - spacing: PlasmaCore.Units.smallSpacing + spacing: Kirigami.Units.smallSpacing // notification text NotificationBodyLabel { @@ -112,7 +111,7 @@ BaseNotificationItem { // HACK RichText does not allow to specify link color and since LineEdit // does not support StyledText, we have to inject some CSS to force the color, // cf. QTBUG-81463 and to some extent QTBUG-80354 - text: "" + notificationItem.body + text: "" + notificationItem.body // Cannot do text !== "" because RichText adds some HTML tags even when empty visible: notificationItem.body !== "" @@ -121,10 +120,10 @@ BaseNotificationItem { // notification icon Item { id: iconContainer - Layout.preferredWidth: PlasmaCore.Units.iconSizes.large - Layout.preferredHeight: PlasmaCore.Units.iconSizes.large - Layout.topMargin: PlasmaCore.Units.smallSpacing - Layout.bottomMargin: PlasmaCore.Units.smallSpacing + Layout.preferredWidth: Kirigami.Units.iconSizes.large + Layout.preferredHeight: Kirigami.Units.iconSizes.large + Layout.topMargin: Kirigami.Units.smallSpacing + Layout.bottomMargin: Kirigami.Units.smallSpacing visible: iconItem.active @@ -151,7 +150,7 @@ BaseNotificationItem { // thumbnails Loader { id: thumbnailStripLoader - Layout.topMargin: Kirigami.Units.largeSpacing + Layout.topMargin: Kirigami.Units.gridUnit Layout.fillWidth: true active: notificationItem.urls.length > 0 visible: active diff --git a/components/mobileshell/qml/widgets/notifications/NotificationReplyField.qml b/components/mobileshell/qml/widgets/notifications/NotificationReplyField.qml index c3f3b907..6566302f 100644 --- a/components/mobileshell/qml/widgets/notifications/NotificationReplyField.qml +++ b/components/mobileshell/qml/widgets/notifications/NotificationReplyField.qml @@ -8,7 +8,7 @@ import QtQuick 2.8 import QtQuick.Layouts 1.1 -import org.kde.plasma.core 2.0 as PlasmaCore +import org.kde.kirigami 2.20 as Kirigami import org.kde.plasma.components 3.0 as PlasmaComponents3 RowLayout { @@ -24,7 +24,7 @@ RowLayout { property string buttonIconName property string buttonText - spacing: PlasmaCore.Units.smallSpacing + spacing: Kirigami.Units.smallSpacing function activate() { replyTextField.forceActiveFocus(); diff --git a/components/mobileshell/qml/widgets/notifications/NotificationTimeText.qml b/components/mobileshell/qml/widgets/notifications/NotificationTimeText.qml index 42ac40ec..e672f19b 100644 --- a/components/mobileshell/qml/widgets/notifications/NotificationTimeText.qml +++ b/components/mobileshell/qml/widgets/notifications/NotificationTimeText.qml @@ -9,10 +9,8 @@ import QtQuick 2.8 import QtQuick.Layouts 1.1 import QtQuick.Window 2.2 -import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.plasma5support 2.0 as P5Support import org.kde.plasma.components 3.0 as PlasmaComponents -import org.kde.plasma.extras 2.0 as PlasmaExtras import org.kde.notificationmanager 1.0 as NotificationManager @@ -47,7 +45,7 @@ PlasmaComponents.Label { ageLabel.agoText = Util.generateNotificationHeaderAgoText(time, jobState); } - font.pixelSize: PlasmaCore.Theme.defaultFont.pixelSize * 0.8 + font.pixelSize: Kirigami.Theme.defaultFont.pixelSize * 0.8 // the "n minutes ago" text, for jobs we show remaining time instead // updated periodically by a Timer hence this property with generate() function diff --git a/components/mobileshell/qml/widgets/notifications/NotificationsWidget.qml b/components/mobileshell/qml/widgets/notifications/NotificationsWidget.qml index 0eceff68..658d43ed 100644 --- a/components/mobileshell/qml/widgets/notifications/NotificationsWidget.qml +++ b/components/mobileshell/qml/widgets/notifications/NotificationsWidget.qml @@ -12,7 +12,6 @@ import Qt5Compat.GraphicalEffects import org.kde.kirigami 2.12 as Kirigami -import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.plasma5support 2.0 as P5Support import org.kde.plasma.private.mobileshell 1.0 as MobileShell import org.kde.plasma.private.mobileshell.shellsettingsplugin as ShellSettings @@ -144,7 +143,7 @@ Item { property var pendingNotificationWithAction - readonly property int animationDuration: ShellSettings.Settings.animationsEnabled ? PlasmaCore.Units.longDuration : 0 + readonly property int animationDuration: ShellSettings.Settings.animationsEnabled ? Kirigami.Units.longDuration : 0 // If a screen overflow occurs, fix height in order to maintain tool buttons in place. readonly property bool listOverflowing: contentItem.childrenRect.height + toolButtons.height + spacing >= root.height @@ -159,7 +158,7 @@ Item { } boundsBehavior: Flickable.StopAtBounds - spacing: Kirigami.Units.largeSpacing + spacing: Kirigami.Units.gridUnit // TODO keyboard focus highlightMoveDuration: 0 @@ -173,7 +172,7 @@ Item { PlasmaExtras.PlaceholderMessage { anchors.centerIn: parent - width: parent.width - (PlasmaCore.Units.largeSpacing * 4) + width: parent.width - (Kirigami.Units.gridUnit * 4) text: i18n("Notification service not available") visible: list.count === 0 && !NotificationManager.Server.valid && historyModelType === NotificationsModelType.NotificationsModel @@ -230,9 +229,9 @@ Item { anchors { left: parent ? parent.left : undefined - leftMargin: PlasmaCore.Units.largeSpacing + leftMargin: Kirigami.Units.gridUnit right: parent ? parent.right : undefined - rightMargin: PlasmaCore.Units.largeSpacing + rightMargin: Kirigami.Units.gridUnit } height: model.isGroup ? groupDelegate.height : notificationDelegate.height @@ -263,7 +262,7 @@ Item { id: notificationDelegate Column { - spacing: PlasmaCore.Units.smallSpacing + spacing: Kirigami.Units.smallSpacing height: notificationItem.height + showMoreLoader.height @@ -354,7 +353,7 @@ Item { visible: list.listOverflowing height: 1 opacity: 0.25 - color: PlasmaCore.Theme.textColor + color: Kirigami.Theme.textColor } RowLayout { @@ -364,8 +363,8 @@ Item { top: spacer.bottom right: parent.right left: parent.left - leftMargin: PlasmaCore.Units.largeSpacing - rightMargin: PlasmaCore.Units.largeSpacing + leftMargin: Kirigami.Units.gridUnit + rightMargin: Kirigami.Units.gridUnit topMargin: list.spacing bottomMargin: list.spacing } diff --git a/components/mobileshell/qml/widgets/notifications/ThumbnailStrip.qml b/components/mobileshell/qml/widgets/notifications/ThumbnailStrip.qml index 8507b0d7..f58f1a37 100644 --- a/components/mobileshell/qml/widgets/notifications/ThumbnailStrip.qml +++ b/components/mobileshell/qml/widgets/notifications/ThumbnailStrip.qml @@ -8,9 +8,9 @@ import QtQuick import QtQuick.Layouts import QtQuick.Effects +import org.kde.kirigami 2.20 as Kirigami import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.components 3.0 as PlasmaComponents3 -import org.kde.plasma.extras 2.0 as PlasmaExtras import org.kde.plasma.private.mobileshell 1.0 as MobileShell import org.kde.kquickcontrolsaddons 2.0 as KQCAddons @@ -95,7 +95,7 @@ MouseArea { PlasmaCore.IconItem { anchors.centerIn: parent width: height - height: PlasmaCore.Units.roundToIconSize(parent.height) + height: Kirigami.Units.iconSizes.roundedIconSize(parent.height) usesPlasmaTheme: false source: !thumbnailer.busy && !thumbnailer.hasPreview ? thumbnailer.iconName : "" } @@ -111,7 +111,7 @@ MouseArea { anchors { top: parent.top right: parent.right - margins: PlasmaCore.Units.smallSpacing + margins: Kirigami.Units.smallSpacing } Accessible.name: tooltip.text icon.name: "application-menu" diff --git a/containments/homescreens/folio/package/contents/ui/FavoriteStrip.qml b/containments/homescreens/folio/package/contents/ui/FavoriteStrip.qml index 56b5880d..1668da5f 100644 --- a/containments/homescreens/folio/package/contents/ui/FavoriteStrip.qml +++ b/containments/homescreens/folio/package/contents/ui/FavoriteStrip.qml @@ -8,8 +8,9 @@ import QtQuick 2.4 import QtQuick.Layouts 1.1 import QtQuick.Controls 2.3 as Controls +import org.kde.kirigami 2.20 as Kirigami + import org.kde.plasma.plasmoid 2.0 -import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.kquickcontrolsaddons 2.0 @@ -26,13 +27,13 @@ LauncherContainer { Behavior on height { NumberAnimation { - duration: PlasmaCore.Units.longDuration + duration: Kirigami.Units.longDuration easing.type: Easing.InOutQuad } } Behavior on opacity { OpacityAnimator { - duration: PlasmaCore.Units.longDuration * 4 + duration: Kirigami.Units.longDuration * 4 easing.type: Easing.InOutQuad } } diff --git a/containments/homescreens/folio/package/contents/ui/FlickContainer.qml b/containments/homescreens/folio/package/contents/ui/FlickContainer.qml index 3bae68b4..1c438235 100644 --- a/containments/homescreens/folio/package/contents/ui/FlickContainer.qml +++ b/containments/homescreens/folio/package/contents/ui/FlickContainer.qml @@ -8,7 +8,6 @@ import QtQuick 2.15 import QtQuick.Layouts 1.15 import org.kde.taskmanager 0.1 as TaskManager -import org.kde.plasma.core 2.1 as PlasmaCore import org.kde.plasma.components 3.0 as PlasmaComponents import org.kde.plasma.private.mobileshell 1.0 as MobileShell diff --git a/containments/homescreens/folio/package/contents/ui/HomeDelegate.qml b/containments/homescreens/folio/package/contents/ui/HomeDelegate.qml index d7e77ecd..76ccf2b4 100644 --- a/containments/homescreens/folio/package/contents/ui/HomeDelegate.qml +++ b/containments/homescreens/folio/package/contents/ui/HomeDelegate.qml @@ -9,6 +9,8 @@ import QtQuick.Layouts 1.1 import QtQuick.Controls 2.3 as Controls import Qt5Compat.GraphicalEffects +import org.kde.kirigami 2.20 as Kirigami + import org.kde.plasma.plasmoid 2.0 import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.components 3.0 as PC3 @@ -60,7 +62,7 @@ ContainmentLayoutManager.ItemContainer { if (modelData.applicationRunning) { delegate.launch(0, 0, "", modelData.applicationName); } else { - delegate.launch(delegate.x + (PlasmaCore.Units.smallSpacing * 2), delegate.y + (PlasmaCore.Units.smallSpacing * 2), icon.source, modelData.applicationName); + delegate.launch(delegate.x + (Kirigami.Units.smallSpacing * 2), delegate.y + (Kirigami.Units.smallSpacing * 2), icon.source, modelData.applicationName); } desktopModel.setMinimizedDelegate(index, delegate); @@ -148,10 +150,10 @@ ContainmentLayoutManager.ItemContainer { ColumnLayout { anchors { fill: parent - leftMargin: PlasmaCore.Units.smallSpacing * 2 - topMargin: PlasmaCore.Units.smallSpacing * 2 - rightMargin: PlasmaCore.Units.smallSpacing * 2 - bottomMargin: PlasmaCore.Units.smallSpacing * 2 + leftMargin: Kirigami.Units.smallSpacing * 2 + topMargin: Kirigami.Units.smallSpacing * 2 + rightMargin: Kirigami.Units.smallSpacing * 2 + bottomMargin: Kirigami.Units.smallSpacing * 2 } spacing: 0 @@ -160,7 +162,7 @@ ContainmentLayoutManager.ItemContainer { Layout.alignment: Qt.AlignHCenter | Qt.AlignTop Layout.fillWidth: true - Layout.minimumHeight: Math.min(PlasmaCore.Units.iconSizes.large, parent.height - delegate.reservedSpaceForLabel) + Layout.minimumHeight: Math.min(Kirigami.Units.iconSizes.large, parent.height - delegate.reservedSpaceForLabel) Layout.preferredHeight: Layout.minimumHeight usesPlasmaTheme: false @@ -173,9 +175,9 @@ ContainmentLayoutManager.ItemContainer { } visible: model.applicationRunning radius: width - width: PlasmaCore.Units.smallSpacing + width: Kirigami.Units.smallSpacing height: width - color: PlasmaCore.Theme.highlightColor + color: Kirigami.Theme.highlightColor } // darken effect when hovered/pressed @@ -200,9 +202,9 @@ ContainmentLayoutManager.ItemContainer { Layout.fillWidth: true Layout.preferredHeight: delegate.reservedSpaceForLabel Layout.alignment: Qt.AlignTop - Layout.topMargin: PlasmaCore.Units.smallSpacing - Layout.leftMargin: -parent.anchors.leftMargin + PlasmaCore.Units.smallSpacing * 2 - Layout.rightMargin: -parent.anchors.rightMargin + PlasmaCore.Units.smallSpacing * 2 + Layout.topMargin: Kirigami.Units.smallSpacing + Layout.leftMargin: -parent.anchors.leftMargin + Kirigami.Units.smallSpacing * 2 + Layout.rightMargin: -parent.anchors.rightMargin + Kirigami.Units.smallSpacing * 2 wrapMode: Text.WordWrap horizontalAlignment: Text.AlignHCenter @@ -212,7 +214,7 @@ ContainmentLayoutManager.ItemContainer { text: model.applicationName - font.pointSize: PlasmaCore.Theme.defaultFont.pointSize * 0.8 + font.pointSize: Kirigami.Theme.defaultFont.pointSize * 0.8 font.weight: Font.Bold color: "white" diff --git a/containments/homescreens/folio/package/contents/ui/HomeScreen.qml b/containments/homescreens/folio/package/contents/ui/HomeScreen.qml index b8682966..77d6854b 100644 --- a/containments/homescreens/folio/package/contents/ui/HomeScreen.qml +++ b/containments/homescreens/folio/package/contents/ui/HomeScreen.qml @@ -10,7 +10,6 @@ import QtQuick.Window 2.12 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 3.0 as PlasmaComponents import org.kde.draganddrop 2.0 as DragDrop diff --git a/containments/homescreens/folio/package/contents/ui/HomeScreenContents.qml b/containments/homescreens/folio/package/contents/ui/HomeScreenContents.qml index a2cbfe16..3be702db 100644 --- a/containments/homescreens/folio/package/contents/ui/HomeScreenContents.qml +++ b/containments/homescreens/folio/package/contents/ui/HomeScreenContents.qml @@ -9,8 +9,9 @@ import QtQuick.Window 2.12 import QtQuick.Layouts 1.1 import Qt5Compat.GraphicalEffects +import org.kde.kirigami 2.20 as Kirigami + import org.kde.plasma.plasmoid 2.0 -import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.components 3.0 as PlasmaComponents import org.kde.draganddrop 2.0 as DragDrop @@ -89,10 +90,10 @@ DragDrop.DropArea { let scenePos = mapToItem(null, event.x, event.y); //SCROLL LEFT - if (scenePos.x < PlasmaCore.Units.gridUnit) { + if (scenePos.x < Kirigami.Units.gridUnit) { homeScreenPages.scrollLeft(); //SCROLL RIGHT - } else if (scenePos.x > homeScreenPages.width - PlasmaCore.Units.gridUnit) { + } else if (scenePos.x > homeScreenPages.width - Kirigami.Units.gridUnit) { homeScreenPages.scrollRight(); //DON't SCROLL } else { @@ -194,10 +195,10 @@ DragDrop.DropArea { // Sets the containment in edit mode when we go in edit mode as well onEditModeChanged: plasmoid.editMode = editMode; - minimumItemWidth: PlasmaCore.Units.gridUnit * 3 + minimumItemWidth: Kirigami.Units.gridUnit * 3 minimumItemHeight: minimumItemWidth - defaultItemWidth: PlasmaCore.Units.gridUnit * 6 + defaultItemWidth: Kirigami.Units.gridUnit * 6 defaultItemHeight: defaultItemWidth acceptsAppletCallback: function(applet, x, y) { @@ -219,7 +220,7 @@ DragDrop.DropArea { id: metrics text: "M\nM" visible: false - font.pointSize: PlasmaCore.Theme.defaultFont.pointSize * 0.9 + font.pointSize: Kirigami.Theme.defaultFont.pointSize * 0.9 } LauncherRepeater { id: launcherRepeater diff --git a/containments/homescreens/folio/package/contents/ui/HomeScreenPages.qml b/containments/homescreens/folio/package/contents/ui/HomeScreenPages.qml index 06e43270..aed157ad 100644 --- a/containments/homescreens/folio/package/contents/ui/HomeScreenPages.qml +++ b/containments/homescreens/folio/package/contents/ui/HomeScreenPages.qml @@ -9,8 +9,9 @@ import QtQuick 2.12 import QtQuick.Window 2.12 import QtQuick.Layouts 1.1 +import org.kde.kirigami 2.20 as Kirigami + import org.kde.plasma.plasmoid 2.0 -import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.components 3.0 as PlasmaComponents import org.kde.draganddrop 2.0 as DragDrop @@ -82,7 +83,7 @@ MobileShell.Flickable { repeat: true interval: 1500 onTriggered: { - homeScreenState.animateGoToPageIndex(Math.max(0, homeScreenState.currentPageIndex + (scrollRight ? 1 : -1)), PlasmaCore.Units.longDuration * 2); + homeScreenState.animateGoToPageIndex(Math.max(0, homeScreenState.currentPageIndex + (scrollRight ? 1 : -1)), Kirigami.Units.longDuration * 2); } } @@ -94,8 +95,8 @@ MobileShell.Flickable { bottomMargin: mainFlickable.footer ? mainFlickable.footer.height : 0 } - PlasmaCore.ColorScope.inherit: false - PlasmaCore.ColorScope.colorGroup: PlasmaCore.Theme.ComplementaryColorGroup + Kirigami.Theme.inherit: false + Kirigami.Theme.colorSet: Kirigami.Theme.Complementary parent: mainFlickable visible: count > 1 @@ -105,11 +106,11 @@ MobileShell.Flickable { delegate: Rectangle { property bool isAddPageIndicator: index === pageIndicator.count-1 && mainFlickable.showAddPageIndicator - implicitWidth: PlasmaCore.Units.gridUnit/2 + implicitWidth: Kirigami.Units.gridUnit/2 implicitHeight: implicitWidth radius: width - color: isAddPageIndicator ? "transparent" : PlasmaCore.ColorScope.textColor + color: isAddPageIndicator ? "transparent" : Kirigami.Theme.textColor PlasmaComponents.Label { anchors.centerIn: parent @@ -120,7 +121,7 @@ MobileShell.Flickable { opacity: index === pageIndicator.currentIndex ? 0.9 : pressed ? 0.7 : 0.5 Behavior on opacity { OpacityAnimator { - duration: PlasmaCore.Units.longDuration + duration: Kirigami.Units.longDuration easing.type: Easing.InOutQuad } } @@ -142,7 +143,7 @@ MobileShell.Flickable { id: scrollLeftIndicator anchors { left: parent.left - leftMargin: PlasmaCore.Units.smallSpacing + leftMargin: Kirigami.Units.smallSpacing } elementId: "left-arrow" } @@ -150,7 +151,7 @@ MobileShell.Flickable { id: scrollRightIndicator anchors { right: parent.right - rightMargin: PlasmaCore.Units.smallSpacing + rightMargin: Kirigami.Units.smallSpacing } elementId: "right-arrow" } diff --git a/containments/homescreens/folio/package/contents/ui/HomeScreenState.qml b/containments/homescreens/folio/package/contents/ui/HomeScreenState.qml index af82dfb6..e452e939 100644 --- a/containments/homescreens/folio/package/contents/ui/HomeScreenState.qml +++ b/containments/homescreens/folio/package/contents/ui/HomeScreenState.qml @@ -6,7 +6,7 @@ import QtQuick 2.15 -import org.kde.plasma.core 2.1 as PlasmaCore +import org.kde.kirigami 2.20 as Kirigami import org.kde.plasma.private.mobileshell 1.0 as MobileShell @@ -311,7 +311,7 @@ QtObject { case HomeScreenState.SwipingPages: { // update pages position let currentPageIndexPosition = xPositionFromPageIndex(currentPageIndex); - let duration = PlasmaCore.Units.longDuration * 2; + let duration = Kirigami.Units.longDuration * 2; if (xPosition < currentPageIndexPosition) { if (movingRight) { @@ -409,7 +409,7 @@ QtObject { target: root property: "yPosition" to: appDrawerOpenYPosition - duration: PlasmaCore.Units.longDuration * 2 + duration: Kirigami.Units.longDuration * 2 easing.type: Easing.OutCubic onFinished: { @@ -422,7 +422,7 @@ QtObject { target: root property: "yPosition" to: pagesYPosition - duration: PlasmaCore.Units.longDuration * 2 + duration: Kirigami.Units.longDuration * 2 easing.type: Easing.OutCubic onFinished: { diff --git a/containments/homescreens/folio/package/contents/ui/LauncherContainer.qml b/containments/homescreens/folio/package/contents/ui/LauncherContainer.qml index 47c7ee7d..619c0279 100644 --- a/containments/homescreens/folio/package/contents/ui/LauncherContainer.qml +++ b/containments/homescreens/folio/package/contents/ui/LauncherContainer.qml @@ -8,8 +8,9 @@ import QtQuick 2.4 import QtQuick.Layouts 1.1 import QtQuick.Controls 2.3 as Controls +import org.kde.kirigami 2.20 as Kirigami + import org.kde.plasma.plasmoid 2.0 -import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.kquickcontrolsaddons 2.0 import org.kde.plasma.private.containmentlayoutmanager 1.0 as ContainmentLayoutManager @@ -18,9 +19,9 @@ Item { id: root readonly property int reservedSpaceForLabel: metrics.height - readonly property int cellWidth: root.width / Math.floor(root.width / ((availableCellHeight - reservedSpaceForLabel) + PlasmaCore.Units.smallSpacing*4)) + readonly property int cellWidth: root.width / Math.floor(root.width / ((availableCellHeight - reservedSpaceForLabel) + Kirigami.Units.smallSpacing*4)) readonly property int cellHeight: availableCellHeight - property int availableCellHeight: PlasmaCore.Units.iconSizes.huge + reservedSpaceForLabel + property int availableCellHeight: Kirigami.Units.iconSizes.huge + reservedSpaceForLabel property ContainmentLayoutManager.AppletsLayout appletsLayout @@ -28,18 +29,18 @@ Item { property alias flow: applicationsFlow implicitWidth: frame.implicitWidth - implicitHeight: Math.max(PlasmaCore.Units.gridUnit*3, frame.implicitHeight) + implicitHeight: Math.max(Kirigami.Units.gridUnit*3, frame.implicitHeight) Controls.Label { id: metrics text: "M\nM" visible: false - font.pointSize: PlasmaCore.Theme.defaultFont.pointSize * 0.9 + font.pointSize: Kirigami.Theme.defaultFont.pointSize * 0.9 } Item { id: spacer - width: PlasmaCore.Units.gridUnit * 4 + width: Kirigami.Units.gridUnit * 4 height: width } @@ -67,7 +68,7 @@ Item { move: Transition { NumberAnimation { - duration: PlasmaCore.Units.longDuration + duration: Kirigami.Units.longDuration easing.type: Easing.InOutQuad properties: "x,y" } @@ -76,7 +77,7 @@ Item { } Behavior on implicitWidth { NumberAnimation { - duration: PlasmaCore.Units.longDuration + duration: Kirigami.Units.longDuration easing.type: Easing.InOutQuad } } diff --git a/containments/homescreens/folio/package/contents/ui/LauncherRepeater.qml b/containments/homescreens/folio/package/contents/ui/LauncherRepeater.qml index e4f0b9f8..049f85de 100644 --- a/containments/homescreens/folio/package/contents/ui/LauncherRepeater.qml +++ b/containments/homescreens/folio/package/contents/ui/LauncherRepeater.qml @@ -10,7 +10,6 @@ import QtQuick.Controls 2.3 as Controls import Qt5Compat.GraphicalEffects import org.kde.plasma.plasmoid 2.0 -import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.kquickcontrolsaddons 2.0 import org.kde.plasma.private.containmentlayoutmanager 1.0 as ContainmentLayoutManager @@ -77,10 +76,10 @@ Repeater { var pos = plasmoid.fullRepresentationItem.mapFromItem(delegate, dragCenter.x, dragCenter.y); //SCROLL LEFT - if (pos.x < PlasmaCore.Units.gridUnit) { + if (pos.x < Kirigami.Units.gridUnit) { launcherRepeater.scrollLeftRequested(); //SCROLL RIGHT - } else if (pos.x > homeScreenState.pageWidth - PlasmaCore.Units.gridUnit) { + } else if (pos.x > homeScreenState.pageWidth - Kirigami.Units.gridUnit) { launcherRepeater.scrollRightRequested(); //DON't SCROLL } else { diff --git a/containments/homescreens/folio/package/contents/ui/MobileAppletContainer.qml b/containments/homescreens/folio/package/contents/ui/MobileAppletContainer.qml index 37972f6a..fa4621ab 100644 --- a/containments/homescreens/folio/package/contents/ui/MobileAppletContainer.qml +++ b/containments/homescreens/folio/package/contents/ui/MobileAppletContainer.qml @@ -9,8 +9,9 @@ import QtQuick.Window 2.12 import QtQuick.Layouts 1.1 import Qt5Compat.GraphicalEffects +import org.kde.kirigami 2.20 as Kirigami + import org.kde.plasma.plasmoid 2.0 -import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.components 3.0 as PlasmaComponents import org.kde.draganddrop 2.0 as DragDrop @@ -68,10 +69,10 @@ ContainmentLayoutManager.BasicAppletContainer { var pos = plasmoid.fullRepresentationItem.mapFromItem(appletContainer, dragCenter.x, dragCenter.y); //SCROLL LEFT - if (pos.x < PlasmaCore.Units.gridUnit) { + if (pos.x < Kirigami.Units.gridUnit) { launcherRepeater.scrollLeftRequested(); //SCROLL RIGHT - } else if (pos.x > screenWidth - PlasmaCore.Units.gridUnit) { + } else if (pos.x > screenWidth - Kirigami.Units.gridUnit) { launcherRepeater.scrollRightRequested(); //DON't SCROLL } else { diff --git a/containments/homescreens/folio/package/contents/ui/appdrawer/AbstractAppDrawer.qml b/containments/homescreens/folio/package/contents/ui/appdrawer/AbstractAppDrawer.qml index 96fb727a..b96b1e32 100644 --- a/containments/homescreens/folio/package/contents/ui/appdrawer/AbstractAppDrawer.qml +++ b/containments/homescreens/folio/package/contents/ui/appdrawer/AbstractAppDrawer.qml @@ -10,9 +10,7 @@ import QtQuick.Layouts 1.1 import QtQuick.Controls 2.15 as Controls import org.kde.plasma.plasmoid 2.0 -import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.components 3.0 as PC3 -import org.kde.plasma.extras 2.0 as PlasmaExtra import org.kde.kirigami 2.10 as Kirigami import org.kde.plasma.private.mobileshell 1.0 as MobileShell @@ -41,9 +39,9 @@ Item { signal dragStarted readonly property int reservedSpaceForLabel: metrics.height - property int availableCellHeight: PlasmaCore.Units.iconSizes.huge + reservedSpaceForLabel + property int availableCellHeight: Kirigami.Units.iconSizes.huge + reservedSpaceForLabel - readonly property real openFactor: factorNormalize(view.contentY / (PlasmaCore.Units.gridUnit * 10)) + readonly property real openFactor: factorNormalize(view.contentY / (Kirigami.Units.gridUnit * 10)) // height from top of screen that the drawer starts readonly property real drawerTopMargin: height - topPadding - bottomPadding - closedPositionOffset @@ -63,7 +61,7 @@ Item { id: metrics text: "M\nM" visible: false - font.pointSize: PlasmaCore.Theme.defaultFont.pointSize * 0.8 + font.pointSize: Kirigami.Theme.defaultFont.pointSize * 0.8 font.weight: Font.Bold } @@ -137,7 +135,7 @@ Item { opacity: 0.6 * root.openFactor // remove radius - radius: view.contentY > (topMargin.height - PlasmaCore.Units.gridUnit) ? 0 : PlasmaCore.Units.gridUnit + radius: view.contentY > (topMargin.height - Kirigami.Units.gridUnit) ? 0 : Kirigami.Units.gridUnit Behavior on radius { NumberAnimation { duration: Kirigami.Units.shortDuration; easing.type: Easing.InOutQuad } } diff --git a/containments/homescreens/folio/package/contents/ui/appdrawer/AppDrawerHeader.qml b/containments/homescreens/folio/package/contents/ui/appdrawer/AppDrawerHeader.qml index 321ba21a..e14ec30d 100644 --- a/containments/homescreens/folio/package/contents/ui/appdrawer/AppDrawerHeader.qml +++ b/containments/homescreens/folio/package/contents/ui/appdrawer/AppDrawerHeader.qml @@ -7,17 +7,18 @@ import QtQuick 2.12 import QtQuick.Layouts 1.1 -import org.kde.plasma.core 2.0 as PlasmaCore -import org.kde.plasma.components 3.0 as PlasmaComponents -import org.kde.plasma.extras 2.0 as PlasmaExtra +import org.kde.kirigami 2.20 as Kirigami -PlasmaCore.ColorScope { +import org.kde.plasma.components 3.0 as PlasmaComponents + +Item { id: root signal switchToListRequested() signal switchToGridRequested() - colorGroup: PlasmaCore.Theme.ComplementaryColorGroup + Kirigami.Theme.colorSet: Kirigami.Theme.Complementary + Kirigami.Theme.inherit: false // HACK: Here only to steal inputs the would normally be delivered to home MouseArea { @@ -25,13 +26,13 @@ PlasmaCore.ColorScope { } RowLayout { - anchors.topMargin: PlasmaCore.Units.smallSpacing - anchors.leftMargin: PlasmaCore.Units.largeSpacing - anchors.rightMargin: PlasmaCore.Units.largeSpacing + anchors.topMargin: Kirigami.Units.smallSpacing + anchors.leftMargin: Kirigami.Units.gridUnit + anchors.rightMargin: Kirigami.Units.gridUnit anchors.fill: parent - spacing: PlasmaCore.Units.smallSpacing + spacing: Kirigami.Units.smallSpacing - PlasmaExtra.Heading { + Kirigami.Heading { color: "white" level: 1 text: i18n("Applications") @@ -40,14 +41,14 @@ PlasmaCore.ColorScope { Item { Layout.fillWidth: true } PlasmaComponents.ToolButton { icon.name: "view-list-symbolic" - implicitWidth: Math.round(PlasmaCore.Units.gridUnit * 2.1) - implicitHeight: Math.round(PlasmaCore.Units.gridUnit * 2.1) + implicitWidth: Math.round(Kirigami.Units.gridUnit * 2.1) + implicitHeight: Math.round(Kirigami.Units.gridUnit * 2.1) onClicked: root.switchToListRequested() } PlasmaComponents.ToolButton { icon.name: "view-grid-symbolic" - implicitWidth: Math.round(PlasmaCore.Units.gridUnit * 2.1) - implicitHeight: Math.round(PlasmaCore.Units.gridUnit * 2.1) + implicitWidth: Math.round(Kirigami.Units.gridUnit * 2.1) + implicitHeight: Math.round(Kirigami.Units.gridUnit * 2.1) onClicked: root.switchToGridRequested() } } diff --git a/containments/homescreens/folio/package/contents/ui/appdrawer/AppDrawerLoader.qml b/containments/homescreens/folio/package/contents/ui/appdrawer/AppDrawerLoader.qml index 109ff5e4..9c35933b 100644 --- a/containments/homescreens/folio/package/contents/ui/appdrawer/AppDrawerLoader.qml +++ b/containments/homescreens/folio/package/contents/ui/appdrawer/AppDrawerLoader.qml @@ -9,8 +9,9 @@ import QtQuick 2.12 import QtQuick.Window 2.12 import QtQuick.Layouts 1.1 +import org.kde.kirigami 2.20 as Kirigami + import org.kde.plasma.plasmoid 2.0 -import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.components 3.0 as PlasmaComponents Loader { @@ -25,7 +26,7 @@ Loader { property string appDrawerType: "gridview" // gridview/listview - readonly property real headerHeight: Math.round(PlasmaCore.Units.gridUnit * 3) + readonly property real headerHeight: Math.round(Kirigami.Units.gridUnit * 3) sourceComponent: appDrawerType === "gridview" ? gridViewDrawer : listViewDrawer diff --git a/containments/homescreens/folio/package/contents/ui/appdrawer/DrawerGridDelegate.qml b/containments/homescreens/folio/package/contents/ui/appdrawer/DrawerGridDelegate.qml index d147faa9..d54b94f0 100644 --- a/containments/homescreens/folio/package/contents/ui/appdrawer/DrawerGridDelegate.qml +++ b/containments/homescreens/folio/package/contents/ui/appdrawer/DrawerGridDelegate.qml @@ -9,6 +9,8 @@ import QtQuick.Layouts 1.1 import QtQuick.Controls 2.3 as Controls import Qt5Compat.GraphicalEffects +import org.kde.kirigami 2.20 as Kirigami + import org.kde.plasma.plasmoid 2.0 import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.components 3.0 as PlasmaComponents @@ -35,7 +37,7 @@ MouseArea { if (model.applicationRunning) { delegate.launch(0, 0, "", model.applicationName, model.applicationStorageId); } else { - delegate.launch(delegate.x + (PlasmaCore.Units.smallSpacing * 2), delegate.y + (PlasmaCore.Units.smallSpacing * 2), icon.source, model.applicationName, model.applicationStorageId); + delegate.launch(delegate.x + (Kirigami.Units.smallSpacing * 2), delegate.y + (Kirigami.Units.smallSpacing * 2), icon.source, model.applicationName, model.applicationStorageId); } } @@ -124,7 +126,7 @@ MouseArea { } visible: model.applicationRunning radius: width - width: PlasmaCore.Units.smallSpacing + width: Kirigami.Units.smallSpacing height: width color: theme.highlightColor } @@ -144,9 +146,9 @@ MouseArea { Layout.fillWidth: true Layout.preferredHeight: delegate.reservedSpaceForLabel - Layout.topMargin: PlasmaCore.Units.smallSpacing - Layout.leftMargin: -parent.anchors.leftMargin + PlasmaCore.Units.smallSpacing - Layout.rightMargin: -parent.anchors.rightMargin + PlasmaCore.Units.smallSpacing + Layout.topMargin: Kirigami.Units.smallSpacing + Layout.leftMargin: -parent.anchors.leftMargin + Kirigami.Units.smallSpacing + Layout.rightMargin: -parent.anchors.rightMargin + Kirigami.Units.smallSpacing wrapMode: Text.WordWrap maximumLineCount: 2 diff --git a/containments/homescreens/folio/package/contents/ui/appdrawer/DrawerListDelegate.qml b/containments/homescreens/folio/package/contents/ui/appdrawer/DrawerListDelegate.qml index ec85b924..f6dbbd0f 100644 --- a/containments/homescreens/folio/package/contents/ui/appdrawer/DrawerListDelegate.qml +++ b/containments/homescreens/folio/package/contents/ui/appdrawer/DrawerListDelegate.qml @@ -10,6 +10,8 @@ import QtQuick.Layouts 1.1 import QtQuick.Controls 2.3 as Controls import Qt5Compat.GraphicalEffects +import org.kde.kirigami 2.20 as Kirigami + import org.kde.plasma.plasmoid 2.0 import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.components 3.0 as PlasmaComponents @@ -37,7 +39,7 @@ MouseArea { if (model.applicationRunning) { delegate.launch(0, 0, "", model.applicationName, model.applicationStorageId); } else { - delegate.launch(delegate.x + (PlasmaCore.Units.smallSpacing * 2), delegate.y + (PlasmaCore.Units.smallSpacing * 2), icon.source, model.applicationName, model.applicationStorageId); + delegate.launch(delegate.x + (Kirigami.Units.smallSpacing * 2), delegate.y + (Kirigami.Units.smallSpacing * 2), icon.source, model.applicationName, model.applicationStorageId); } } hoverEnabled: true @@ -46,17 +48,17 @@ MouseArea { anchors.fill: parent color: delegate.pressed ? Qt.rgba(255, 255, 255, 0.2) : (delegate.containsMouse ? Qt.rgba(255, 255, 255, 0.05) : "transparent") Behavior on color { - ColorAnimation { duration: PlasmaCore.Units.shortDuration } + ColorAnimation { duration: Kirigami.Units.shortDuration } } } RowLayout { anchors { fill: parent - leftMargin: PlasmaCore.Units.smallSpacing * 2 - topMargin: PlasmaCore.Units.smallSpacing - rightMargin: PlasmaCore.Units.smallSpacing * 2 - bottomMargin: PlasmaCore.Units.smallSpacing + leftMargin: Kirigami.Units.smallSpacing * 2 + topMargin: Kirigami.Units.smallSpacing + rightMargin: Kirigami.Units.smallSpacing * 2 + bottomMargin: Kirigami.Units.smallSpacing } spacing: 0 @@ -79,7 +81,7 @@ MouseArea { } visible: model.applicationRunning radius: width - width: PlasmaCore.Units.smallSpacing + width: Kirigami.Units.smallSpacing height: width color: theme.highlightColor } @@ -91,8 +93,8 @@ MouseArea { Layout.fillWidth: true wrapMode: Text.WordWrap - Layout.leftMargin: PlasmaCore.Units.smallSpacing * 2 - Layout.rightMargin: PlasmaCore.Units.largeSpacing + Layout.leftMargin: Kirigami.Units.smallSpacing * 2 + Layout.rightMargin: Kirigami.Units.gridUnit maximumLineCount: 1 elide: Text.ElideRight diff --git a/containments/homescreens/folio/package/contents/ui/appdrawer/GridViewAppDrawer.qml b/containments/homescreens/folio/package/contents/ui/appdrawer/GridViewAppDrawer.qml index d80bdab0..e3973ebc 100644 --- a/containments/homescreens/folio/package/contents/ui/appdrawer/GridViewAppDrawer.qml +++ b/containments/homescreens/folio/package/contents/ui/appdrawer/GridViewAppDrawer.qml @@ -10,9 +10,7 @@ import QtQuick.Layouts 1.1 import QtQuick.Controls 2.15 as Controls import org.kde.plasma.plasmoid 2.0 -import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.components 3.0 as PC3 -import org.kde.plasma.extras 2.0 as PlasmaExtra import org.kde.kirigami 2.10 as Kirigami import org.kde.plasma.private.mobileshell 1.0 as MobileShell @@ -39,7 +37,7 @@ AbstractAppDrawer { leftMargin: horizontalMargin rightMargin: horizontalMargin - cellWidth: effectiveContentWidth / Math.min(Math.floor(effectiveContentWidth / (PlasmaCore.Units.iconSizes.huge + Kirigami.Units.largeSpacing * 2)), 8) + cellWidth: effectiveContentWidth / Math.min(Math.floor(effectiveContentWidth / (Kirigami.Units.iconSizes.huge + Kirigami.Units.gridUnit * 2)), 8) cellHeight: cellWidth + root.reservedSpaceForLabel readonly property int columns: Math.floor(effectiveContentWidth / cellWidth) @@ -89,11 +87,11 @@ AbstractAppDrawer { enabled: true Behavior on opacity { OpacityAnimator { - duration: PlasmaCore.Units.longDuration * 2 + duration: Kirigami.Units.longDuration * 2 easing.type: Easing.InOutQuad } } - implicitWidth: PlasmaCore.Units.smallSpacing + implicitWidth: Kirigami.Units.smallSpacing contentItem: Rectangle { radius: width/2 color: Qt.rgba(1, 1, 1, 0.3) diff --git a/containments/homescreens/folio/package/contents/ui/appdrawer/ListViewAppDrawer.qml b/containments/homescreens/folio/package/contents/ui/appdrawer/ListViewAppDrawer.qml index b14eb58e..5c5db8ad 100644 --- a/containments/homescreens/folio/package/contents/ui/appdrawer/ListViewAppDrawer.qml +++ b/containments/homescreens/folio/package/contents/ui/appdrawer/ListViewAppDrawer.qml @@ -10,9 +10,7 @@ import QtQuick.Layouts 1.1 import QtQuick.Controls 2.15 as Controls import org.kde.plasma.plasmoid 2.0 -import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.components 3.0 as PC3 -import org.kde.plasma.extras 2.0 as PlasmaExtra import org.kde.kirigami 2.10 as Kirigami import org.kde.plasma.private.mobileshell 1.0 as MobileShell @@ -31,7 +29,7 @@ AbstractAppDrawer { interactive: root.homeScreenState.appDrawerInteractive - property int delegateHeight: PlasmaCore.Units.gridUnit * 3 + property int delegateHeight: Kirigami.Units.gridUnit * 3 model: Folio.ApplicationListModel @@ -75,11 +73,11 @@ AbstractAppDrawer { enabled: true Behavior on opacity { OpacityAnimator { - duration: PlasmaCore.Units.longDuration * 2 + duration: Kirigami.Units.longDuration * 2 easing.type: Easing.InOutQuad } } - implicitWidth: PlasmaCore.Units.smallSpacing + implicitWidth: Kirigami.Units.smallSpacing contentItem: Rectangle { radius: width/2 color: Qt.rgba(1, 1, 1, 0.3) diff --git a/containments/homescreens/folio/package/contents/ui/main.qml b/containments/homescreens/folio/package/contents/ui/main.qml index be4d6f8b..bc1a572a 100644 --- a/containments/homescreens/folio/package/contents/ui/main.qml +++ b/containments/homescreens/folio/package/contents/ui/main.qml @@ -9,8 +9,9 @@ import QtQuick 2.15 import QtQuick.Window 2.15 import QtQuick.Layouts 1.1 +import org.kde.kirigami 2.20 as Kirigami + import org.kde.plasma.plasmoid 2.0 -import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.components 3.0 as PlasmaComponents import org.kde.plasma.private.mobileshell 1.0 as MobileShell @@ -59,7 +60,7 @@ ContainmentItem { id: homeScreen onResetHomeScreenPosition: { - folioHomeScreen.homeScreenState.animateGoToPageIndex(0, PlasmaCore.Units.longDuration); + folioHomeScreen.homeScreenState.animateGoToPageIndex(0, Kirigami.Units.longDuration); folioHomeScreen.homeScreenState.closeAppDrawer(); } diff --git a/containments/homescreens/folio/package/contents/ui/private/ActionButton.qml b/containments/homescreens/folio/package/contents/ui/private/ActionButton.qml index 21003c2c..0afc7eb9 100644 --- a/containments/homescreens/folio/package/contents/ui/private/ActionButton.qml +++ b/containments/homescreens/folio/package/contents/ui/private/ActionButton.qml @@ -8,6 +8,7 @@ import QtQuick 2.0 import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.ksvg 1.0 as KSvg +import org.kde.kirigami 2.20 as Kirigami PlasmaCore.ToolTipArea { id: button @@ -21,7 +22,7 @@ PlasmaCore.ToolTipArea { property alias elementId: icon.elementId property QtObject action property bool backgroundVisible: false - property int iconSize: PlasmaCore.Units.iconSizes.large + property int iconSize: Kirigami.Units.iconSizes.large property int pressedOffset: 1 property bool checked: false property bool toggle: false @@ -37,7 +38,7 @@ PlasmaCore.ToolTipArea { Behavior on opacity { NumberAnimation { - duration: PlasmaCore.Units.longDuration + duration: Kirigami.Units.longDuration easing.type: Easing.InOutQuad } } @@ -95,7 +96,7 @@ PlasmaCore.ToolTipArea { id: actionText text: button.text style: Text.Outline - color: PlasmaCore.Theme.textColor + color: Kirigami.Theme.textColor styleColor: Qt.rgba(1,1,1,0.4) anchors.verticalCenter: parent.verticalCenter } diff --git a/containments/homescreens/folio/package/contents/ui/private/ConfigOverlay.qml b/containments/homescreens/folio/package/contents/ui/private/ConfigOverlay.qml index da8d8807..e1eb2bc8 100644 --- a/containments/homescreens/folio/package/contents/ui/private/ConfigOverlay.qml +++ b/containments/homescreens/folio/package/contents/ui/private/ConfigOverlay.qml @@ -7,8 +7,9 @@ import QtQuick 2.12 import QtQuick.Layouts 1.1 +import org.kde.kirigami 2.20 as Kirigami + import org.kde.plasma.plasmoid 2.0 -import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.components 3.0 as PlasmaComponents import org.kde.ksvg 1.0 as KSvg @@ -21,7 +22,7 @@ ContainmentLayoutManager.ConfigOverlayWithHandles { signal requestRemoveTrigger signal requestEditModeClose - readonly property int iconSize: PlasmaCore.Units.iconSizes.medium + readonly property int iconSize: Kirigami.Units.iconSizes.medium KSvg.Svg { id: configIconsSvg imagePath: "widgets/configuration-icons" @@ -45,7 +46,7 @@ ContainmentLayoutManager.ConfigOverlayWithHandles { property: "scale" from: 1 to: 0 - duration: PlasmaCore.Units.longDuration + duration: Kirigami.Units.longDuration easing.type: Easing.InOutQuad } ScriptAction { @@ -65,7 +66,7 @@ ContainmentLayoutManager.ConfigOverlayWithHandles { RowLayout { id: layout - spacing: PlasmaCore.Units.largeSpacing + spacing: Kirigami.Units.gridUnit anchors { fill: parent topMargin: parent.margins.top diff --git a/containments/homescreens/folio/package/contents/ui/private/DelegateRemoveButton.qml b/containments/homescreens/folio/package/contents/ui/private/DelegateRemoveButton.qml index 71fdaf90..b6e5f2db 100644 --- a/containments/homescreens/folio/package/contents/ui/private/DelegateRemoveButton.qml +++ b/containments/homescreens/folio/package/contents/ui/private/DelegateRemoveButton.qml @@ -9,8 +9,9 @@ import QtQuick.Layouts 1.1 import QtQuick.Controls 2.3 as Controls import Qt5Compat.GraphicalEffects +import org.kde.kirigami 2.20 as Kirigami + import org.kde.plasma.plasmoid 2.0 -import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.components 3.0 as PC3 import org.kde.kquickcontrolsaddons 2.0 @@ -54,7 +55,7 @@ PC3.RoundButton { property: "scale" from: 1 to: 0 - duration: PlasmaCore.Units.longDuration + duration: Kirigami.Units.longDuration easing.type: Easing.InOutQuad } ScriptAction { @@ -70,7 +71,7 @@ PC3.RoundButton { id: removeButtonScaleAnim target: removeButton property: "scale" - duration: PlasmaCore.Units.longDuration + duration: Kirigami.Units.longDuration easing.type: Easing.InOutQuad } ScriptAction { diff --git a/containments/homescreens/folio/package/contents/ui/private/GradientBar.qml b/containments/homescreens/folio/package/contents/ui/private/GradientBar.qml index 630aa332..ea3a7823 100644 --- a/containments/homescreens/folio/package/contents/ui/private/GradientBar.qml +++ b/containments/homescreens/folio/package/contents/ui/private/GradientBar.qml @@ -5,12 +5,12 @@ */ import QtQuick 2.15 -import org.kde.plasma.core 2.0 as PlasmaCore +import org.kde.kirigami 2.20 as Kirigami Item { Behavior on opacity { OpacityAnimator { - duration: PlasmaCore.Units.longDuration * 2 + duration: Kirigami.Units.longDuration * 2 easing.type: Easing.InOutQuad } } @@ -20,8 +20,8 @@ Item { left: parent.left right: parent.right bottom: parent.bottom - leftMargin: PlasmaCore.Units.gridUnit + root.leftPadding - rightMargin: PlasmaCore.Units.gridUnit + root.rightPadding + leftMargin: Kirigami.Units.gridUnit + root.leftPadding + rightMargin: Kirigami.Units.gridUnit + root.rightPadding } height: 1 gradient: Gradient { diff --git a/containments/homescreens/folio/package/contents/ui/private/OpenDrawerButton.qml b/containments/homescreens/folio/package/contents/ui/private/OpenDrawerButton.qml index 55eeb3ed..e917f31b 100644 --- a/containments/homescreens/folio/package/contents/ui/private/OpenDrawerButton.qml +++ b/containments/homescreens/folio/package/contents/ui/private/OpenDrawerButton.qml @@ -9,8 +9,9 @@ import QtQuick.Window 2.12 import QtQuick.Layouts 1.1 import Qt5Compat.GraphicalEffects +import org.kde.kirigami 2.20 as Kirigami + import org.kde.plasma.plasmoid 2.0 -import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.components 3.0 as PlasmaComponents import org.kde.draganddrop 2.0 as DragDrop @@ -24,7 +25,7 @@ MouseArea { property real factor: 0 cursorShape: Qt.PointingHandCursor - height: PlasmaCore.Units.iconSizes.smallMedium + height: Kirigami.Units.iconSizes.smallMedium signal openRequested signal closeRequested @@ -35,7 +36,7 @@ MouseArea { Item { anchors.centerIn: parent - width: PlasmaCore.Units.iconSizes.smallMedium + width: Kirigami.Units.iconSizes.smallMedium height: width Rectangle { diff --git a/containments/homescreens/folio/package/contents/ui/private/ScrollIndicator.qml b/containments/homescreens/folio/package/contents/ui/private/ScrollIndicator.qml index 71394156..56dc3e72 100644 --- a/containments/homescreens/folio/package/contents/ui/private/ScrollIndicator.qml +++ b/containments/homescreens/folio/package/contents/ui/private/ScrollIndicator.qml @@ -6,8 +6,8 @@ import QtQuick 2.4 import Qt5Compat.GraphicalEffects -import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.ksvg 1.0 as KSvg +import org.kde.kirigami 2.20 as Kirigami KSvg.SvgItem { id: scrollIndicator @@ -18,10 +18,10 @@ KSvg.SvgItem { opacity: 0 svg: KSvg.Svg { imagePath: "widgets/arrows" - colorGroup: PlasmaCore.Theme.ComplementaryColorGroup + colorGroup: Kirigami.Theme.ComplementaryColorGroup } elementId: "left-arrow" - width: PlasmaCore.Units.iconSizes.large + width: Kirigami.Units.iconSizes.large height: width layer.enabled: true layer.effect: DropShadow { @@ -34,7 +34,7 @@ KSvg.SvgItem { } Behavior on opacity { OpacityAnimator { - duration: PlasmaCore.Units.longDuration * 2 + duration: Kirigami.Units.longDuration * 2 easing.type: Easing.InOutQuad } } diff --git a/containments/homescreens/halcyon/package/contents/ui/Clock.qml b/containments/homescreens/halcyon/package/contents/ui/Clock.qml index 24c39611..96b43220 100644 --- a/containments/homescreens/halcyon/package/contents/ui/Clock.qml +++ b/containments/homescreens/halcyon/package/contents/ui/Clock.qml @@ -5,8 +5,8 @@ import QtQuick import QtQuick.Layouts import QtQuick.Controls -import org.kde.plasma.core as PlasmaCore import org.kde.plasma.plasma5support 2.0 as P5Support +import org.kde.kirigami 2.20 as Kirigami import org.kde.plasma.private.mobileshell as MobileShell @@ -36,7 +36,7 @@ ColumnLayout { } Label { - Layout.topMargin: PlasmaCore.Units.smallSpacing + Layout.topMargin: Kirigami.Units.smallSpacing Layout.fillWidth: true horizontalAlignment: Text.AlignLeft diff --git a/containments/homescreens/halcyon/package/contents/ui/FavoritesAppDelegate.qml b/containments/homescreens/halcyon/package/contents/ui/FavoritesAppDelegate.qml index c9720fdb..502d7c35 100644 --- a/containments/homescreens/halcyon/package/contents/ui/FavoritesAppDelegate.qml +++ b/containments/homescreens/halcyon/package/contents/ui/FavoritesAppDelegate.qml @@ -8,7 +8,6 @@ import QtQuick.Effects import org.kde.plasma.core as PlasmaCore import org.kde.plasma.components 3.0 as PlasmaComponents -import org.kde.plasma.extras 2.0 as PlasmaExtras import org.kde.kquickcontrolsaddons 2.0 import org.kde.plasma.private.containmentlayoutmanager 1.0 as ContainmentLayoutManager @@ -71,7 +70,7 @@ Item { if (application.running) { launchAppWithAnim(0, 0, "", applicationName, applicationStorageId); } else { - launchAppWithAnim(delegate.x + (PlasmaCore.Units.smallSpacing * 2), delegate.y + (PlasmaCore.Units.smallSpacing * 2), delegate.applicationIcon, applicationName, applicationStorageId); + launchAppWithAnim(delegate.x + (Kirigami.Units.smallSpacing * 2), delegate.y + (Kirigami.Units.smallSpacing * 2), delegate.applicationIcon, applicationName, applicationStorageId); } } } @@ -198,10 +197,10 @@ Item { id: rowLayout anchors { fill: parent - leftMargin: PlasmaCore.Units.smallSpacing * 2 - topMargin: PlasmaCore.Units.smallSpacing - rightMargin: PlasmaCore.Units.smallSpacing * 2 - bottomMargin: PlasmaCore.Units.smallSpacing + leftMargin: Kirigami.Units.smallSpacing * 2 + topMargin: Kirigami.Units.smallSpacing + rightMargin: Kirigami.Units.smallSpacing * 2 + bottomMargin: Kirigami.Units.smallSpacing } spacing: 0 @@ -222,15 +221,15 @@ Item { textFormat: Text.MarkdownText Layout.fillWidth: true - Layout.leftMargin: PlasmaCore.Units.smallSpacing * 2 - Layout.rightMargin: PlasmaCore.Units.largeSpacing + Layout.leftMargin: Kirigami.Units.smallSpacing * 2 + Layout.rightMargin: Kirigami.Units.gridUnit wrapMode: Text.WordWrap maximumLineCount: 1 elide: Text.ElideRight text: delegate.isFolder ? delegate.folderName : delegate.applicationName - font.pointSize: PlasmaCore.Theme.defaultFont.pointSize + font.pointSize: Kirigami.Theme.defaultFont.pointSize font.weight: Font.Bold color: "white" @@ -265,9 +264,9 @@ Item { Item { Rectangle { anchors.fill: parent - anchors.margins: PlasmaCore.Units.smallSpacing + anchors.margins: Kirigami.Units.smallSpacing color: Qt.rgba(255, 255, 255, 0.2) - radius: PlasmaCore.Units.smallSpacing + radius: Kirigami.Units.smallSpacing opacity: delegate.dragFolderAnimationProgress } @@ -291,9 +290,9 @@ Item { } visible: application ? application.running : false radius: width - width: PlasmaCore.Units.smallSpacing + width: Kirigami.Units.smallSpacing height: width - color: PlasmaCore.Theme.highlightColor + color: Kirigami.Theme.highlightColor } layer.enabled: true @@ -314,9 +313,9 @@ Item { Rectangle { id: rect anchors.fill: parent - anchors.margins: PlasmaCore.Units.smallSpacing + anchors.margins: Kirigami.Units.smallSpacing color: Qt.rgba(255, 255, 255, 0.2) - radius: PlasmaCore.Units.smallSpacing + radius: Kirigami.Units.smallSpacing transform: Scale { origin.x: rect.width / 2 @@ -329,17 +328,17 @@ Item { Grid { id: grid anchors.fill: parent - anchors.margins: PlasmaCore.Units.smallSpacing * 2 + anchors.margins: Kirigami.Units.smallSpacing * 2 columns: 2 - spacing: PlasmaCore.Units.smallSpacing + spacing: Kirigami.Units.smallSpacing property var previews: model.folder.appPreviews Repeater { model: grid.previews delegate: Kirigami.Icon { - implicitWidth: (grid.width - PlasmaCore.Units.smallSpacing) / 2 - implicitHeight: (grid.width - PlasmaCore.Units.smallSpacing) / 2 + implicitWidth: (grid.width - Kirigami.Units.smallSpacing) / 2 + implicitHeight: (grid.width - Kirigami.Units.smallSpacing) / 2 source: modelData.icon layer.enabled: true diff --git a/containments/homescreens/halcyon/package/contents/ui/FavoritesGrid.qml b/containments/homescreens/halcyon/package/contents/ui/FavoritesGrid.qml index cf3740c1..7a99ac2a 100644 --- a/containments/homescreens/halcyon/package/contents/ui/FavoritesGrid.qml +++ b/containments/homescreens/halcyon/package/contents/ui/FavoritesGrid.qml @@ -6,8 +6,6 @@ import QtQuick.Controls as QQC2 import QtQuick.Layouts import QtQml.Models -import org.kde.plasma.core as PlasmaCore -import org.kde.plasma.extras as PlasmaExtras import org.kde.plasma.components 3.0 as PC3 import org.kde.draganddrop as DragDrop @@ -60,7 +58,7 @@ MobileShell.GridView { header: MobileShell.BaseItem { topPadding: Math.round(root.height * 0.2) - bottomPadding: PlasmaCore.Units.largeSpacing + bottomPadding: Kirigami.Units.gridUnit // leftPadding: root.leftMargin // rightPadding: root.rightMargin implicitWidth: root.width @@ -261,7 +259,7 @@ MobileShell.GridView { ColumnLayout { id: placeholder - spacing: PlasmaCore.Units.gridUnit + spacing: Kirigami.Units.gridUnit visible: root.count == 0 opacity: 0.9 @@ -276,13 +274,13 @@ MobileShell.GridView { Kirigami.Icon { id: icon Layout.alignment: Qt.AlignBottom | Qt.AlignHCenter - implicitWidth: PlasmaCore.Units.iconSizes.large + implicitWidth: Kirigami.Units.iconSizes.large implicitHeight: width source: "arrow-left" color: "white" } - PlasmaExtras.Heading { + Kirigami.Heading { Layout.fillWidth: true Layout.maximumWidth: placeholder.width * 0.75 Layout.alignment: Qt.AlignTop | Qt.AlignHCenter diff --git a/containments/homescreens/halcyon/package/contents/ui/FavoritesView.qml b/containments/homescreens/halcyon/package/contents/ui/FavoritesView.qml index 5f9113cf..2758326b 100644 --- a/containments/homescreens/halcyon/package/contents/ui/FavoritesView.qml +++ b/containments/homescreens/halcyon/package/contents/ui/FavoritesView.qml @@ -6,8 +6,6 @@ import QtQuick.Controls 2.15 as QQC2 import QtQuick.Layouts 1.1 import QtQml.Models 2.15 -import org.kde.plasma.core 2.0 as PlasmaCore -import org.kde.plasma.extras 2.0 as PlasmaExtras import org.kde.plasma.components 3.0 as PC3 import org.kde.draganddrop 2.0 as DragDrop @@ -22,7 +20,7 @@ Item { required property bool interactive required property var searchWidget - readonly property real twoColumnThreshold: PlasmaCore.Units.gridUnit * 16 + readonly property real twoColumnThreshold: Kirigami.Units.gridUnit * 16 readonly property bool twoColumn: root.width / 2 > twoColumnThreshold readonly property real cellWidth: twoColumn ? (root.width - leftMargin - rightMargin) / 2 : (root.width - leftMargin - rightMargin) @@ -30,7 +28,7 @@ Item { readonly property real leftMargin: Math.round(width * 0.1) readonly property real rightMargin: Math.round(width * 0.1) - readonly property real delegateHeight: Math.round(PlasmaCore.Units.gridUnit * 3) + readonly property real delegateHeight: Math.round(Kirigami.Units.gridUnit * 3) property bool folderShown: false @@ -85,7 +83,7 @@ Item { root.openFolder(); } - property real translateX: openFolderProgress * -PlasmaCore.Units.gridUnit + property real translateX: openFolderProgress * -Kirigami.Units.gridUnit transform: Translate { x: favoritesGrid.translateX } opacity: 1 - openFolderProgress visible: opacity !== 0 @@ -115,7 +113,7 @@ Item { onOpenConfigureRequested: root.openConfigureRequested() onCloseRequested: root.closeFolder() - property real translateX: (1 - openProgress) * PlasmaCore.Units.gridUnit + property real translateX: (1 - openProgress) * Kirigami.Units.gridUnit transform: Translate { x: folderGrid.translateX } opacity: openProgress visible: opacity !== 0 @@ -136,7 +134,7 @@ Item { // when dragged onTranslationChanged: { - let moveAmount = Math.max(0, translation.x) / (PlasmaCore.Units.gridUnit * 5); + let moveAmount = Math.max(0, translation.x) / (Kirigami.Units.gridUnit * 5); folderGrid.openProgress = 1 - Math.min(1, Math.max(0, moveAmount)); isClosing = translation.x > oldTranslationX; oldTranslationX = translation.x; diff --git a/containments/homescreens/halcyon/package/contents/ui/FolderGrid.qml b/containments/homescreens/halcyon/package/contents/ui/FolderGrid.qml index c9eaf223..2196cafb 100644 --- a/containments/homescreens/halcyon/package/contents/ui/FolderGrid.qml +++ b/containments/homescreens/halcyon/package/contents/ui/FolderGrid.qml @@ -7,8 +7,6 @@ import QtQuick.Layouts import QtQuick.Effects import QtQml.Models -import org.kde.plasma.core as PlasmaCore -import org.kde.plasma.extras as PlasmaExtras import org.kde.plasma.components 3.0 as PC3 import org.kde.draganddrop as DragDrop @@ -37,7 +35,7 @@ MobileShell.GridView { header: MobileShell.BaseItem { topPadding: Math.round(root.height * 0.2) - bottomPadding: PlasmaCore.Units.largeSpacing + bottomPadding: Kirigami.Units.gridUnit leftPadding: 0 rightPadding: 0 implicitWidth: root.width @@ -109,14 +107,14 @@ MobileShell.GridView { contentItem: RowLayout { id: rowLayout - spacing: PlasmaCore.Units.smallSpacing * 2 + spacing: Kirigami.Units.smallSpacing * 2 // close folder button MouseArea { id: button Layout.alignment: Qt.AlignVCenter - implicitHeight: PlasmaCore.Units.iconSizes.small + PlasmaCore.Units.largeSpacing - implicitWidth: PlasmaCore.Units.iconSizes.small + PlasmaCore.Units.largeSpacing + implicitHeight: Kirigami.Units.iconSizes.small + Kirigami.Units.gridUnit + implicitWidth: Kirigami.Units.iconSizes.small + Kirigami.Units.gridUnit cursorShape: Qt.PointingHandCursor onClicked: root.closeRequested() @@ -131,8 +129,8 @@ MobileShell.GridView { // button icon Kirigami.Icon { anchors.centerIn: parent - implicitHeight: PlasmaCore.Units.iconSizes.small - implicitWidth: PlasmaCore.Units.iconSizes.small + implicitHeight: Kirigami.Units.iconSizes.small + implicitWidth: Kirigami.Units.iconSizes.small isMask: true color: 'white' source: 'arrow-left' diff --git a/containments/homescreens/halcyon/package/contents/ui/GridAppDelegate.qml b/containments/homescreens/halcyon/package/contents/ui/GridAppDelegate.qml index 079656f3..e7861bf8 100644 --- a/containments/homescreens/halcyon/package/contents/ui/GridAppDelegate.qml +++ b/containments/homescreens/halcyon/package/contents/ui/GridAppDelegate.qml @@ -11,7 +11,6 @@ import QtQuick.Controls as Controls import org.kde.plasma.core as PlasmaCore import org.kde.plasma.components 3.0 as PlasmaComponents -import org.kde.plasma.extras as PlasmaExtras import org.kde.kquickcontrolsaddons import org.kde.plasma.private.mobileshell as MobileShell @@ -48,7 +47,7 @@ MouseArea { if (application.running) { delegate.launch(0, 0, "", application.name, application.storageId); } else { - delegate.launch(delegate.x + (PlasmaCore.Units.smallSpacing * 2), delegate.y + (PlasmaCore.Units.smallSpacing * 2), icon.source, application.name, application.storageId); + delegate.launch(delegate.x + (Kirigami.Units.smallSpacing * 2), delegate.y + (Kirigami.Units.smallSpacing * 2), icon.source, application.name, application.storageId); } } @@ -155,7 +154,7 @@ MouseArea { } visible: application.running radius: width - width: PlasmaCore.Units.smallSpacing + width: Kirigami.Units.smallSpacing height: width color: theme.highlightColor } @@ -181,9 +180,9 @@ MouseArea { Layout.fillWidth: true Layout.preferredHeight: delegate.reservedSpaceForLabel - Layout.topMargin: PlasmaCore.Units.smallSpacing - Layout.leftMargin: -parent.anchors.leftMargin + PlasmaCore.Units.smallSpacing - Layout.rightMargin: -parent.anchors.rightMargin + PlasmaCore.Units.smallSpacing + Layout.topMargin: Kirigami.Units.smallSpacing + Layout.leftMargin: -parent.anchors.leftMargin + Kirigami.Units.smallSpacing + Layout.rightMargin: -parent.anchors.rightMargin + Kirigami.Units.smallSpacing wrapMode: Text.WordWrap maximumLineCount: 2 diff --git a/containments/homescreens/halcyon/package/contents/ui/GridAppList.qml b/containments/homescreens/halcyon/package/contents/ui/GridAppList.qml index e43832df..6c957898 100644 --- a/containments/homescreens/halcyon/package/contents/ui/GridAppList.qml +++ b/containments/homescreens/halcyon/package/contents/ui/GridAppList.qml @@ -7,9 +7,7 @@ import QtQuick 2.15 import QtQuick.Layouts 1.1 import QtQuick.Controls 2.15 as Controls -import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.components 3.0 as PC3 -import org.kde.plasma.extras 2.0 as PlasmaExtras import org.kde.kirigami 2.10 as Kirigami import org.kde.plasma.private.mobileshell 1.0 as MobileShell @@ -37,7 +35,7 @@ MobileShell.GridView { readonly property int reservedSpaceForLabel: metrics.height readonly property real effectiveContentWidth: width - leftMargin - rightMargin - cellWidth: gridView.effectiveContentWidth / Math.min(Math.floor(effectiveContentWidth / (PlasmaCore.Units.iconSizes.huge + Kirigami.Units.largeSpacing * 2)), 8) + cellWidth: gridView.effectiveContentWidth / Math.min(Math.floor(effectiveContentWidth / (Kirigami.Units.iconSizes.huge + Kirigami.Units.gridUnit * 2)), 8) cellHeight: cellWidth + reservedSpaceForLabel property int columns: Math.floor(effectiveContentWidth / cellWidth) @@ -58,9 +56,9 @@ MobileShell.GridView { header: MobileShell.BaseItem { implicitWidth: gridView.effectiveContentWidth - topPadding: PlasmaCore.Units.largeSpacing + Math.round(gridView.height * 0.1) - bottomPadding: PlasmaCore.Units.largeSpacing - leftPadding: PlasmaCore.Units.smallSpacing + topPadding: Kirigami.Units.gridUnit + Math.round(gridView.height * 0.1) + bottomPadding: Kirigami.Units.gridUnit + leftPadding: Kirigami.Units.smallSpacing contentItem: PC3.Label { color: "white" @@ -74,7 +72,7 @@ MobileShell.GridView { id: metrics text: "M\nM" visible: false - font.pointSize: PlasmaCore.Theme.defaultFont.pointSize * 0.85 + font.pointSize: Kirigami.Theme.defaultFont.pointSize * 0.85 font.weight: Font.Bold } diff --git a/containments/homescreens/halcyon/package/contents/ui/HomeScreen.qml b/containments/homescreens/halcyon/package/contents/ui/HomeScreen.qml index baf4d804..1fd6c79c 100644 --- a/containments/homescreens/halcyon/package/contents/ui/HomeScreen.qml +++ b/containments/homescreens/halcyon/package/contents/ui/HomeScreen.qml @@ -7,8 +7,6 @@ import QtQuick.Layouts import QtQuick.Window import org.kde.plasma.plasmoid -import org.kde.plasma.core as PlasmaCore -import org.kde.plasma.extras as PlasmaExtras import org.kde.plasma.components 3.0 as PC3 import org.kde.draganddrop as DragDrop diff --git a/containments/homescreens/halcyon/package/contents/ui/main.qml b/containments/homescreens/halcyon/package/contents/ui/main.qml index 3e8b94cd..fc4585b4 100644 --- a/containments/homescreens/halcyon/package/contents/ui/main.qml +++ b/containments/homescreens/halcyon/package/contents/ui/main.qml @@ -6,8 +6,8 @@ import QtQuick.Window import QtQuick.Layouts import org.kde.plasma.plasmoid -import org.kde.plasma.core as PlasmaCore import org.kde.plasma.components 3.0 as PlasmaComponents +import org.kde.kirigami 2.20 as Kirigami import org.kde.plasma.private.mobileshell as MobileShell import org.kde.plasma.private.mobileshell.state as MobileShellState @@ -57,7 +57,7 @@ ContainmentItem { anchors.fill: parent z: -1 Behavior on color { - ColorAnimation { duration: PlasmaCore.Units.longDuration } + ColorAnimation { duration: Kirigami.Units.longDuration } } } diff --git a/containments/panel/package/contents/ui/main.qml b/containments/panel/package/contents/ui/main.qml index 2575bee8..bf8975e3 100644 --- a/containments/panel/package/contents/ui/main.qml +++ b/containments/panel/package/contents/ui/main.qml @@ -32,7 +32,7 @@ ContainmentItem { Binding { target: Plasmoid.Window.window // assumed to be plasma-workspace "PanelView" component property: "thickness" - value: PlasmaCore.Units.gridUnit + PlasmaCore.Units.smallSpacing + value: Kirigami.Units.gridUnit + Kirigami.Units.smallSpacing } //BEGIN API implementation @@ -78,7 +78,7 @@ ContainmentItem { anchors.fill: parent showDropShadow: !root.showingApp - colorGroup: root.showingApp ? PlasmaCore.Theme.HeaderColorGroup : PlasmaCore.Theme.ComplementaryColorGroup + colorGroup: root.showingApp ? Kirigami.Theme.HeaderColorGroup : Kirigami.Theme.ComplementaryColorGroup backgroundColor: !root.showingApp ? "transparent" : root.backgroundColor } diff --git a/containments/taskpanel/package/contents/ui/NavigationPanelComponent.qml b/containments/taskpanel/package/contents/ui/NavigationPanelComponent.qml index 895f1a41..21703f8d 100644 --- a/containments/taskpanel/package/contents/ui/NavigationPanelComponent.qml +++ b/containments/taskpanel/package/contents/ui/NavigationPanelComponent.qml @@ -6,7 +6,6 @@ import QtQuick.Layouts import QtQuick.Window import org.kde.plasma.plasmoid -import org.kde.plasma.core as PlasmaCore import org.kde.plasma.workspace.keyboardlayout as Keyboards import org.kde.plasma.private.mobileshell as MobileShell @@ -22,8 +21,8 @@ MobileShell.NavigationPanel { // - opaque if an app is shown or vkbd is shown // - translucent if the task switcher is open // - transparent if on the homescreen - backgroundColor: (Keyboards.KWinVirtualKeyboard.visible || opaqueBar) ? PlasmaCore.ColorScope.backgroundColor : "transparent"; - foregroundColorGroup: opaqueBar ? PlasmaCore.Theme.NormalColorGroup : PlasmaCore.Theme.ComplementaryColorGroup + backgroundColor: (Keyboards.KWinVirtualKeyboard.visible || opaqueBar) ? Kirigami.Theme.backgroundColor : "transparent"; + foregroundColorGroup: opaqueBar ? Kirigami.Theme.Window : Kirigami.Theme.ComplementaryColorGroup shadow: !opaqueBar TaskManager.VirtualDesktopInfo { diff --git a/containments/taskpanel/package/contents/ui/main.qml b/containments/taskpanel/package/contents/ui/main.qml index a8fda4ef..531e95ac 100644 --- a/containments/taskpanel/package/contents/ui/main.qml +++ b/containments/taskpanel/package/contents/ui/main.qml @@ -6,6 +6,8 @@ import QtQuick 2.4 import QtQuick.Layouts 1.1 import QtQuick.Window 2.15 +import org.kde.kirigami 2.20 as Kirigami + import org.kde.taskmanager 0.1 as TaskManager import org.kde.plasma.plasmoid 2.0 import org.kde.plasma.core 2.0 as PlasmaCore @@ -35,7 +37,7 @@ ContainmentItem { readonly property bool inLandscape: Screen.width > Screen.height; readonly property bool isInLandscapeNavPanelMode: inLandscape && ShellSettings.Settings.navigationPanelEnabled - readonly property real navigationPanelHeight: PlasmaCore.Units.gridUnit * 2 + readonly property real navigationPanelHeight: Kirigami.Units.gridUnit * 2 readonly property real intendedWindowThickness: navigationPanelHeight readonly property real intendedWindowLength: isInLandscapeNavPanelMode ? Screen.height : Screen.width @@ -105,11 +107,12 @@ ContainmentItem { // only opaque if there are no maximized windows on this screen readonly property bool opaqueBar: WindowPlugin.WindowMaximizedTracker.showingWindow - PlasmaCore.ColorScope { + Item { anchors.fill: parent // contrasting colour - colorGroup: opaqueBar ? PlasmaCore.Theme.NormalColorGroup : PlasmaCore.Theme.ComplementaryColorGroup + Kirigami.Theme.colorSet: opaqueBar ? Kirigami.Theme.Window : Kirigami.Theme.Complementary + Kirigami.Theme.inherit: false // load appropriate system navigation component Loader { diff --git a/initialstart/modules/cellular/package/contents/ui/main.qml b/initialstart/modules/cellular/package/contents/ui/main.qml index 5855613f..c7ddbad8 100644 --- a/initialstart/modules/cellular/package/contents/ui/main.qml +++ b/initialstart/modules/cellular/package/contents/ui/main.qml @@ -33,7 +33,7 @@ Item { anchors { fill: parent topMargin: Kirigami.Units.gridUnit - bottomMargin: Kirigami.Units.largeSpacing + bottomMargin: Kirigami.Units.gridUnit } width: root.width spacing: Kirigami.Units.gridUnit diff --git a/initialstart/modules/prepare/package/contents/ui/main.qml b/initialstart/modules/prepare/package/contents/ui/main.qml index 7518eb80..be8aeaf8 100644 --- a/initialstart/modules/prepare/package/contents/ui/main.qml +++ b/initialstart/modules/prepare/package/contents/ui/main.qml @@ -6,7 +6,6 @@ import QtQuick.Controls 2.15 import QtQuick.Layouts 1.15 import org.kde.kirigami 2.20 as Kirigami -import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.kirigamiaddons.labs.mobileform 0.1 as MobileForm import org.kde.plasma.mobileinitialstart.prepare 1.0 as Prepare import org.kde.plasma.plasma5support 2.0 as P5Support diff --git a/initialstart/modules/time/package/contents/ui/main.qml b/initialstart/modules/time/package/contents/ui/main.qml index 1f151bd1..05a3f752 100644 --- a/initialstart/modules/time/package/contents/ui/main.qml +++ b/initialstart/modules/time/package/contents/ui/main.qml @@ -6,7 +6,6 @@ import QtQuick.Controls 2.15 import QtQuick.Layouts 1.15 import org.kde.kirigami 2.20 as Kirigami -import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.kirigamiaddons.labs.mobileform 0.1 as MobileForm import org.kde.plasma.mobileinitialstart.time 1.0 as Time @@ -20,7 +19,7 @@ Item { anchors { fill: parent topMargin: Kirigami.Units.gridUnit - bottomMargin: Kirigami.Units.largeSpacing + bottomMargin: Kirigami.Units.gridUnit } width: root.width @@ -78,10 +77,10 @@ Item { header: Control { width: listView.width - leftPadding: Kirigami.Units.largeSpacing - rightPadding: Kirigami.Units.largeSpacing - topPadding: Kirigami.Units.largeSpacing - bottomPadding: Kirigami.Units.largeSpacing + leftPadding: Kirigami.Units.gridUnit + rightPadding: Kirigami.Units.gridUnit + topPadding: Kirigami.Units.gridUnit + bottomPadding: Kirigami.Units.gridUnit contentItem: Kirigami.SearchField { id: searchField diff --git a/initialstart/modules/wifi/package/contents/ui/ConnectDialog.qml b/initialstart/modules/wifi/package/contents/ui/ConnectDialog.qml index 5947abff..e5c376de 100644 --- a/initialstart/modules/wifi/package/contents/ui/ConnectDialog.qml +++ b/initialstart/modules/wifi/package/contents/ui/ConnectDialog.qml @@ -43,7 +43,7 @@ Kirigami.PromptDialog { ColumnLayout { id: column - spacing: Kirigami.Units.largeSpacing + spacing: Kirigami.Units.gridUnit PasswordField { id: passwordField diff --git a/initialstart/modules/wifi/package/contents/ui/ConnectionItemDelegate.qml b/initialstart/modules/wifi/package/contents/ui/ConnectionItemDelegate.qml index af0d9776..f8a3b9ad 100644 --- a/initialstart/modules/wifi/package/contents/ui/ConnectionItemDelegate.qml +++ b/initialstart/modules/wifi/package/contents/ui/ConnectionItemDelegate.qml @@ -6,7 +6,6 @@ import QtQuick 2.15 import QtQuick.Layouts 1.15 import QtQuick.Controls 2.15 as Controls -import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.networkmanagement 0.2 as PlasmaNM import org.kde.kirigami 2.2 as Kirigami import org.kde.kirigamiaddons.labs.mobileform 0.1 as MobileForm @@ -48,7 +47,7 @@ MobileForm.AbstractFormDelegate { } contentItem: RowLayout { - spacing: Kirigami.Units.largeSpacing + spacing: Kirigami.Units.gridUnit Item { Layout.preferredWidth: Kirigami.Units.gridUnit @@ -61,7 +60,7 @@ MobileForm.AbstractFormDelegate { svg: KSvg.Svg { multipleImages: true imagePath: "icons/network" - colorGroup: PlasmaCore.ColorScope.colorGroup + colorSet: Kirigami.Theme.colorSet } } diff --git a/initialstart/modules/wifi/package/contents/ui/main.qml b/initialstart/modules/wifi/package/contents/ui/main.qml index aaeb18e5..7ae6af64 100644 --- a/initialstart/modules/wifi/package/contents/ui/main.qml +++ b/initialstart/modules/wifi/package/contents/ui/main.qml @@ -7,7 +7,6 @@ import QtQuick.Controls 2.15 import QtQuick.Layouts 1.15 import org.kde.kirigami 2.20 as Kirigami -import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.kirigamiaddons.labs.mobileform 0.1 as MobileForm import org.kde.plasma.networkmanagement 0.2 as PlasmaNM import org.kde.plasma.mobileinitialstart.wifi 1.0 as WiFi @@ -54,7 +53,7 @@ Item { ColumnLayout { anchors.fill: parent anchors.topMargin: Kirigami.Units.gridUnit - anchors.bottomMargin: Kirigami.Units.largeSpacing + anchors.bottomMargin: Kirigami.Units.gridUnit width: root.width spacing: Kirigami.Units.gridUnit @@ -95,7 +94,7 @@ Item { Kirigami.PlaceholderMessage { anchors.centerIn: parent - width: parent.width - (Kirigami.Units.largeSpacing * 4) + width: parent.width - (Kirigami.Units.gridUnit * 4) visible: !enabledConnections.wirelessEnabled text: i18n("Wi-Fi is disabled") icon.name: "network-wireless-disconnected" diff --git a/initialstart/qml/LandingComponent.qml b/initialstart/qml/LandingComponent.qml index 39955e68..12a2f6e4 100644 --- a/initialstart/qml/LandingComponent.qml +++ b/initialstart/qml/LandingComponent.qml @@ -67,7 +67,7 @@ Item { ColumnLayout { opacity: root.contentOpacity - spacing: Kirigami.Units.largeSpacing + spacing: Kirigami.Units.gridUnit anchors.verticalCenter: parent.verticalCenter anchors.left: parent.left @@ -93,8 +93,8 @@ Item { anchors.right: parent.right anchors.margins: Kirigami.Units.gridUnit - topPadding: Kirigami.Units.largeSpacing - bottomPadding: Kirigami.Units.largeSpacing + topPadding: Kirigami.Units.gridUnit + bottomPadding: Kirigami.Units.gridUnit leftPadding: Kirigami.Units.gridUnit rightPadding: Kirigami.Units.gridUnit diff --git a/initialstart/qml/Wizard.qml b/initialstart/qml/Wizard.qml index 84a6329c..c1db3031 100644 --- a/initialstart/qml/Wizard.qml +++ b/initialstart/qml/Wizard.qml @@ -5,7 +5,6 @@ import QtQuick 2.15 import QtQuick.Controls 2.15 import QtQuick.Layouts 1.15 -import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.kirigami 2.20 as Kirigami import org.kde.plasma.private.mobileshell 1.0 as MobileShell @@ -123,7 +122,7 @@ Kirigami.Page { height: Kirigami.Units.gridUnit * 1.25 - colorGroup: PlasmaCore.Theme.ComplementaryColorGroup + colorGroup: Kirigami.Theme.ComplementaryColorGroup backgroundColor: "transparent" showSecondRow: false @@ -287,8 +286,8 @@ Kirigami.Page { Layout.leftMargin: Kirigami.Units.gridUnit Layout.bottomMargin: Kirigami.Units.gridUnit - topPadding: Kirigami.Units.largeSpacing - bottomPadding: Kirigami.Units.largeSpacing + topPadding: Kirigami.Units.gridUnit + bottomPadding: Kirigami.Units.gridUnit leftPadding: Kirigami.Units.gridUnit rightPadding: Kirigami.Units.gridUnit @@ -305,8 +304,8 @@ Kirigami.Page { Layout.rightMargin: Kirigami.Units.gridUnit Layout.bottomMargin: Kirigami.Units.gridUnit - topPadding: Kirigami.Units.largeSpacing - bottomPadding: Kirigami.Units.largeSpacing + topPadding: Kirigami.Units.gridUnit + bottomPadding: Kirigami.Units.gridUnit leftPadding: Kirigami.Units.gridUnit rightPadding: Kirigami.Units.gridUnit @@ -322,8 +321,8 @@ Kirigami.Page { Layout.rightMargin: Kirigami.Units.gridUnit Layout.bottomMargin: Kirigami.Units.gridUnit - topPadding: Kirigami.Units.largeSpacing - bottomPadding: Kirigami.Units.largeSpacing + topPadding: Kirigami.Units.gridUnit + bottomPadding: Kirigami.Units.gridUnit leftPadding: Kirigami.Units.gridUnit rightPadding: Kirigami.Units.gridUnit diff --git a/kcms/cellularnetwork/ui/AvailableNetworks.qml b/kcms/cellularnetwork/ui/AvailableNetworks.qml index 5c5d3170..790723bf 100644 --- a/kcms/cellularnetwork/ui/AvailableNetworks.qml +++ b/kcms/cellularnetwork/ui/AvailableNetworks.qml @@ -25,7 +25,7 @@ Kirigami.ScrollablePage { MessagesList { visible: count != 0 Layout.fillWidth: true - Layout.margins: Kirigami.Units.largeSpacing + Layout.margins: Kirigami.Units.gridUnit model: kcm.messages } } diff --git a/kcms/cellularnetwork/ui/MessagesList.qml b/kcms/cellularnetwork/ui/MessagesList.qml index a77487c4..31a3d509 100644 --- a/kcms/cellularnetwork/ui/MessagesList.qml +++ b/kcms/cellularnetwork/ui/MessagesList.qml @@ -23,7 +23,7 @@ ColumnLayout { model: root.model delegate: Kirigami.InlineMessage { - Layout.bottomMargin: Kirigami.Units.largeSpacing + Layout.bottomMargin: Kirigami.Units.gridUnit Layout.fillWidth: true visible: true text: modelData.message diff --git a/kcms/cellularnetwork/ui/ModemPage.qml b/kcms/cellularnetwork/ui/ModemPage.qml index 56f36bd9..68eb6478 100644 --- a/kcms/cellularnetwork/ui/ModemPage.qml +++ b/kcms/cellularnetwork/ui/ModemPage.qml @@ -60,7 +60,7 @@ Kirigami.ScrollablePage { MobileForm.FormCard { Layout.fillWidth: true - Layout.topMargin: Kirigami.Units.largeSpacing + Layout.topMargin: Kirigami.Units.gridUnit contentItem: ColumnLayout { spacing: 0 diff --git a/kcms/cellularnetwork/ui/PopupDialog.qml b/kcms/cellularnetwork/ui/PopupDialog.qml index 4045b2df..7a414716 100644 --- a/kcms/cellularnetwork/ui/PopupDialog.qml +++ b/kcms/cellularnetwork/ui/PopupDialog.qml @@ -29,7 +29,7 @@ Controls.Dialog { header: Item { transform: Translate { y: dialog.translateY } - implicitHeight: heading.implicitHeight + Kirigami.Units.largeSpacing * 2 + implicitHeight: heading.implicitHeight + Kirigami.Units.gridUnit * 2 Kirigami.Heading { id: heading @@ -38,7 +38,7 @@ Controls.Dialog { elide: Text.ElideRight anchors.left: parent.left anchors.right: parent.right - anchors.leftMargin: Kirigami.Units.largeSpacing + anchors.leftMargin: Kirigami.Units.gridUnit anchors.verticalCenter: parent.verticalCenter // use tooltip for long text that is elided diff --git a/kcms/cellularnetwork/ui/ProfileList.qml b/kcms/cellularnetwork/ui/ProfileList.qml index 68a247ee..95a21747 100644 --- a/kcms/cellularnetwork/ui/ProfileList.qml +++ b/kcms/cellularnetwork/ui/ProfileList.qml @@ -21,7 +21,7 @@ Kirigami.ScrollablePage { anchors.centerIn: parent anchors.left: parent.left anchors.right: parent.right - anchors.margins: Kirigami.Units.largeSpacing + anchors.margins: Kirigami.Units.gridUnit visible: profileListView.count === 0 text: i18n("No APNs configured") icon.name: "globe" @@ -52,14 +52,14 @@ Kirigami.ScrollablePage { id: messagesList visible: count != 0 Layout.fillWidth: true - Layout.margins: Kirigami.Units.largeSpacing + Layout.margins: Kirigami.Units.gridUnit model: kcm.messages } Kirigami.InlineMessage { id: cannotFindWarning - Layout.margins: visible ? Kirigami.Units.largeSpacing : 0 - Layout.topMargin: visible && !messagesList.visible ? Kirigami.Units.largeSpacing : 0 + Layout.margins: visible ? Kirigami.Units.gridUnit : 0 + Layout.topMargin: visible && !messagesList.visible ? Kirigami.Units.gridUnit : 0 Layout.fillWidth: true visible: false diff --git a/kcms/cellularnetwork/ui/SimLockPage.qml b/kcms/cellularnetwork/ui/SimLockPage.qml index 88fdc042..950e5469 100644 --- a/kcms/cellularnetwork/ui/SimLockPage.qml +++ b/kcms/cellularnetwork/ui/SimLockPage.qml @@ -28,7 +28,7 @@ Kirigami.ScrollablePage { MessagesList { Layout.fillWidth: true - Layout.margins: Kirigami.Units.largeSpacing + Layout.margins: Kirigami.Units.gridUnit model: kcm.messages } @@ -92,8 +92,8 @@ Kirigami.ScrollablePage { } Kirigami.Separator { - Layout.leftMargin: Kirigami.Units.largeSpacing - Layout.rightMargin: Kirigami.Units.largeSpacing + Layout.leftMargin: Kirigami.Units.gridUnit + Layout.rightMargin: Kirigami.Units.gridUnit Layout.fillWidth: true opacity: (!disableSimLockButton.controlHovered && !changePinButton.controlHovered) ? 0.5 : 0 } @@ -118,7 +118,7 @@ Kirigami.ScrollablePage { id: unlockPinDialog title: i18n("Unlock SIM") standardButtons: Controls.Dialog.Ok | Controls.Dialog.Cancel - padding: Kirigami.Units.largeSpacing + padding: Kirigami.Units.gridUnit onAccepted: sim.sendPin(unlockPinCurPin.text) @@ -138,7 +138,7 @@ Kirigami.ScrollablePage { id: changePinDialog title: i18n("Change SIM PIN") standardButtons: isValid ? Controls.Dialog.Ok | Controls.Dialog.Cancel : Controls.Dialog.Cancel - padding: Kirigami.Units.largeSpacing + padding: Kirigami.Units.gridUnit property bool isValid: changePinNewPin.text == changePinConfirmPin.text && changePinNewPin.text.length >= 4 && changePinNewPin.text.length <= 8 // SIM PINs are between 4-8 digits @@ -186,7 +186,7 @@ Kirigami.ScrollablePage { id: removePinDialog title: i18n("Remove SIM PIN") standardButtons: Controls.Dialog.Ok | Controls.Dialog.Cancel - padding: Kirigami.Units.largeSpacing + padding: Kirigami.Units.gridUnit onAccepted: sim.togglePinEnabled(removePinCurPin.text); @@ -203,7 +203,7 @@ Kirigami.ScrollablePage { id: createPinDialog title: i18n("Add SIM PIN") standardButtons: isValid ? Controls.Dialog.Ok | Controls.Dialog.Cancel : Controls.Dialog.Cancel - padding: Kirigami.Units.largeSpacing + padding: Kirigami.Units.gridUnit property bool isValid: createPinNewPin.text == createPinConfirmPin.text && createPinNewPin.text.length >= 4 && createPinNewPin.text.length <= 8 // SIM PINs are between 4-8 digits diff --git a/kcms/cellularnetwork/ui/SimPage.qml b/kcms/cellularnetwork/ui/SimPage.qml index 59857101..fbd9be6f 100644 --- a/kcms/cellularnetwork/ui/SimPage.qml +++ b/kcms/cellularnetwork/ui/SimPage.qml @@ -47,8 +47,8 @@ Kirigami.ScrollablePage { Kirigami.InlineMessage { Layout.fillWidth: true - Layout.margins: Kirigami.Units.largeSpacing - Layout.bottomMargin: visible && !messagesList.visible ? Kirigami.Units.largeSpacing : 0 + Layout.margins: Kirigami.Units.gridUnit + Layout.bottomMargin: visible && !messagesList.visible ? Kirigami.Units.gridUnit : 0 visible: !simEnabled type: Kirigami.MessageType.Error text: qsTr("This SIM slot is empty, a SIM card needs to be inserted in order for it to be used.") @@ -57,7 +57,7 @@ Kirigami.ScrollablePage { MessagesList { id: messagesList Layout.fillWidth: true - Layout.margins: Kirigami.Units.largeSpacing + Layout.margins: Kirigami.Units.gridUnit model: kcm.messages } @@ -123,7 +123,7 @@ Kirigami.ScrollablePage { MobileForm.FormCard { Layout.fillWidth: true - Layout.topMargin: Kirigami.Units.largeSpacing + Layout.topMargin: Kirigami.Units.gridUnit contentItem: ColumnLayout { spacing: 0 diff --git a/kcms/cellularnetwork/ui/main.qml b/kcms/cellularnetwork/ui/main.qml index 11b5f067..35d2cb08 100644 --- a/kcms/cellularnetwork/ui/main.qml +++ b/kcms/cellularnetwork/ui/main.qml @@ -28,7 +28,7 @@ KCM.SimpleKCM { anchors.centerIn: parent anchors.left: parent.left anchors.right: parent.right - anchors.margins: Kirigami.Units.largeSpacing + anchors.margins: Kirigami.Units.gridUnit visible: !enabledConnections.wwanHwEnabled || !availableDevices.modemDeviceAvailable || !kcm.modemFound icon.name: "auth-sim-missing" @@ -59,7 +59,7 @@ KCM.SimpleKCM { MessagesList { Layout.fillWidth: true - Layout.margins: Kirigami.Units.largeSpacing + Layout.margins: Kirigami.Units.gridUnit model: kcm.messages } @@ -124,7 +124,7 @@ KCM.SimpleKCM { MobileForm.FormCard { Layout.fillWidth: true - Layout.topMargin: Kirigami.Units.largeSpacing + Layout.topMargin: Kirigami.Units.gridUnit contentItem: ColumnLayout { spacing: 0 @@ -142,8 +142,8 @@ KCM.SimpleKCM { Kirigami.Separator { visible: model.index !== 0 - Layout.leftMargin: Kirigami.Units.largeSpacing - Layout.rightMargin: Kirigami.Units.largeSpacing + Layout.leftMargin: Kirigami.Units.gridUnit + Layout.rightMargin: Kirigami.Units.gridUnit Layout.fillWidth: true opacity: (!(model.index && repeater.itemAt(model.index - 1).controlHovered) && !simDelegate.controlHovered) ? 0.5 : 0 } diff --git a/kcms/hotspot/ui/main.qml b/kcms/hotspot/ui/main.qml index 7c866d66..a5661348 100644 --- a/kcms/hotspot/ui/main.qml +++ b/kcms/hotspot/ui/main.qml @@ -57,7 +57,7 @@ SimpleKCM { MobileForm.FormCard { Layout.fillWidth: true - Layout.topMargin: Kirigami.Units.largeSpacing + Layout.topMargin: Kirigami.Units.gridUnit contentItem: ColumnLayout { spacing: 0 diff --git a/kcms/info/ui/main.qml b/kcms/info/ui/main.qml index dc110e50..3655e6a0 100644 --- a/kcms/info/ui/main.qml +++ b/kcms/info/ui/main.qml @@ -57,7 +57,7 @@ KCM.SimpleKCM { MobileForm.FormCard { Layout.fillWidth: true - Layout.topMargin: Kirigami.Units.largeSpacing + Layout.topMargin: Kirigami.Units.gridUnit contentItem: ColumnLayout { spacing: 0 @@ -103,7 +103,7 @@ KCM.SimpleKCM { MobileForm.FormCard { Layout.fillWidth: true - Layout.topMargin: Kirigami.Units.largeSpacing + Layout.topMargin: Kirigami.Units.gridUnit contentItem: ColumnLayout { spacing: 0 diff --git a/kcms/mobileshell/ui/QuickSettingsForm.qml b/kcms/mobileshell/ui/QuickSettingsForm.qml index 1a2a226a..fbd5257c 100644 --- a/kcms/mobileshell/ui/QuickSettingsForm.qml +++ b/kcms/mobileshell/ui/QuickSettingsForm.qml @@ -31,7 +31,7 @@ Kirigami.ScrollablePage { contentItem: RowLayout { Kirigami.ListItemDragHandle { visible: qsDelegate.isEnabled - Layout.rightMargin: Kirigami.Units.largeSpacing + Layout.rightMargin: Kirigami.Units.gridUnit listItem: qsDelegate listView: qsDelegate.parent ? qsDelegate.parent.parentView : null onMoveRequested: savedQuickSettings.enabledModel.moveRow(oldIndex, newIndex) @@ -42,7 +42,7 @@ Kirigami.ScrollablePage { visible: iconAvailable source: model ? model.icon : "" - Layout.rightMargin: iconAvailable ? Kirigami.Units.largeSpacing : 0 + Layout.rightMargin: iconAvailable ? Kirigami.Units.gridUnit : 0 implicitWidth: iconAvailable ? Kirigami.Units.iconSizes.small : 0 implicitHeight: iconAvailable ? Kirigami.Units.iconSizes.small : 0 } diff --git a/kcms/mobileshell/ui/main.qml b/kcms/mobileshell/ui/main.qml index c7ab6448..f0e083d5 100644 --- a/kcms/mobileshell/ui/main.qml +++ b/kcms/mobileshell/ui/main.qml @@ -60,7 +60,7 @@ KCM.SimpleKCM { MobileForm.FormCard { Layout.fillWidth: true - Layout.topMargin: Kirigami.Units.largeSpacing + Layout.topMargin: Kirigami.Units.gridUnit contentItem: ColumnLayout { spacing: 0 @@ -85,7 +85,7 @@ KCM.SimpleKCM { MobileForm.FormCard { Layout.fillWidth: true - Layout.topMargin: Kirigami.Units.largeSpacing + Layout.topMargin: Kirigami.Units.gridUnit contentItem: ColumnLayout { spacing: 0 @@ -109,7 +109,7 @@ KCM.SimpleKCM { MobileForm.FormCard { Layout.fillWidth: true - Layout.topMargin: Kirigami.Units.largeSpacing + Layout.topMargin: Kirigami.Units.gridUnit contentItem: ColumnLayout { id: parentCol diff --git a/kcms/powermanagement/ui/BatteryPage.qml b/kcms/powermanagement/ui/BatteryPage.qml index eb89a9cb..f9e4d094 100644 --- a/kcms/powermanagement/ui/BatteryPage.qml +++ b/kcms/powermanagement/ui/BatteryPage.qml @@ -10,7 +10,6 @@ import QtQuick.Layouts 1.11 import org.kde.kirigami 2.10 as Kirigami import org.kde.plasma.components 3.0 as PlasmaComponents -import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.kcmutils import org.kde.kirigamiaddons.labs.mobileform 0.1 as MobileForm import org.kde.kcm.power.mobile.private 1.0 @@ -91,7 +90,7 @@ Kirigami.ScrollablePage { MobileForm.FormCard { Layout.fillWidth: true - Layout.topMargin: Kirigami.Units.largeSpacing + Layout.topMargin: Kirigami.Units.gridUnit contentItem: ColumnLayout { spacing: 0 diff --git a/kcms/powermanagement/ui/main.qml b/kcms/powermanagement/ui/main.qml index b511b0aa..584b5891 100644 --- a/kcms/powermanagement/ui/main.qml +++ b/kcms/powermanagement/ui/main.qml @@ -13,7 +13,6 @@ import QtQuick.Layouts 1.11 import org.kde.kirigami 2.10 as Kirigami import org.kde.plasma.components 3.0 as PlasmaComponents -import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.kcmutils import org.kde.kirigamiaddons.labs.mobileform 0.1 as MobileForm import org.kde.kcm.power.mobile.private 1.0 @@ -54,7 +53,7 @@ SimpleKCM { Kirigami.Icon { implicitWidth: Kirigami.Units.iconSizes.smallMedium implicitHeight: Kirigami.Units.iconSizes.smallMedium - Layout.rightMargin: Kirigami.Units.largeSpacing + Layout.rightMargin: Kirigami.Units.gridUnit source: { switch (model.battery.type) { case 3: return model.battery.chargeState === 1 ? "battery-full-charging" : "battery-full" @@ -120,7 +119,7 @@ SimpleKCM { MobileForm.FormCard { Layout.fillWidth: true - Layout.topMargin: Kirigami.Units.largeSpacing + Layout.topMargin: Kirigami.Units.gridUnit contentItem: ColumnLayout { spacing: 0 diff --git a/kcms/time/ui/TimePicker.qml b/kcms/time/ui/TimePicker.qml index 86c255fb..7d8044ef 100644 --- a/kcms/time/ui/TimePicker.qml +++ b/kcms/time/ui/TimePicker.qml @@ -42,7 +42,7 @@ Item { duration: 250 } NumberAnimation { - //duration: PlasmaCore.Units.longDuration + //duration: Kirigami.Units.longDuration duration: 250 easing.type: Easing.InOutQuad } diff --git a/kcms/time/ui/main.qml b/kcms/time/ui/main.qml index a98d1441..361d7ffb 100644 --- a/kcms/time/ui/main.qml +++ b/kcms/time/ui/main.qml @@ -79,7 +79,7 @@ SimpleKCM { } MobileForm.FormCard { - Layout.topMargin: Kirigami.Units.largeSpacing + Layout.topMargin: Kirigami.Units.gridUnit Layout.fillWidth: true contentItem: ColumnLayout { diff --git a/kcms/virtualkeyboard/ui/main.qml b/kcms/virtualkeyboard/ui/main.qml index 9be432c6..3a4dda34 100644 --- a/kcms/virtualkeyboard/ui/main.qml +++ b/kcms/virtualkeyboard/ui/main.qml @@ -48,7 +48,7 @@ KCM.SimpleKCM { } MobileForm.FormCard { - Layout.topMargin: Kirigami.Units.largeSpacing + Layout.topMargin: Kirigami.Units.gridUnit Layout.fillWidth: true contentItem: ColumnLayout { @@ -79,7 +79,7 @@ KCM.SimpleKCM { } MobileForm.FormCard { - Layout.topMargin: Kirigami.Units.largeSpacing + Layout.topMargin: Kirigami.Units.gridUnit Layout.fillWidth: true contentItem: ColumnLayout { diff --git a/kcms/wifi/ui/ConnectDialog.qml b/kcms/wifi/ui/ConnectDialog.qml index a7f7ca9f..b8e2edda 100644 --- a/kcms/wifi/ui/ConnectDialog.qml +++ b/kcms/wifi/ui/ConnectDialog.qml @@ -103,7 +103,7 @@ Controls.Dialog { header: Item { transform: Translate { y: dialogRoot.translateY } - implicitHeight: heading.implicitHeight + Kirigami.Units.largeSpacing * 2 + implicitHeight: heading.implicitHeight + Kirigami.Units.gridUnit * 2 Kirigami.Heading { id: heading @@ -112,7 +112,7 @@ Controls.Dialog { wrapMode: Text.WordWrap anchors.left: parent.left anchors.right: parent.right - anchors.leftMargin: Kirigami.Units.largeSpacing + anchors.leftMargin: Kirigami.Units.gridUnit anchors.verticalCenter: parent.verticalCenter } } @@ -122,7 +122,7 @@ Controls.Dialog { ColumnLayout { id: column transform: Translate { y: dialogRoot.translateY } - spacing: Kirigami.Units.largeSpacing + spacing: Kirigami.Units.gridUnit PasswordField { id: passwordField diff --git a/kcms/wifi/ui/ConnectionItemDelegate.qml b/kcms/wifi/ui/ConnectionItemDelegate.qml index 7be15ba7..dd26b6d9 100644 --- a/kcms/wifi/ui/ConnectionItemDelegate.qml +++ b/kcms/wifi/ui/ConnectionItemDelegate.qml @@ -7,7 +7,6 @@ import QtQuick 2.6 import QtQuick.Layouts 1.2 import QtQuick.Controls 2.2 as Controls -import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.networkmanagement 0.2 as PlasmaNM import org.kde.kirigami 2.2 as Kirigami import org.kde.ksvg 1.0 as KSvg @@ -24,8 +23,8 @@ Kirigami.SwipeListItem { SecurityType == PlasmaNM.Enums.SAE) RowLayout { - anchors.leftMargin: Kirigami.Units.largeSpacing * 5 - spacing: Kirigami.Units.largeSpacing + anchors.leftMargin: Kirigami.Units.gridUnit * 5 + spacing: Kirigami.Units.gridUnit Kirigami.Separator {} Item { @@ -39,7 +38,7 @@ Kirigami.SwipeListItem { svg: KSvg.Svg { multipleImages: true imagePath: "icons/network" - colorGroup: PlasmaCore.ColorScope.colorGroup + colorSet: Kirigami.Theme.colorSet } } diff --git a/kcms/wifi/ui/main.qml b/kcms/wifi/ui/main.qml index 722bae63..64164cff 100644 --- a/kcms/wifi/ui/main.qml +++ b/kcms/wifi/ui/main.qml @@ -77,7 +77,7 @@ ScrollViewKCM { Kirigami.PlaceholderMessage { anchors.centerIn: parent - width: parent.width - (Kirigami.Units.largeSpacing * 4) + width: parent.width - (Kirigami.Units.gridUnit * 4) visible: !enabledConnections.wirelessEnabled text: i18n("Wi-Fi is disabled") icon.name: "network-wireless-disconnected" diff --git a/kwin/mobiletaskswitcher/qml/Task.qml b/kwin/mobiletaskswitcher/qml/Task.qml index b168774c..6e642131 100644 --- a/kwin/mobiletaskswitcher/qml/Task.qml +++ b/kwin/mobiletaskswitcher/qml/Task.qml @@ -6,6 +6,7 @@ import QtQuick import QtQuick.Layouts import Qt5Compat.GraphicalEffects +import org.kde.kirigami 2.20 as Kirigami import org.kde.plasma.core as PlasmaCore import org.kde.plasma.components 3.0 as PlasmaComponents import org.kde.kwin 3.0 as KWinComponents @@ -112,7 +113,7 @@ Item { // run animation when finger lets go if (!pressed) { - if (control.movingUp && control.y < -PlasmaCore.Units.gridUnit * 2) { + if (control.movingUp && control.y < -Kirigami.Units.gridUnit * 2) { yAnimator.to = -root.height; } else { yAnimator.to = 0; @@ -134,7 +135,7 @@ Item { NumberAnimation on y { id: yAnimator running: !control.pressed - duration: PlasmaCore.Units.longDuration + duration: Kirigami.Units.longDuration easing.type: Easing.InOutQuad to: 0 onFinished: { @@ -157,16 +158,16 @@ Item { Layout.fillWidth: true Layout.fillHeight: true Layout.minimumHeight: column.height - appView.height - spacing: PlasmaCore.Units.smallSpacing * 2 + spacing: Kirigami.Units.smallSpacing * 2 opacity: delegate.showHeader ? 1 : 0 Behavior on opacity { - NumberAnimation { duration: PlasmaCore.Units.shortDuration } + NumberAnimation { duration: Kirigami.Units.shortDuration } } PlasmaCore.IconItem { - Layout.preferredHeight: PlasmaCore.Units.iconSizes.smallMedium - Layout.preferredWidth: PlasmaCore.Units.iconSizes.smallMedium + Layout.preferredHeight: Kirigami.Units.iconSizes.smallMedium + Layout.preferredWidth: Kirigami.Units.iconSizes.smallMedium Layout.alignment: Qt.AlignVCenter usesPlasmaTheme: false source: delegate.window.icon @@ -184,8 +185,8 @@ Item { Layout.alignment: Qt.AlignVCenter z: 99 icon.name: "window-close" - icon.width: PlasmaCore.Units.iconSizes.smallMedium - icon.height: PlasmaCore.Units.iconSizes.smallMedium + icon.width: Kirigami.Units.iconSizes.smallMedium + icon.height: Kirigami.Units.iconSizes.smallMedium onClicked: delegate.closeApp() } } diff --git a/kwin/mobiletaskswitcher/qml/TaskList.qml b/kwin/mobiletaskswitcher/qml/TaskList.qml index 53929885..bc3ff655 100644 --- a/kwin/mobiletaskswitcher/qml/TaskList.qml +++ b/kwin/mobiletaskswitcher/qml/TaskList.qml @@ -4,7 +4,7 @@ import QtQuick import QtQuick.Layouts -import org.kde.plasma.core as PlasmaCore +import org.kde.kirigami 2.20 as Kirigami import org.kde.plasma.components 3.0 as PlasmaComponents import org.kde.kwin 3.0 as KWinComponents @@ -103,7 +103,7 @@ MouseArea { property real listX: taskSwitcherState.xPositionFromTaskIndex(currentIndex); Behavior on listX { NumberAnimation { - duration: PlasmaCore.Units.longDuration + duration: Kirigami.Units.longDuration easing.type: Easing.InOutQuad } } diff --git a/kwin/mobiletaskswitcher/qml/TaskSwitcher.qml b/kwin/mobiletaskswitcher/qml/TaskSwitcher.qml index 93d77eff..200c831d 100644 --- a/kwin/mobiletaskswitcher/qml/TaskSwitcher.qml +++ b/kwin/mobiletaskswitcher/qml/TaskSwitcher.qml @@ -5,9 +5,9 @@ import QtQuick import QtQuick.Layouts +import org.kde.kirigami 2.20 as Kirigami import org.kde.plasma.core as PlasmaCore import org.kde.plasma.components 3.0 as PlasmaComponents -import org.kde.plasma.extras as PlasmaExtras import org.kde.plasma.private.mobileshell as MobileShell import org.kde.plasma.private.mobileshell.state as MobileShellState import org.kde.plasma.private.mobileshell.shellsettingsplugin as ShellSettings @@ -66,7 +66,7 @@ FocusScope { hide(); } else if (tasksCount < oldTasksCount && taskSwitcherState.currentTaskIndex >= tasksCount - 1) { // if the user is on the last task, and it is closed, scroll left - taskSwitcherState.animateGoToTaskIndex(tasksCount - 1, PlasmaCore.Units.longDuration); + taskSwitcherState.animateGoToTaskIndex(tasksCount - 1, Kirigami.Units.longDuration); } oldTasksCount = tasksCount; @@ -146,7 +146,7 @@ FocusScope { // MobileShell.StatusBar { // id: statusBar // z: 1 - // colorGroup: PlasmaCore.Theme.ComplementaryColorGroup + // colorGroup: Kirigami.Theme.ComplementaryColorGroup // backgroundColor: "transparent" // // height: root.topMargin @@ -161,7 +161,7 @@ FocusScope { z: 1 visible: ShellSettings.Settings.navigationPanelEnabled backgroundColor: Qt.rgba(0, 0, 0, 0.1) - foregroundColorGroup: PlasmaCore.Theme.ComplementaryColorGroup + foregroundColorGroup: Kirigami.Theme.ComplementaryColorGroup shadow: false leftAction: MobileShell.NavigationPanelAction { @@ -265,7 +265,7 @@ FocusScope { // placeholder message ColumnLayout { id: placeholder - spacing: PlasmaCore.Units.gridUnit + spacing: Kirigami.Units.gridUnit opacity: (root.tasksCount === 0 && !taskSwitcherState.currentlyBeingClosed) ? 0.9 : 0 Behavior on opacity { NumberAnimation { duration: 500 } } @@ -274,13 +274,13 @@ FocusScope { PlasmaCore.IconItem { id: icon Layout.alignment: Qt.AlignHCenter - implicitWidth: PlasmaCore.Units.iconSizes.large - implicitHeight: PlasmaCore.Units.iconSizes.large + implicitWidth: Kirigami.Units.iconSizes.large + implicitHeight: Kirigami.Units.iconSizes.large source: "window" // color: "white" } - PlasmaExtras.Heading { + Kirigami.Heading { Layout.fillWidth: true Layout.maximumWidth: root.width * 0.75 Layout.alignment: Qt.AlignHCenter @@ -333,11 +333,11 @@ FocusScope { horizontalCenter: parent.horizontalCenter } - PlasmaCore.ColorScope.colorGroup: PlasmaCore.Theme.ComplementaryColorGroup - PlasmaCore.ColorScope.inherit: false + Kirigami.Theme.colorSet: Kirigami.Theme.Complementary + Kirigami.Theme.inherit: false opacity: (taskSwitcherState.currentlyBeingOpened || taskSwitcherState.currentlyBeingClosed) ? 0.0 : 1.0 - Behavior on opacity { NumberAnimation { duration: PlasmaCore.Units.shortDuration } } + Behavior on opacity { NumberAnimation { duration: Kirigami.Units.shortDuration } } icon.name: "edit-clear-history" font.bold: true diff --git a/kwin/mobiletaskswitcher/qml/TaskSwitcherState.qml b/kwin/mobiletaskswitcher/qml/TaskSwitcherState.qml index 3f594093..1b0b65e5 100644 --- a/kwin/mobiletaskswitcher/qml/TaskSwitcherState.qml +++ b/kwin/mobiletaskswitcher/qml/TaskSwitcherState.qml @@ -3,7 +3,7 @@ import QtQuick 2.15 -import org.kde.plasma.core 2.1 as PlasmaCore +import org.kde.kirigami 2.20 as Kirigami import org.kde.kwin 3.0 as KWinComponents @@ -83,10 +83,10 @@ QtObject { readonly property real taskWidth: previewWidth // spacing between each task preview - readonly property real taskSpacing: PlasmaCore.Units.largeSpacing + readonly property real taskSpacing: Kirigami.Units.gridUnit // height of the task preview header - readonly property real taskHeaderHeight: PlasmaCore.Units.gridUnit * 2 + PlasmaCore.Units.smallSpacing * 2 + readonly property real taskHeaderHeight: Kirigami.Units.gridUnit * 2 + Kirigami.Units.smallSpacing * 2 // the scaling factor of the window preview compared to the actual window // we need to ensure that window previews always fit on screen @@ -136,7 +136,7 @@ QtObject { } function openApp(index, window) { - animateGoToTaskIndex(index, PlasmaCore.Units.shortDuration); + animateGoToTaskIndex(index, Kirigami.Units.shortDuration); openAppAnim.restart(); KWinComponents.Workspace.activeClient = window } @@ -172,7 +172,7 @@ QtObject { } // update horizontal state - let duration = PlasmaCore.Units.longDuration * 2; + let duration = Kirigami.Units.longDuration * 2; if (currentlyBeingOpened) { animateGoToTaskIndex(currentTaskIndex, duration); } else { @@ -217,7 +217,7 @@ QtObject { target: root property: "yPosition" to: 0 - duration: PlasmaCore.Units.longDuration + duration: Kirigami.Units.longDuration easing.type: Easing.InOutQuad onStarted: root.currentlyBeingClosed = true diff --git a/lookandfeel/contents/lockscreen/Clock.qml b/lookandfeel/contents/lockscreen/Clock.qml index 663a07fb..e93f6844 100644 --- a/lookandfeel/contents/lockscreen/Clock.qml +++ b/lookandfeel/contents/lockscreen/Clock.qml @@ -8,7 +8,7 @@ import QtQuick 2.15 import QtQuick.Layouts 1.15 import QtQuick.Controls 2.15 -import org.kde.plasma.core 2.0 as PlasmaCore +import org.kde.kirigami 2.20 as Kirigami import org.kde.plasma.plasma5support 2.0 as P5Support import org.kde.plasma.components 3.0 as PC3 import org.kde.plasma.private.mobileshell 1.0 as MobileShell @@ -30,7 +30,7 @@ Item { ColumnLayout { id: clockColumn - spacing: PlasmaCore.Units.gridUnit + spacing: Kirigami.Units.gridUnit anchors.top: parent.top anchors.left: parent.left diff --git a/lookandfeel/contents/lockscreen/FlickContainer.qml b/lookandfeel/contents/lockscreen/FlickContainer.qml index 91ed2812..521c6ec8 100644 --- a/lookandfeel/contents/lockscreen/FlickContainer.qml +++ b/lookandfeel/contents/lockscreen/FlickContainer.qml @@ -4,7 +4,7 @@ import QtQuick 2.15 import QtQuick.Layouts 1.15 -import org.kde.plasma.core 2.1 as PlasmaCore +import org.kde.kirigami 2.20 as Kirigami Flickable { id: root @@ -42,7 +42,7 @@ Flickable { NumberAnimation on position { id: positionAnim - duration: PlasmaCore.Units.veryLongDuration + duration: Kirigami.Units.veryLongDuration easing.type: Easing.OutExpo onFinished: { diff --git a/lookandfeel/contents/lockscreen/HeaderComponent.qml b/lookandfeel/contents/lockscreen/HeaderComponent.qml index 64dbe01f..de4519b3 100644 --- a/lookandfeel/contents/lockscreen/HeaderComponent.qml +++ b/lookandfeel/contents/lockscreen/HeaderComponent.qml @@ -7,7 +7,6 @@ import QtQuick 2.12 import QtQuick.Controls 2.15 import QtQuick.Layouts 1.1 -import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.private.mobileshell 1.0 as MobileShell import org.kde.notificationmanager 1.0 as NotificationManager @@ -31,7 +30,7 @@ Item { height: root.statusBarHeight - colorGroup: PlasmaCore.Theme.ComplementaryColorGroup + colorGroup: Kirigami.Theme.ComplementaryColorGroup backgroundColor: "transparent" showSecondRow: false diff --git a/lookandfeel/contents/lockscreen/Keypad.qml b/lookandfeel/contents/lockscreen/Keypad.qml index 399b87fa..d9e707fa 100644 --- a/lookandfeel/contents/lockscreen/Keypad.qml +++ b/lookandfeel/contents/lockscreen/Keypad.qml @@ -24,23 +24,23 @@ Rectangle { property double swipeProgress // slightly translucent background, for key contrast - color: Kirigami.ColorUtils.adjustColor(PlasmaCore.Theme.backgroundColor, {"alpha": 0.9*255}) + color: Kirigami.ColorUtils.adjustColor(Kirigami.Theme.backgroundColor, {"alpha": 0.9*255}) // colour calculations - readonly property color buttonColor: Qt.lighter(PlasmaCore.Theme.backgroundColor, 1.3) - readonly property color buttonPressedColor: Qt.darker(PlasmaCore.Theme.backgroundColor, 1.08) - readonly property color buttonTextColor: PlasmaCore.Theme.textColor - readonly property color dropShadowColor: Qt.darker(PlasmaCore.Theme.backgroundColor, 1.2) - readonly property color headerBackgroundColor: Qt.lighter(PlasmaCore.Theme.backgroundColor, 1.3) + readonly property color buttonColor: Qt.lighter(Kirigami.Theme.backgroundColor, 1.3) + readonly property color buttonPressedColor: Qt.darker(Kirigami.Theme.backgroundColor, 1.08) + readonly property color buttonTextColor: Kirigami.Theme.textColor + readonly property color dropShadowColor: Qt.darker(Kirigami.Theme.backgroundColor, 1.2) + readonly property color headerBackgroundColor: Qt.lighter(Kirigami.Theme.backgroundColor, 1.3) opacity: Math.sin((Math.PI / 2) * swipeProgress + 1.5 * Math.PI) + 1 implicitHeight: { if (passwordBar.isPinMode && !Qt.inputMethod.visible) { - return PlasmaCore.Units.gridUnit * 17; + return Kirigami.Units.gridUnit * 17; } else { return Math.min(root.height - passwordBar.implicitHeight, // don't make the password bar go off the screen - PlasmaCore.Units.smallSpacing * 2 + Qt.inputMethod.keyboardRectangle.height + passwordBar.implicitHeight); + Kirigami.Units.smallSpacing * 2 + Qt.inputMethod.keyboardRectangle.height + passwordBar.implicitHeight); } } @@ -98,18 +98,18 @@ Rectangle { right: parent.right top: passwordBar.bottom bottom: parent.bottom - topMargin: PlasmaCore.Units.gridUnit - bottomMargin: PlasmaCore.Units.gridUnit + topMargin: Kirigami.Units.gridUnit + bottomMargin: Kirigami.Units.gridUnit } - spacing: PlasmaCore.Units.gridUnit + spacing: Kirigami.Units.gridUnit GridLayout { id: grid Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter - 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 + Layout.leftMargin: Kirigami.Units.gridUnit * 0.5 + Layout.rightMargin: Kirigami.Units.gridUnit * 0.5 + Layout.maximumWidth: Kirigami.Units.gridUnit * 22 + Layout.maximumHeight: Kirigami.Units.gridUnit * 12.5 opacity: (Math.sin(2*((Math.PI / 2) * keypadRoot.swipeProgress + 1.5 * Math.PI)) + 1) columns: 4 diff --git a/lookandfeel/contents/lockscreen/LockScreen.qml b/lookandfeel/contents/lockscreen/LockScreen.qml index 1cb41003..3929b3ee 100644 --- a/lookandfeel/contents/lockscreen/LockScreen.qml +++ b/lookandfeel/contents/lockscreen/LockScreen.qml @@ -56,15 +56,16 @@ Item { } } - PlasmaCore.ColorScope { + Item { anchors.fill: parent - colorGroup: PlasmaCore.Theme.ComplementaryColorGroup + Kirigami.Theme.colorSet: Kirigami.Theme.Complementary + Kirigami.Theme.inherit: false // header bar and action drawer Loader { id: headerBarLoader z: 1 // on top of flick area - readonly property real statusBarHeight: PlasmaCore.Units.gridUnit * 1.25 + readonly property real statusBarHeight: Kirigami.Units.gridUnit * 1.25 anchors.fill: parent asynchronous: true @@ -90,7 +91,7 @@ Item { } } - keypadHeight: PlasmaCore.Units.gridUnit * 20 + keypadHeight: Kirigami.Units.gridUnit * 20 // go to closed position when loaded Component.onCompleted: { @@ -165,16 +166,16 @@ Item { asynchronous: true anchors.bottom: parent.bottom - anchors.bottomMargin: PlasmaCore.Units.gridUnit + flickable.position * 0.5 + anchors.bottomMargin: Kirigami.Units.gridUnit + flickable.position * 0.5 anchors.horizontalCenter: parent.horizontalCenter sourceComponent: PlasmaCore.IconItem { id: scrollUpIcon - implicitWidth: PlasmaCore.Units.iconSizes.smallMedium - implicitHeight: PlasmaCore.Units.iconSizes.smallMedium + implicitWidth: Kirigami.Units.iconSizes.smallMedium + implicitHeight: Kirigami.Units.iconSizes.smallMedium opacity: 1 - flickable.openFactor - colorGroup: PlasmaCore.Theme.ComplementaryColorGroup + colorGroup: Kirigami.Theme.ComplementaryColorGroup source: "arrow-up" } } @@ -197,9 +198,9 @@ Item { // info notification text Label { Layout.fillWidth: true - Layout.rightMargin: Kirigami.Units.largeSpacing - Layout.leftMargin: Kirigami.Units.largeSpacing - Layout.bottomMargin: PlasmaCore.Units.smallSpacing * 2 + Layout.rightMargin: Kirigami.Units.gridUnit + Layout.leftMargin: Kirigami.Units.gridUnit + Layout.bottomMargin: Kirigami.Units.smallSpacing * 2 font.pointSize: 9 elide: Text.ElideRight @@ -216,10 +217,10 @@ Item { // scroll down icon PlasmaCore.IconItem { Layout.alignment: Qt.AlignHCenter - Layout.bottomMargin: PlasmaCore.Units.gridUnit - implicitWidth: PlasmaCore.Units.iconSizes.smallMedium - implicitHeight: PlasmaCore.Units.iconSizes.smallMedium - colorGroup: PlasmaCore.Theme.ComplementaryColorGroup + Layout.bottomMargin: Kirigami.Units.gridUnit + implicitWidth: Kirigami.Units.iconSizes.smallMedium + implicitHeight: Kirigami.Units.iconSizes.smallMedium + colorGroup: Kirigami.Theme.ComplementaryColorGroup source: "arrow-down" opacity: Math.sin((Math.PI / 2) * flickable.openFactor + 1.5 * Math.PI) + 1 } diff --git a/lookandfeel/contents/lockscreen/LockScreenNarrowContent.qml b/lookandfeel/contents/lockscreen/LockScreenNarrowContent.qml index f432b541..eb889c32 100644 --- a/lookandfeel/contents/lockscreen/LockScreenNarrowContent.qml +++ b/lookandfeel/contents/lockscreen/LockScreenNarrowContent.qml @@ -5,7 +5,7 @@ import QtQuick import QtQuick.Layouts import QtQuick.Effects -import org.kde.plasma.core 2.0 as PlasmaCore +import org.kde.kirigami 2.20 as Kirigami import org.kde.plasma.workspace.keyboardlayout 1.0 import org.kde.notificationmanager 1.1 as Notifications import org.kde.plasma.private.mobileshell 1.0 as MobileShell @@ -39,14 +39,14 @@ Loader { spacing: 0 // center clock when no notifications are shown, otherwise move the clock upward - anchors.topMargin: !root.notificationsShown ? Math.round(root.fullHeight / 2 - (column.implicitHeight / 2)) : PlasmaCore.Units.gridUnit * 5 - anchors.bottomMargin: PlasmaCore.Units.gridUnit + anchors.topMargin: !root.notificationsShown ? Math.round(root.fullHeight / 2 - (column.implicitHeight / 2)) : Kirigami.Units.gridUnit * 5 + anchors.bottomMargin: Kirigami.Units.gridUnit anchors.fill: parent // animate Behavior on anchors.topMargin { NumberAnimation { - duration: loadTimer.running ? 0 : PlasmaCore.Units.veryLongDuration + duration: loadTimer.running ? 0 : Kirigami.Units.veryLongDuration easing.type: Easing.InOutExpo } } @@ -54,15 +54,15 @@ Loader { Clock { layoutAlignment: Qt.AlignHCenter Layout.alignment: Qt.AlignHCenter - Layout.bottomMargin: PlasmaCore.Units.gridUnit * 2 // keep spacing even if media controls are gone + Layout.bottomMargin: Kirigami.Units.gridUnit * 2 // keep spacing even if media controls are gone } MobileShell.MediaControlsWidget { Layout.alignment: Qt.AlignHCenter Layout.fillWidth: true - Layout.maximumWidth: PlasmaCore.Units.gridUnit * 25 - Layout.leftMargin: PlasmaCore.Units.gridUnit - Layout.rightMargin: PlasmaCore.Units.gridUnit + Layout.maximumWidth: Kirigami.Units.gridUnit * 25 + Layout.leftMargin: Kirigami.Units.gridUnit + Layout.rightMargin: Kirigami.Units.gridUnit layer.enabled: true layer.effect: MultiEffect { @@ -70,7 +70,7 @@ Loader { shadowEnabled: true shadowVerticalOffset: 1 shadowOpacity: 0.5 - shadowColor: Qt.lighter(PlasmaCore.Theme.backgroundColor, 0.1) + shadowColor: Qt.lighter(Kirigami.Theme.backgroundColor, 0.1) } } @@ -82,8 +82,8 @@ Loader { Layout.alignment: Qt.AlignHCenter Layout.fillHeight: true Layout.fillWidth: true - Layout.maximumWidth: PlasmaCore.Units.gridUnit * (25 + 2) // clip margins - topMargin: PlasmaCore.Units.gridUnit + Layout.maximumWidth: Kirigami.Units.gridUnit * (25 + 2) // clip margins + topMargin: Kirigami.Units.gridUnit onPasswordRequested: root.passwordRequested() onNotificationsShownChanged: root.notificationsShown = notificationsShown diff --git a/lookandfeel/contents/lockscreen/LockScreenWideScreenContent.qml b/lookandfeel/contents/lockscreen/LockScreenWideScreenContent.qml index c2876321..e67594d3 100644 --- a/lookandfeel/contents/lockscreen/LockScreenWideScreenContent.qml +++ b/lookandfeel/contents/lockscreen/LockScreenWideScreenContent.qml @@ -5,7 +5,7 @@ import QtQuick import QtQuick.Layouts import QtQuick.Effects -import org.kde.plasma.core 2.0 as PlasmaCore +import org.kde.kirigami 2.20 as Kirigami import org.kde.plasma.workspace.keyboardlayout 1.0 import org.kde.notificationmanager 1.1 as Notifications import org.kde.plasma.private.mobileshell 1.0 as MobileShell @@ -29,25 +29,25 @@ Loader { top: parent.top bottom: parent.bottom left: parent.left - leftMargin: PlasmaCore.Units.gridUnit * 3 + leftMargin: Kirigami.Units.gridUnit * 3 } ColumnLayout { id: tabletLayout anchors.centerIn: parent - spacing: PlasmaCore.Units.gridUnit + spacing: Kirigami.Units.gridUnit Clock { layoutAlignment: Qt.AlignLeft Layout.alignment: Qt.AlignLeft Layout.fillWidth: true - Layout.minimumWidth: PlasmaCore.Units.gridUnit * 20 + Layout.minimumWidth: Kirigami.Units.gridUnit * 20 } MobileShell.MediaControlsWidget { Layout.alignment: Qt.AlignLeft Layout.fillWidth: true - Layout.maximumWidth: PlasmaCore.Units.gridUnit * 25 + Layout.maximumWidth: Kirigami.Units.gridUnit * 25 layer.enabled: true layer.effect: MultiEffect { @@ -55,7 +55,7 @@ Loader { shadowEnabled: true shadowVerticalOffset: 1 shadowOpacity: 0.5 - shadowColor: Qt.lighter(PlasmaCore.Theme.backgroundColor, 0.1) + shadowColor: Qt.lighter(Kirigami.Theme.backgroundColor, 0.1) } } } @@ -69,7 +69,7 @@ Loader { bottom: parent.bottom left: clock.right right: parent.right - rightMargin: PlasmaCore.Units.gridUnit + rightMargin: Kirigami.Units.gridUnit } NotificationsComponent { @@ -80,15 +80,15 @@ Loader { Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter Layout.fillWidth: true Layout.fillHeight: true - Layout.topMargin: PlasmaCore.Units.gridUnit * 2 - Layout.bottomMargin: PlasmaCore.Units.gridUnit - Layout.minimumWidth: PlasmaCore.Units.gridUnit * 15 - Layout.maximumWidth: PlasmaCore.Units.gridUnit * 25 + Layout.topMargin: Kirigami.Units.gridUnit * 2 + Layout.bottomMargin: Kirigami.Units.gridUnit + Layout.minimumWidth: Kirigami.Units.gridUnit * 15 + Layout.maximumWidth: Kirigami.Units.gridUnit * 25 - leftMargin: PlasmaCore.Units.gridUnit - rightMargin: PlasmaCore.Units.gridUnit - bottomMargin: PlasmaCore.Units.gridUnit - topMargin: PlasmaCore.Units.gridUnit + leftMargin: Kirigami.Units.gridUnit + rightMargin: Kirigami.Units.gridUnit + bottomMargin: Kirigami.Units.gridUnit + topMargin: Kirigami.Units.gridUnit onPasswordRequested: root.passwordRequested() onNotificationsShownChanged: root.notificationsShown = notificationsShown diff --git a/lookandfeel/contents/lockscreen/NotificationsComponent.qml b/lookandfeel/contents/lockscreen/NotificationsComponent.qml index 8e3b9a97..5d16a106 100644 --- a/lookandfeel/contents/lockscreen/NotificationsComponent.qml +++ b/lookandfeel/contents/lockscreen/NotificationsComponent.qml @@ -4,7 +4,6 @@ import QtQuick import QtQuick.Layouts -import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.notificationmanager 1.1 as Notifications import org.kde.plasma.private.mobileshell 1.0 as MobileShell @@ -56,13 +55,14 @@ Loader { property alias notificationsList: notificationsList - PlasmaCore.ColorScope { + Item { anchors.fill: parent anchors.topMargin: root.topMargin anchors.bottomMargin: root.bottomMargin anchors.leftMargin: root.leftMargin anchors.rightMargin: root.rightMargin - colorGroup: PlasmaCore.Theme.NormalColorGroup + Kirigami.Theme.colorSet: Kirigami.Theme.Window + Kirigami.Theme.inherit: false MobileShell.NotificationsWidget { id: notificationsList diff --git a/lookandfeel/contents/lockscreen/PasswordBar.qml b/lookandfeel/contents/lockscreen/PasswordBar.qml index e1bb2809..d8dd7f3f 100644 --- a/lookandfeel/contents/lockscreen/PasswordBar.qml +++ b/lookandfeel/contents/lockscreen/PasswordBar.qml @@ -5,7 +5,6 @@ import QtQuick import QtQuick.Controls import QtQuick.Layouts -import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.workspace.keyboardlayout 1.0 import org.kde.plasma.workspace.keyboardlayout 1.0 as Keyboards @@ -13,7 +12,7 @@ import org.kde.kirigami 2.12 as Kirigami Rectangle { id: root - implicitHeight: PlasmaCore.Units.gridUnit * 2.5 + implicitHeight: Kirigami.Units.gridUnit * 2.5 required property var lockScreenState @@ -29,8 +28,8 @@ Rectangle { property bool keypadOpen - readonly property color headerTextColor: Kirigami.ColorUtils.adjustColor(PlasmaCore.Theme.textColor, {"alpha": 0.75*255}) - readonly property color headerTextInactiveColor: Kirigami.ColorUtils.adjustColor(PlasmaCore.Theme.textColor, {"alpha": 0.4*255}) + readonly property color headerTextColor: Kirigami.ColorUtils.adjustColor(Kirigami.Theme.textColor, {"alpha": 0.75*255}) + readonly property color headerTextInactiveColor: Kirigami.ColorUtils.adjustColor(Kirigami.Theme.textColor, {"alpha": 0.4*255}) // model for shown dots // we need to use a listmodel to avoid all delegates from reloading @@ -181,7 +180,7 @@ Rectangle { anchors.right: parent.right anchors.top: parent.top anchors.bottom: parent.bottom - anchors.margins: PlasmaCore.Units.smallSpacing + anchors.margins: Kirigami.Units.smallSpacing implicitWidth: height icon.name: root.isPinMode ? "input-keyboard-virtual-symbolic" : "input-dialpad-symbolic" onClicked: { @@ -211,7 +210,7 @@ Rectangle { ListView { id: dotDisplay - property int dotWidth: Math.round(PlasmaCore.Units.gridUnit * 0.35) + property int dotWidth: Math.round(Kirigami.Units.gridUnit * 0.35) Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter Layout.bottomMargin: Math.round(dotWidth / 2) diff --git a/lookandfeel/contents/logout/ActionButton.qml b/lookandfeel/contents/logout/ActionButton.qml index 9fc06c46..97b23020 100644 --- a/lookandfeel/contents/logout/ActionButton.qml +++ b/lookandfeel/contents/logout/ActionButton.qml @@ -9,6 +9,7 @@ import QtQuick 2.8 import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.components 3.0 as PlasmaComponents3 +import org.kde.kirigami 2.20 as Kirigami Item { id: root @@ -25,17 +26,17 @@ Item { activeFocusOnTab: true - property int iconSize: PlasmaCore.Units.gridUnit + property int iconSize: Kirigami.Units.gridUnit - implicitWidth: PlasmaCore.Units.gridUnit * 14 - implicitHeight: iconSize + PlasmaCore.Units.smallSpacing + label.implicitHeight + implicitWidth: Kirigami.Units.gridUnit * 14 + implicitHeight: iconSize + Kirigami.Units.smallSpacing + label.implicitHeight Rectangle { id: buttonRect width: root.width height: iconSize * 2.2 - radius: PlasmaCore.Units.smallSpacing - color: PlasmaCore.ColorScope.backgroundColor + radius: Kirigami.Units.smallSpacing + color: Kirigami.Theme.backgroundColor opacity: mouseArea.containsPress ? 1 : 0.6 border { color: Qt.rgba(255, 255, 255, 0.8) @@ -48,22 +49,22 @@ Item { anchors { verticalCenter: buttonRect.verticalCenter left: buttonRect.left - leftMargin: PlasmaCore.Units.mediumSpacing + leftMargin: Kirigami.Units.mediumSpacing } width: iconSize height: iconSize - colorGroup: PlasmaCore.ColorScope.colorGroup + colorSet: Kirigami.Theme.colorSet } PlasmaComponents3.Label { id: label - font.pointSize: PlasmaCore.Theme.defaultFont.pointSize + 1 + font.pointSize: Kirigami.Theme.defaultFont.pointSize + 1 anchors { centerIn: buttonRect } style: softwareRendering ? Text.Outline : Text.Normal - styleColor: softwareRendering ? PlasmaCore.ColorScope.backgroundColor : "transparent" //no outline, doesn't matter + styleColor: softwareRendering ? Kirigami.Theme.backgroundColor : "transparent" //no outline, doesn't matter horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignTop wrapMode: Text.WordWrap diff --git a/lookandfeel/contents/logout/Logout.qml b/lookandfeel/contents/logout/Logout.qml index bd3cb0f8..9264614f 100644 --- a/lookandfeel/contents/logout/Logout.qml +++ b/lookandfeel/contents/logout/Logout.qml @@ -11,15 +11,16 @@ import QtQuick 2.12 import QtQuick.Layouts 1.12 import QtQuick.Controls 2.8 as Controls -import org.kde.plasma.core 2.0 as PlasmaCore +import org.kde.kirigami 2.20 as Kirigami import org.kde.coreaddons 1.0 as KCoreAddons import org.kde.plasma.private.sessions 2.0 -PlasmaCore.ColorScope { +Item { id: root - colorGroup: PlasmaCore.Theme.ComplementaryColorGroup + Kirigami.Theme.colorSet: Kirigami.Theme.Complementary + Kirigami.Theme.inherit: false signal logoutRequested() signal haltRequested() signal suspendRequested(int spdMethod) @@ -44,7 +45,7 @@ PlasmaCore.ColorScope { Rectangle { id: background anchors.fill: parent - color: PlasmaCore.ColorScope.backgroundColor + color: Kirigami.Theme.backgroundColor opacity: 0 } @@ -69,14 +70,14 @@ PlasmaCore.ColorScope { target: buttons from: 0 to: 1 - duration: PlasmaCore.Units.longDuration + duration: Kirigami.Units.longDuration easing.type: Easing.InOutQuad } OpacityAnimator { target: background from: 0 to: 0.6 - duration: PlasmaCore.Units.longDuration + duration: Kirigami.Units.longDuration easing.type: Easing.InOutQuad } } @@ -96,21 +97,21 @@ PlasmaCore.ColorScope { target: buttons from: 1 to: 0 - duration: PlasmaCore.Units.longDuration + duration: Kirigami.Units.longDuration easing.type: Easing.InOutQuad } OpacityAnimator { target: background from: 0.6 to: 0 - duration: PlasmaCore.Units.longDuration + duration: Kirigami.Units.longDuration easing.type: Easing.InOutQuad } OpacityAnimator { target: blackOverlay from: 0 to: closeAnim.closeToBlack ? 1 : 0 - duration: PlasmaCore.Units.longDuration + duration: Kirigami.Units.longDuration easing.type: Easing.InOutQuad } } @@ -132,7 +133,7 @@ PlasmaCore.ColorScope { ColumnLayout { anchors.centerIn: parent - spacing: PlasmaCore.Units.gridUnit + spacing: Kirigami.Units.gridUnit ActionButton { iconSource: "system-reboot" @@ -165,7 +166,7 @@ PlasmaCore.ColorScope { ActionButton { anchors { bottom: parent.bottom - bottomMargin: PlasmaCore.Units.largeSpacing + bottomMargin: Kirigami.Units.gridUnit horizontalCenter: parent.horizontalCenter } iconSource: "dialog-cancel" diff --git a/lookandfeel/contents/systemdialog/SystemDialog.qml b/lookandfeel/contents/systemdialog/SystemDialog.qml index 16ac278e..78b06220 100644 --- a/lookandfeel/contents/systemdialog/SystemDialog.qml +++ b/lookandfeel/contents/systemdialog/SystemDialog.qml @@ -149,10 +149,10 @@ Item { contentItem: RowLayout { Kirigami.Heading { Layout.fillWidth: true - Layout.topMargin: Kirigami.Units.largeSpacing - Layout.bottomMargin: Kirigami.Units.largeSpacing - Layout.leftMargin: Kirigami.Units.largeSpacing - Layout.rightMargin: Kirigami.Units.largeSpacing + Layout.topMargin: Kirigami.Units.gridUnit + Layout.bottomMargin: Kirigami.Units.gridUnit + Layout.leftMargin: Kirigami.Units.gridUnit + Layout.rightMargin: Kirigami.Units.gridUnit Layout.alignment: Qt.AlignVCenter level: 2 text: root.mainText @@ -184,8 +184,8 @@ Item { Label { id: subtitleLabel Layout.fillWidth: true - Layout.topMargin: Kirigami.Units.largeSpacing - Layout.bottomMargin: Kirigami.Units.largeSpacing + Layout.topMargin: Kirigami.Units.gridUnit + Layout.bottomMargin: Kirigami.Units.gridUnit Layout.leftMargin: Kirigami.Units.gridUnit * 3 Layout.rightMargin: Kirigami.Units.gridUnit * 3 visible: root.subtitle !== "" diff --git a/lookandfeel/contents/systemdialog/private/MobileSystemDialogButton.qml b/lookandfeel/contents/systemdialog/private/MobileSystemDialogButton.qml index 0cee3809..d222f6e5 100644 --- a/lookandfeel/contents/systemdialog/private/MobileSystemDialogButton.qml +++ b/lookandfeel/contents/systemdialog/private/MobileSystemDialogButton.qml @@ -50,10 +50,10 @@ AbstractButton { } } - leftPadding: Kirigami.Units.largeSpacing - rightPadding: Kirigami.Units.largeSpacing - topPadding: Kirigami.Units.largeSpacing - bottomPadding: Kirigami.Units.largeSpacing + leftPadding: Kirigami.Units.gridUnit + rightPadding: Kirigami.Units.gridUnit + topPadding: Kirigami.Units.gridUnit + bottomPadding: Kirigami.Units.gridUnit contentItem: Item { implicitHeight: row.height + Kirigami.Units.smallSpacing diff --git a/quicksettings/caffeine/contents/ui/main.qml b/quicksettings/caffeine/contents/ui/main.qml index dbf8e703..758d6c6a 100644 --- a/quicksettings/caffeine/contents/ui/main.qml +++ b/quicksettings/caffeine/contents/ui/main.qml @@ -5,7 +5,6 @@ */ import org.kde.plasma.private.mobileshell.quicksettingsplugin as QS -import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.plasma5support 2.0 as P5Support QS.QuickSetting { diff --git a/quicksettings/keyboardtoggle/contents/ui/main.qml b/quicksettings/keyboardtoggle/contents/ui/main.qml index 4a17427e..db752e4a 100644 --- a/quicksettings/keyboardtoggle/contents/ui/main.qml +++ b/quicksettings/keyboardtoggle/contents/ui/main.qml @@ -6,7 +6,6 @@ import org.kde.plasma.private.mobileshell.quicksettingsplugin as QS import org.kde.plasma.private.mobileshell 1.0 as MobileShell -import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.workspace.keyboardlayout 1.0 as Keyboards QS.QuickSetting { diff --git a/quicksettings/powermenu/package/contents/ui/main.qml b/quicksettings/powermenu/package/contents/ui/main.qml index 6dfeba58..258361b1 100644 --- a/quicksettings/powermenu/package/contents/ui/main.qml +++ b/quicksettings/powermenu/package/contents/ui/main.qml @@ -4,7 +4,6 @@ * SPDX-License-Identifier: LGPL-2.0-or-later */ -import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.quicksetting.powermenu 1.0 as PowerMenu import org.kde.plasma.private.mobileshell.quicksettingsplugin as QS diff --git a/shell/contents/configuration/ConfigurationAppletPage.qml b/shell/contents/configuration/ConfigurationAppletPage.qml index fef0f8dd..612ca16f 100644 --- a/shell/contents/configuration/ConfigurationAppletPage.qml +++ b/shell/contents/configuration/ConfigurationAppletPage.qml @@ -31,7 +31,7 @@ Kirigami.ScrollablePage { implicitHeight: loader.height - padding: Kirigami.Units.largeSpacing + padding: Kirigami.Units.gridUnit bottomPadding: 0 Loader { diff --git a/shell/contents/configuration/ConfigurationContainmentAppearance.qml b/shell/contents/configuration/ConfigurationContainmentAppearance.qml index bbf74a3f..51441b34 100644 --- a/shell/contents/configuration/ConfigurationContainmentAppearance.qml +++ b/shell/contents/configuration/ConfigurationContainmentAppearance.qml @@ -12,7 +12,6 @@ import QtQuick.Layouts 1.15 import org.kde.plasma.plasmoid import org.kde.newstuff 1.62 as NewStuff import org.kde.kirigami 2.19 as Kirigami -import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.kirigamiaddons.labs.mobileform 0.1 as MobileForm ColumnLayout { diff --git a/shell/contents/configuration/ContainmentConfiguration.qml b/shell/contents/configuration/ContainmentConfiguration.qml index 57e3351b..45235233 100644 --- a/shell/contents/configuration/ContainmentConfiguration.qml +++ b/shell/contents/configuration/ContainmentConfiguration.qml @@ -7,6 +7,7 @@ import QtQuick.Layouts 1.0 import QtQuick.Window 2.2 import QtQuick.Controls 2.15 as Controls +import org.kde.kirigami 2.20 as Kirigami import org.kde.plasma.components 3.0 as PlasmaComponents3 import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.configuration 2.0 @@ -19,8 +20,8 @@ AppletConfiguration { readonly property bool horizontal: root.width > root.height onAppLoaded: { - app.width = root.width < root.height ? root.width : Math.min(root.width, Math.max(app.implicitWidth, PlasmaCore.Units.gridUnit * 45)); - app.height = Math.min(root.height, Math.max(app.implicitHeight, PlasmaCore.Units.gridUnit * 29)); + app.width = root.width < root.height ? root.width : Math.min(root.width, Math.max(app.implicitWidth, Kirigami.Units.gridUnit * 45)); + app.height = Math.min(root.height, Math.max(app.implicitHeight, Kirigami.Units.gridUnit * 29)); } //BEGIN model @@ -62,19 +63,19 @@ AppletConfiguration { Controls.Control { anchors.bottom: parent.bottom anchors.horizontalCenter: parent.horizontalCenter - anchors.bottomMargin: PlasmaCore.Units.largeSpacing + anchors.bottomMargin: Kirigami.Units.gridUnit - leftPadding: PlasmaCore.Units.largeSpacing - rightPadding: PlasmaCore.Units.largeSpacing - topPadding: PlasmaCore.Units.largeSpacing - bottomPadding: PlasmaCore.Units.largeSpacing + leftPadding: Kirigami.Units.gridUnit + rightPadding: Kirigami.Units.gridUnit + topPadding: Kirigami.Units.gridUnit + bottomPadding: Kirigami.Units.gridUnit NumberAnimation on opacity { id: opacityAnim running: true from: 0 to: 1 - duration: PlasmaCore.Units.longDuration + duration: Kirigami.Units.longDuration } background: KSvg.FrameSvgItem { @@ -85,13 +86,13 @@ AppletConfiguration { contentItem: RowLayout { PlasmaComponents3.Button { Layout.alignment: Qt.AlignRight - Layout.preferredHeight: PlasmaCore.Units.gridUnit * 4 - Layout.preferredWidth: PlasmaCore.Units.gridUnit * 8 + Layout.preferredHeight: Kirigami.Units.gridUnit * 4 + Layout.preferredWidth: Kirigami.Units.gridUnit * 8 display: PlasmaComponents3.ToolButton.TextUnderIcon icon.name: "viewimage" - icon.width: PlasmaCore.Units.iconSizes.medium - icon.height: PlasmaCore.Units.iconSizes.medium + icon.width: Kirigami.Units.iconSizes.medium + icon.height: Kirigami.Units.iconSizes.medium text: i18n("Change Wallpaper") onClicked: { opacityAnim.from = 1; @@ -103,13 +104,13 @@ AppletConfiguration { PlasmaComponents3.Button { Layout.alignment: Qt.AlignLeft - Layout.preferredHeight: PlasmaCore.Units.gridUnit * 4 - Layout.preferredWidth: PlasmaCore.Units.gridUnit * 8 + Layout.preferredHeight: Kirigami.Units.gridUnit * 4 + Layout.preferredWidth: Kirigami.Units.gridUnit * 8 display: PlasmaComponents3.ToolButton.TextUnderIcon icon.name: "configure" - icon.width: PlasmaCore.Units.iconSizes.medium - icon.height: PlasmaCore.Units.iconSizes.medium + icon.width: Kirigami.Units.iconSizes.medium + icon.height: Kirigami.Units.iconSizes.medium text: i18n("Configure") onClicked: { root.loadApp = true; diff --git a/shell/contents/configuration/WallpaperSelector.qml b/shell/contents/configuration/WallpaperSelector.qml index 3faf3481..9accbf67 100644 --- a/shell/contents/configuration/WallpaperSelector.qml +++ b/shell/contents/configuration/WallpaperSelector.qml @@ -6,10 +6,10 @@ import QtQuick 2.12 import QtQuick.Layouts 1.0 import QtQuick.Window 2.15 import QtQuick.Controls 2.3 as Controls -import org.kde.plasma.extras 2.0 as PlasmaExtras import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.configuration 2.0 +import org.kde.kirigami 2.20 as Kirigami import org.kde.plasma.wallpapers.image 2.0 as Wallpaper import org.kde.kquickcontrolsaddons 2.0 as Addons import org.kde.kcmutils as KCM @@ -28,8 +28,8 @@ Controls.Drawer { onOpened: { wallpapersView.forceActiveFocus() } - implicitWidth: PlasmaCore.Units.gridUnit * 10 - implicitHeight: PlasmaCore.Units.gridUnit * 8 + implicitWidth: Kirigami.Units.gridUnit * 10 + implicitHeight: Kirigami.Units.gridUnit * 8 width: imageWallpaperDrawer.horizontal ? implicitWidth : parent.width height: imageWallpaperDrawer.horizontal ? parent.height : implicitHeight @@ -52,14 +52,14 @@ Controls.Drawer { delegate: Controls.ItemDelegate { width: imageWallpaperDrawer.horizontal ? parent.width : height * (imageWallpaperDrawer.width / imageWallpaperDrawer.Screen.height) height: imageWallpaperDrawer.horizontal ? width / (imageWallpaperDrawer.Screen.width / imageWallpaperDrawer.Screen.height) : parent.height - padding: wallpapersView.currentIndex === index ? PlasmaCore.Units.gridUnit / 4 : PlasmaCore.Units.gridUnit / 2 + padding: wallpapersView.currentIndex === index ? Kirigami.Units.gridUnit / 4 : Kirigami.Units.gridUnit / 2 leftPadding: padding topPadding: padding rightPadding: padding bottomPadding: padding Behavior on padding { NumberAnimation { - duration: PlasmaCore.Units.longDuration + duration: Kirigami.Units.longDuration easing.type: Easing.InOutQuad } } @@ -75,7 +75,7 @@ Controls.Drawer { contentItem: Item { PlasmaCore.IconItem { anchors.centerIn: parent - width: PlasmaCore.Units.iconSizes.large + width: Kirigami.Units.iconSizes.large height: width source: "view-preview" visible: !walliePreview.visible @@ -102,15 +102,15 @@ Controls.Drawer { Rectangle { anchors { fill: parent - margins: wallpapersView.currentIndex === index ? 0 : PlasmaCore.Units.gridUnit / 4 + margins: wallpapersView.currentIndex === index ? 0 : Kirigami.Units.gridUnit / 4 Behavior on margins { NumberAnimation { - duration: PlasmaCore.Units.longDuration + duration: Kirigami.Units.longDuration easing.type: Easing.InOutQuad } } } - radius: PlasmaCore.Units.gridUnit / 4 + radius: Kirigami.Units.gridUnit / 4 } } } diff --git a/shell/contents/views/Desktop.qml b/shell/contents/views/Desktop.qml index 4daa31bd..67b44a0d 100644 --- a/shell/contents/views/Desktop.qml +++ b/shell/contents/views/Desktop.qml @@ -18,7 +18,7 @@ Rectangle { property Item containment - color: (containment && containment.backgroundHints == PlasmaCore.Types.NoBackground) ? "transparent" : PlasmaCore.Theme.textColor + color: (containment && containment.backgroundHints == PlasmaCore.Types.NoBackground) ? "transparent" : Kirigami.Theme.textColor function toggleWidgetExplorer(containment) { console.log("Widget Explorer toggled"); @@ -51,8 +51,8 @@ Rectangle { id: imageColors source: root.containment.wallpaper - readonly property color backgroundColor: PlasmaCore.Theme.backgroundColor - readonly property color textColor: PlasmaCore.Theme.textColor + readonly property color backgroundColor: Kirigami.Theme.backgroundColor + readonly property color textColor: Kirigami.Theme.textColor Kirigami.Theme.inherit: false Kirigami.Theme.backgroundColor: backgroundColor diff --git a/shell/contents/views/Panel.qml b/shell/contents/views/Panel.qml index 0a5c6871..7ea711b5 100644 --- a/shell/contents/views/Panel.qml +++ b/shell/contents/views/Panel.qml @@ -15,7 +15,7 @@ Rectangle { visible: false //adjust borders is run during setup. We want to avoid painting till completed property Item containment - color: !containment || containment.plasmoid.backgroundHints == PlasmaCore.Types.NoBackground ? "transparent" : PlasmaCore.Theme.textColor + color: !containment || containment.plasmoid.backgroundHints == PlasmaCore.Types.NoBackground ? "transparent" : Kirigami.Theme.textColor onContainmentChanged: { containment.parent = root; diff --git a/tests/ActionDrawerTest.qml b/tests/ActionDrawerTest.qml index b76d78b4..d07c9685 100644 --- a/tests/ActionDrawerTest.qml +++ b/tests/ActionDrawerTest.qml @@ -8,8 +8,8 @@ import QtQuick 2.15 import QtQuick.Controls 2.15 +import org.kde.kirigami 2.20 as Kirigami import org.kde.plasma.components 3.0 as PC3 -import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.private.mobileshell 1.0 as MobileShell import org.kde.notificationmanager 1.1 as Notifications @@ -41,9 +41,9 @@ ApplicationWindow { anchors.left: parent.left anchors.right: parent.right - height: PlasmaCore.Units.gridUnit * 1.25 + height: Kirigami.Units.gridUnit * 1.25 - colorGroup: PlasmaCore.Theme.ComplementaryColorGroup + colorGroup: Kirigami.Theme.ComplementaryColorGroup backgroundColor: "transparent" showSecondRow: false @@ -70,7 +70,7 @@ ApplicationWindow { PC3.Label { anchors.bottom: parent.bottom - anchors.bottomMargin: PlasmaCore.Units.largeSpacing + anchors.bottomMargin: Kirigami.Units.gridUnit anchors.horizontalCenter: parent.horizontalCenter text: "Pull down the action drawer from the top." color: "white" diff --git a/tests/LockScreenTest.qml b/tests/LockScreenTest.qml index ad8fdbfe..e1297397 100644 --- a/tests/LockScreenTest.qml +++ b/tests/LockScreenTest.qml @@ -5,7 +5,6 @@ import QtQuick 2.15 import QtQuick.Controls 2.15 import org.kde.plasma.components 3.0 as PC3 -import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.private.mobileshell 1.0 as MobileShell import org.kde.notificationmanager 1.1 as Notifications