Port away from PlasmaCore and PlasmaExtras to Kirigami

See also:

https://pointieststick.com/2023/06/14/call-to-action-easy-porting-opportunity-in-plasma/
This commit is contained in:
Alexey Andreyev 2023-07-25 01:13:52 +00:00 committed by Devin Lin
parent 1512717c0f
commit 127bbdf653
137 changed files with 709 additions and 726 deletions

View file

@ -10,10 +10,10 @@ import QtQuick.Controls 2.15
import QtQuick.Layouts 1.1 import QtQuick.Layouts 1.1
import QtQuick.Window 2.2 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.components 3.0 as PlasmaComponents
import org.kde.plasma.private.nanoshell 2.0 as NanoShell 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 1.0 as MobileShell
import org.kde.kirigami 2.20 as Kirigami
import "../components" as Components 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. * 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 { enum Mode {
Portrait = 0, Portrait = 0,
@ -167,10 +167,10 @@ Item {
function updateState() { function updateState() {
cancelAnimations(); cancelAnimations();
let openThreshold = PlasmaCore.Units.gridUnit; let openThreshold = Kirigami.Units.gridUnit;
if (root.offset <= 0) { 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; root.visible = false;
close(); close();
} else if (root.direction === MobileShell.Direction.None || !root.opened) { } else if (root.direction === MobileShell.Direction.None || !root.opened) {
@ -206,7 +206,7 @@ Item {
PropertyAnimation on offset { PropertyAnimation on offset {
id: closeAnim id: closeAnim
duration: PlasmaCore.Units.veryLongDuration duration: Kirigami.Units.veryLongDuration
easing.type: Easing.OutExpo easing.type: Easing.OutExpo
to: 0 to: 0
onFinished: { onFinished: {
@ -216,14 +216,14 @@ Item {
} }
PropertyAnimation on offset { PropertyAnimation on offset {
id: openAnim id: openAnim
duration: PlasmaCore.Units.veryLongDuration duration: Kirigami.Units.veryLongDuration
easing.type: Easing.OutExpo easing.type: Easing.OutExpo
to: contentContainerLoader.minimizedQuickSettingsOffset to: contentContainerLoader.minimizedQuickSettingsOffset
onFinished: root.opened = true onFinished: root.opened = true
} }
PropertyAnimation on offset { PropertyAnimation on offset {
id: expandAnim id: expandAnim
duration: PlasmaCore.Units.veryLongDuration duration: Kirigami.Units.veryLongDuration
easing.type: Easing.OutExpo easing.type: Easing.OutExpo
to: contentContainerLoader.maximizedQuickSettingsOffset to: contentContainerLoader.maximizedQuickSettingsOffset
onFinished: root.opened = true; onFinished: root.opened = true;

View file

@ -9,7 +9,6 @@ import QtQuick.Controls 2.15
import QtQuick.Layouts 1.1 import QtQuick.Layouts 1.1
import QtQuick.Window 2.2 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.components 3.0 as PlasmaComponents
import org.kde.plasma.private.nanoshell 2.0 as NanoShell import org.kde.plasma.private.nanoshell 2.0 as NanoShell

View file

@ -24,7 +24,7 @@ import "quicksettings"
/** /**
* Root element that contains all of the ActionDrawer's contents, and is anchored to the screen. * Root element that contains all of the ActionDrawer's contents, and is anchored to the screen.
*/ */
PlasmaCore.ColorScope { Item {
id: root id: root
required property var actionDrawer required property var actionDrawer
@ -37,18 +37,19 @@ PlasmaCore.ColorScope {
readonly property real minWidthHeight: Math.min(root.width, root.height) readonly property real minWidthHeight: Math.min(root.width, root.height)
readonly property real opacityValue: Math.max(0, Math.min(1, actionDrawer.offset / root.minimizedQuickSettingsOffset)) 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 // fullscreen background
Rectangle { Rectangle {
anchors.fill: parent anchors.fill: parent
// darken if there are notifications // darken if there are notifications
color: Qt.rgba(PlasmaCore.Theme.backgroundColor.r, color: Qt.rgba(Kirigami.Theme.backgroundColor.r,
PlasmaCore.Theme.backgroundColor.g, Kirigami.Theme.backgroundColor.g,
PlasmaCore.Theme.backgroundColor.b, Kirigami.Theme.backgroundColor.b,
notificationWidget.hasNotifications ? 0.95 : 0.9) notificationWidget.hasNotifications ? 0.95 : 0.9)
Behavior on color { ColorAnimation { duration: PlasmaCore.Units.longDuration } } Behavior on color { ColorAnimation { duration: Kirigami.Units.longDuration } }
opacity: opacityValue opacity: opacityValue
} }
@ -101,7 +102,7 @@ PlasmaCore.ColorScope {
onBackgroundClicked: root.actionDrawer.close(); onBackgroundClicked: root.actionDrawer.close();
// don't allow notifications widget to get too wide // 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.fillHeight: true
Layout.fillWidth: true Layout.fillWidth: true
Layout.topMargin: minWidthHeight * 0.02 Layout.topMargin: minWidthHeight * 0.02
@ -137,7 +138,7 @@ PlasmaCore.ColorScope {
left: parent.left left: parent.left
top: clock.bottom top: clock.bottom
bottom: isOnLargeScreen ? columnLayout.top : mediaWidget.top bottom: isOnLargeScreen ? columnLayout.top : mediaWidget.top
topMargin: PlasmaCore.Units.smallSpacing topMargin: Kirigami.Units.smallSpacing
leftMargin: columnLayout.anchors.margins leftMargin: columnLayout.anchors.margins
} }
@ -147,7 +148,7 @@ PlasmaCore.ColorScope {
MediaControls.MediaControlsWidget { MediaControls.MediaControlsWidget {
id: mediaWidget 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 y: isOnLargeScreen ? date.y - height + date.implicitHeight : date.y + date.implicitHeight + columnLayout.anchors.margins / 2

View file

@ -9,8 +9,8 @@ import QtQuick.Controls 2.15
import QtQuick.Layouts 1.1 import QtQuick.Layouts 1.1
import QtQuick.Window 2.2 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.components 3.0 as PlasmaComponents
import org.kde.kirigami 2.20 as Kirigami
import "../components" as Components import "../components" as Components
import "../widgets/notifications" as Notifications 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. * Root element that contains all of the ActionDrawer's contents, and is anchored to the screen.
*/ */
PlasmaCore.ColorScope { Item {
id: root id: root
required property var actionDrawer required property var actionDrawer
@ -32,7 +32,8 @@ PlasmaCore.ColorScope {
// fully open position // fully open position
readonly property real maximizedQuickSettingsOffset: minimizedQuickSettingsOffset + quickSettings.maxAddedHeight readonly property real maximizedQuickSettingsOffset: minimizedQuickSettingsOffset + quickSettings.maxAddedHeight
colorGroup: PlasmaCore.Theme.ViewColorGroup Kirigami.Theme.colorSet: Kirigami.Theme.View
Kirigami.Theme.inherit: false
function applyMinMax(val) { function applyMinMax(val) {
return Math.max(0, Math.min(1, val)); return Math.max(0, Math.min(1, val));
@ -42,11 +43,11 @@ PlasmaCore.ColorScope {
Rectangle { Rectangle {
anchors.fill: parent anchors.fill: parent
// darken if there are notifications // darken if there are notifications
color: Qt.rgba(PlasmaCore.Theme.backgroundColor.r, color: Qt.rgba(Kirigami.Theme.backgroundColor.r,
PlasmaCore.Theme.backgroundColor.g, Kirigami.Theme.backgroundColor.g,
PlasmaCore.Theme.backgroundColor.b, Kirigami.Theme.backgroundColor.b,
0.95) 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)) opacity: Math.max(0, Math.min(1, actionDrawer.offset / root.minimizedQuickSettingsOffset))
} }

View file

@ -83,7 +83,7 @@ Item {
RowLayout { RowLayout {
id: brightnessRow id: brightnessRow
spacing: PlasmaCore.Units.smallSpacing * 2 spacing: Kirigami.Units.smallSpacing * 2
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
@ -91,8 +91,8 @@ Item {
PlasmaCore.IconItem { PlasmaCore.IconItem {
Layout.alignment: Qt.AlignVCenter Layout.alignment: Qt.AlignVCenter
Layout.leftMargin: PlasmaCore.Units.smallSpacing Layout.leftMargin: Kirigami.Units.smallSpacing
Layout.preferredWidth: PlasmaCore.Units.iconSizes.smallMedium Layout.preferredWidth: Kirigami.Units.iconSizes.smallMedium
Layout.preferredHeight: width Layout.preferredHeight: width
source: "low-brightness" source: "low-brightness"
} }
@ -123,8 +123,8 @@ Item {
PlasmaCore.IconItem { PlasmaCore.IconItem {
Layout.alignment: Qt.AlignVCenter Layout.alignment: Qt.AlignVCenter
Layout.rightMargin: PlasmaCore.Units.smallSpacing Layout.rightMargin: Kirigami.Units.smallSpacing
Layout.preferredWidth: PlasmaCore.Units.iconSizes.smallMedium Layout.preferredWidth: Kirigami.Units.iconSizes.smallMedium
Layout.preferredHeight: width Layout.preferredHeight: width
source: "high-brightness" source: "high-brightness"
} }

View file

@ -6,17 +6,17 @@
import QtQuick 2.15 import QtQuick 2.15
import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.kirigami 2.20 as Kirigami
Rectangle { Rectangle {
id: handle id: handle
signal tapped() signal tapped()
implicitWidth: PlasmaCore.Units.gridUnit * 3 implicitWidth: Kirigami.Units.gridUnit * 3
implicitHeight: 3 implicitHeight: 3
radius: height radius: height
color: PlasmaCore.Theme.textColor color: Kirigami.Theme.textColor
opacity: 0.5 opacity: 0.5
TapHandler { TapHandler {

View file

@ -10,9 +10,9 @@ import QtQuick.Controls 2.15
import QtQuick.Layouts 1.1 import QtQuick.Layouts 1.1
import QtQuick.Window 2.2 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.components 3.0 as PlasmaComponents
import org.kde.plasma.private.mobileshell.quicksettingsplugin as QS import org.kde.plasma.private.mobileshell.quicksettingsplugin as QS
import org.kde.kirigami 2.20 as Kirigami
import "../../components" as Components import "../../components" as Components
import "../../components/util.js" as Util import "../../components/util.js" as Util
@ -41,8 +41,8 @@ Item {
readonly property real fullHeight: fullView.implicitHeight readonly property real fullHeight: fullView.implicitHeight
readonly property real intendedColumnWidth: 120 readonly property real intendedColumnWidth: 120
readonly property real intendedMinimizedColumnWidth: PlasmaCore.Units.gridUnit * 3 + PlasmaCore.Units.largeSpacing readonly property real intendedMinimizedColumnWidth: Kirigami.Units.gridUnit * 3 + Kirigami.Units.gridUnit
readonly property real minimizedRowHeight: PlasmaCore.Units.gridUnit * 3 + PlasmaCore.Units.largeSpacing readonly property real minimizedRowHeight: Kirigami.Units.gridUnit * 3 + Kirigami.Units.gridUnit
property real minimizedViewProgress: 0 property real minimizedViewProgress: 0
property real fullViewProgress: 1 property real fullViewProgress: 1
@ -110,9 +110,9 @@ Item {
BrightnessItem { BrightnessItem {
id: brightnessItem id: brightnessItem
Layout.bottomMargin: PlasmaCore.Units.smallSpacing * 2 Layout.bottomMargin: Kirigami.Units.smallSpacing * 2
Layout.leftMargin: PlasmaCore.Units.smallSpacing Layout.leftMargin: Kirigami.Units.smallSpacing
Layout.rightMargin: PlasmaCore.Units.smallSpacing Layout.rightMargin: Kirigami.Units.smallSpacing
Layout.fillWidth: true Layout.fillWidth: true
} }
} }
@ -139,8 +139,8 @@ Item {
implicitHeight: root.minimizedRowHeight implicitHeight: root.minimizedRowHeight
implicitWidth: root.minimizedColumnWidth implicitWidth: root.minimizedColumnWidth
horizontalPadding: (width - PlasmaCore.Units.gridUnit * 3) / 2 horizontalPadding: (width - Kirigami.Units.gridUnit * 3) / 2
verticalPadding: (height - PlasmaCore.Units.gridUnit * 3) / 2 verticalPadding: (height - Kirigami.Units.gridUnit * 3) / 2
contentItem: QuickSettingsMinimizedDelegate { contentItem: QuickSettingsMinimizedDelegate {
restrictedPermissions: actionDrawer.restrictedPermissions restrictedPermissions: actionDrawer.restrictedPermissions
@ -203,9 +203,9 @@ Item {
id: indicatorLoader id: indicatorLoader
Layout.alignment: Qt.AlignCenter Layout.alignment: Qt.AlignCenter
Layout.topMargin: PlasmaCore.Units.smallSpacing Layout.topMargin: Kirigami.Units.smallSpacing
Layout.leftMargin: PlasmaCore.Units.smallSpacing Layout.leftMargin: Kirigami.Units.smallSpacing
Layout.rightMargin: PlasmaCore.Units.smallSpacing Layout.rightMargin: Kirigami.Units.smallSpacing
// Avoid wasting space when not loaded // Avoid wasting space when not loaded
Layout.maximumHeight: active ? item.implicitHeight : 0 Layout.maximumHeight: active ? item.implicitHeight : 0
@ -222,7 +222,7 @@ Item {
implicitHeight: count > 1 ? 8 : 0 implicitHeight: count > 1 ? 8 : 0
radius: parent.width / 2 radius: parent.width / 2
color: PlasmaCore.Theme.disabledTextColor color: Kirigami.Theme.disabledTextColor
opacity: index === currentIndex ? 0.95 : 0.45 opacity: index === currentIndex ? 0.95 : 0.45
} }
@ -253,14 +253,14 @@ Item {
position: 0.1 position: 0.1
contentItem: Item { contentItem: Item {
implicitWidth: PlasmaCore.Units.smallSpacing / 4 implicitWidth: Kirigami.Units.smallSpacing / 4
Rectangle { Rectangle {
// shift over the indicator a bit to the right // shift over the indicator a bit to the right
anchors.fill: parent anchors.fill: parent
anchors.leftMargin: 2 anchors.leftMargin: 2
anchors.rightMargin: -2 anchors.rightMargin: -2
color: PlasmaCore.Theme.textColor color: Kirigami.Theme.textColor
opacity: scrollIndicator.active ? 0.5 : 0 opacity: scrollIndicator.active ? 0.5 : 0
Behavior on opacity { NumberAnimation {} } Behavior on opacity { NumberAnimation {} }
@ -296,7 +296,7 @@ Item {
Components.BaseItem { Components.BaseItem {
height: root.rowHeight height: root.rowHeight
width: root.columnWidth width: root.columnWidth
padding: PlasmaCore.Units.smallSpacing padding: Kirigami.Units.smallSpacing
contentItem: QuickSettingsFullDelegate { contentItem: QuickSettingsFullDelegate {
restrictedPermissions: actionDrawer.restrictedPermissions restrictedPermissions: actionDrawer.restrictedPermissions

View file

@ -37,10 +37,10 @@ Components.BaseItem {
property var iconItem property var iconItem
readonly property color enabledButtonBorderColor: Qt.darker(PlasmaCore.ColorScope.highlightColor, 1.25) 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 disabledButtonBorderColor: Kirigami.ColorUtils.tintWithAlpha(Kirigami.Theme.textColor, Kirigami.Theme.backgroundColor, 0.75)
readonly property color enabledButtonColor: Kirigami.ColorUtils.tintWithAlpha(PlasmaCore.ColorScope.highlightColor, PlasmaCore.ColorScope.backgroundColor, 0.6) 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, PlasmaCore.ColorScope.backgroundColor, 0.4); readonly property color enabledButtonPressedColor: Kirigami.ColorUtils.tintWithAlpha(PlasmaCore.ColorScope.highlightColor, Kirigami.Theme.backgroundColor, 0.4);
readonly property color disabledButtonColor: PlasmaCore.Theme.backgroundColor readonly property color disabledButtonColor: Kirigami.Theme.backgroundColor
readonly property color disabledButtonPressedColor: Qt.darker(disabledButtonColor, 1.1) readonly property color disabledButtonPressedColor: Qt.darker(disabledButtonColor, 1.1)
// scale animation on press // scale animation on press

View file

@ -45,7 +45,7 @@ Components.BaseItem {
/** /**
* Height of just the QuickSettings component in minimized mode. * 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. * Progress of showing the full quick settings view from pinned.
@ -53,10 +53,10 @@ Components.BaseItem {
property real minimizedToFullProgress: 1 property real minimizedToFullProgress: 1
// we need extra padding if the background side border is enabled // we need extra padding if the background side border is enabled
topPadding: PlasmaCore.Units.smallSpacing topPadding: Kirigami.Units.smallSpacing
leftPadding: PlasmaCore.Units.smallSpacing leftPadding: Kirigami.Units.smallSpacing
rightPadding: PlasmaCore.Units.smallSpacing rightPadding: Kirigami.Units.smallSpacing
bottomPadding: PlasmaCore.Units.smallSpacing * 4 bottomPadding: Kirigami.Units.smallSpacing * 4
background: KSvg.FrameSvgItem { background: KSvg.FrameSvgItem {
enabledBorders: PlasmaCore.FrameSvg.BottomBorder enabledBorders: PlasmaCore.FrameSvg.BottomBorder
@ -78,9 +78,9 @@ Components.BaseItem {
StatusBar.StatusBar { StatusBar.StatusBar {
id: statusBar id: statusBar
Layout.fillWidth: true 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" backgroundColor: "transparent"
showSecondRow: true showSecondRow: true
showDropShadow: false showDropShadow: false
@ -92,7 +92,7 @@ Components.BaseItem {
QuickSettings { QuickSettings {
id: quickSettings id: quickSettings
Layout.preferredHeight: root.minimizedQuickSettingsHeight + root.addedHeight Layout.preferredHeight: root.minimizedQuickSettingsHeight + root.addedHeight
Layout.topMargin: PlasmaCore.Units.smallSpacing Layout.topMargin: Kirigami.Units.smallSpacing
Layout.fillWidth: true Layout.fillWidth: true
mode: QuickSettings.Pages mode: QuickSettings.Pages
@ -107,16 +107,16 @@ Components.BaseItem {
id: mediaWidget id: mediaWidget
property real fullHeight: height + Layout.topMargin property real fullHeight: height + Layout.topMargin
Layout.fillWidth: true Layout.fillWidth: true
Layout.topMargin: PlasmaCore.Units.smallSpacing Layout.topMargin: Kirigami.Units.smallSpacing
Layout.leftMargin: Kirigami.Units.largeSpacing Layout.leftMargin: Kirigami.Units.gridUnit
Layout.rightMargin: Kirigami.Units.largeSpacing Layout.rightMargin: Kirigami.Units.gridUnit
} }
Handle { Handle {
id: handle id: handle
property real fullHeight: height + Layout.topMargin property real fullHeight: height + Layout.topMargin
Layout.alignment: Qt.AlignHCenter Layout.alignment: Qt.AlignHCenter
Layout.topMargin: PlasmaCore.Units.smallSpacing * 2 Layout.topMargin: Kirigami.Units.smallSpacing * 2
onTapped: { onTapped: {
if (root.minimizedToFullProgress < 0.5) { if (root.minimizedToFullProgress < 0.5) {

View file

@ -19,7 +19,7 @@ import "../../components" as Components
QuickSettingsDelegate { QuickSettingsDelegate {
id: root id: root
padding: PlasmaCore.Units.smallSpacing * 2 padding: Kirigami.Units.smallSpacing * 2
iconItem: icon iconItem: icon
// scale animation on press // scale animation on press
@ -34,14 +34,14 @@ QuickSettingsDelegate {
anchors.right: parent.right anchors.right: parent.right
height: parent.height height: parent.height
radius: PlasmaCore.Units.smallSpacing radius: Kirigami.Units.smallSpacing
color: Qt.rgba(0, 0, 0, 0.075) color: Qt.rgba(0, 0, 0, 0.075)
} }
// background color // background color
Rectangle { Rectangle {
anchors.fill: parent anchors.fill: parent
radius: PlasmaCore.Units.smallSpacing radius: Kirigami.Units.smallSpacing
border.width: 1 border.width: 1
border.color: root.enabled ? root.enabledButtonBorderColor : root.disabledButtonBorderColor border.color: root.enabled ? root.enabledButtonBorderColor : root.disabledButtonBorderColor
color: { color: {
@ -74,14 +74,14 @@ QuickSettingsDelegate {
id: icon id: icon
anchors.top: parent.top anchors.top: parent.top
anchors.left: parent.left anchors.left: parent.left
implicitWidth: PlasmaCore.Units.iconSizes.small implicitWidth: Kirigami.Units.iconSizes.small
implicitHeight: width implicitHeight: width
source: root.icon source: root.icon
} }
ColumnLayout { ColumnLayout {
id: column id: column
spacing: PlasmaCore.Units.smallSpacing spacing: Kirigami.Units.smallSpacing
anchors.right: parent.right anchors.right: parent.right
anchors.left: parent.left anchors.left: parent.left
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
@ -90,7 +90,7 @@ QuickSettingsDelegate {
Layout.fillWidth: true Layout.fillWidth: true
elide: Text.ElideRight elide: Text.ElideRight
text: root.text 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 font.weight: Font.Bold
} }
@ -100,7 +100,7 @@ QuickSettingsDelegate {
opacity: 0.6 opacity: 0.6
Layout.fillWidth: true Layout.fillWidth: true
font.pointSize: PlasmaCore.Theme.defaultFont.pointSize * 0.75 font.pointSize: Kirigami.Theme.defaultFont.pointSize * 0.75
} }
} }
} }

View file

@ -33,14 +33,14 @@ QuickSettingsDelegate {
anchors.right: parent.right anchors.right: parent.right
height: parent.height height: parent.height
radius: PlasmaCore.Units.smallSpacing radius: Kirigami.Units.smallSpacing
color: Qt.rgba(0, 0, 0, 0.075) color: Qt.rgba(0, 0, 0, 0.075)
} }
// background // background
Rectangle { Rectangle {
anchors.fill: parent anchors.fill: parent
radius: PlasmaCore.Units.smallSpacing radius: Kirigami.Units.smallSpacing
border.color: root.enabled ? root.enabledButtonBorderColor : root.disabledButtonBorderColor border.color: root.enabled ? root.enabledButtonBorderColor : root.disabledButtonBorderColor
color: { color: {
if (root.enabled) { if (root.enabled) {
@ -71,7 +71,7 @@ QuickSettingsDelegate {
PlasmaCore.IconItem { PlasmaCore.IconItem {
id: icon id: icon
anchors.centerIn: parent anchors.centerIn: parent
implicitWidth: PlasmaCore.Units.iconSizes.smallMedium implicitWidth: Kirigami.Units.iconSizes.smallMedium
implicitHeight: width implicitHeight: width
source: root.icon source: root.icon
} }

View file

@ -34,10 +34,10 @@ Components.BaseItem {
readonly property real contentImplicitHeight: column.implicitHeight readonly property real contentImplicitHeight: column.implicitHeight
// we need extra padding since the background side border is enabled // we need extra padding since the background side border is enabled
topPadding: PlasmaCore.Units.smallSpacing * 4 topPadding: Kirigami.Units.smallSpacing * 4
leftPadding: PlasmaCore.Units.smallSpacing * 4 leftPadding: Kirigami.Units.smallSpacing * 4
rightPadding: PlasmaCore.Units.smallSpacing * 4 rightPadding: Kirigami.Units.smallSpacing * 4
bottomPadding: PlasmaCore.Units.smallSpacing * 4 bottomPadding: Kirigami.Units.smallSpacing * 4
background: KSvg.FrameSvgItem { background: KSvg.FrameSvgItem {
enabledBorders: PlasmaCore.FrameSvg.AllBorders enabledBorders: PlasmaCore.FrameSvg.AllBorders
@ -63,7 +63,7 @@ Components.BaseItem {
Layout.preferredHeight: Kirigami.Units.gridUnit * 1.5 Layout.preferredHeight: Kirigami.Units.gridUnit * 1.5
Layout.maximumHeight: Kirigami.Units.gridUnit * 1.5 Layout.maximumHeight: Kirigami.Units.gridUnit * 1.5
colorGroup: PlasmaCore.Theme.NormalColorGroup colorGroup: Kirigami.Theme.Window
backgroundColor: "transparent" backgroundColor: "transparent"
showSecondRow: false showSecondRow: false
showDropShadow: false showDropShadow: false
@ -82,7 +82,7 @@ Components.BaseItem {
Layout.alignment: Qt.AlignTop Layout.alignment: Qt.AlignTop
Layout.fillWidth: true 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 Layout.maximumWidth: column.width
actionDrawer: root.actionDrawer actionDrawer: root.actionDrawer

View file

@ -3,7 +3,7 @@
import QtQuick 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 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 // 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 pragma Singleton
QtObject { QtObject {
readonly property real topPanelHeight: PlasmaCore.Units.gridUnit + PlasmaCore.Units.smallSpacing readonly property real topPanelHeight: Kirigami.Units.gridUnit + Kirigami.Units.smallSpacing
readonly property real bottomPanelHeight: ShellSettings.Settings.navigationPanelEnabled ? PlasmaCore.Units.gridUnit * 2 : 0 readonly property real bottomPanelHeight: ShellSettings.Settings.navigationPanelEnabled ? Kirigami.Units.gridUnit * 2 : 0
} }

View file

@ -3,7 +3,7 @@
import QtQuick 2.15 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 import org.kde.plasma.components 3.0 as PlasmaComponents
/** /**
@ -16,7 +16,7 @@ PlasmaComponents.Label {
required property string inputText required property string inputText
readonly property string filteredText: inputText.replace(/\n/g, ' ') // remove new line characters 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)) readonly property int charactersOverflow: Math.ceil((txtMeter.advanceWidth - root.width) / (txtMeter.advanceWidth / filteredText.length))
property int step: 0 property int step: 0
@ -36,7 +36,7 @@ PlasmaComponents.Label {
onTriggered: { onTriggered: {
if (paused) { if (paused) {
if (step != 0) { if (step != 0) {
interval = PlasmaCore.Units.veryLongDuration; interval = Kirigami.Units.veryLongDuration;
step = 0; step = 0;
} else { } else {
interval = root.interval; interval = root.interval;
@ -45,7 +45,7 @@ PlasmaComponents.Label {
} else { } else {
step = (step + 1) % filteredText.length; step = (step + 1) % filteredText.length;
if (step === charactersOverflow) { if (step === charactersOverflow) {
interval = PlasmaCore.Units.veryLongDuration * 3; interval = Kirigami.Units.veryLongDuration * 3;
paused = true; paused = true;
} }
} }

View file

@ -93,7 +93,7 @@ MouseArea { // use mousearea to ensure clicks don't go behind
ParallelAnimation { ParallelAnimation {
id: parallelAnim id: parallelAnim
property real animationDuration: PlasmaCore.Units.longDuration + PlasmaCore.Units.shortDuration property real animationDuration: Kirigami.Units.longDuration + Kirigami.Units.shortDuration
ScaleAnimator { ScaleAnimator {
target: background target: background
@ -153,7 +153,7 @@ MouseArea { // use mousearea to ensure clicks don't go behind
properties: "opacity" properties: "opacity"
from: 0 from: 0
to: 1 to: 1
duration: PlasmaCore.Units.longDuration duration: Kirigami.Units.longDuration
easing.type: Easing.OutCubic easing.type: Easing.OutCubic
} }
@ -180,13 +180,13 @@ MouseArea { // use mousearea to ensure clicks don't go behind
Item { Item {
id: iconParent id: iconParent
anchors.centerIn: background anchors.centerIn: background
width: PlasmaCore.Units.iconSizes.enormous width: Kirigami.Units.iconSizes.enormous
height: width height: width
PlasmaCore.IconItem { PlasmaCore.IconItem {
id: icon id: icon
anchors.fill: parent anchors.fill: parent
colorGroup: PlasmaCore.Theme.ComplementaryColorGroup colorGroup: Kirigami.Theme.ComplementaryColorGroup
} }
MultiEffect { MultiEffect {

View file

@ -8,7 +8,6 @@
import QtQuick import QtQuick
import QtQuick.Layouts import QtQuick.Layouts
import org.kde.plasma.core as PlasmaCore
import org.kde.plasma.plasma5support as P5Support import org.kde.plasma.plasma5support as P5Support
import org.kde.plasma.workspace.components as PW import org.kde.plasma.workspace.components as PW

View file

@ -8,7 +8,6 @@
import QtQuick 2.2 import QtQuick 2.2
import QtQuick.Layouts 1.4 import QtQuick.Layouts 1.4
import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.bluezqt 1.0 as BluezQt import org.kde.bluezqt 1.0 as BluezQt
QtObject { QtObject {

View file

@ -4,7 +4,6 @@
import QtQuick import QtQuick
import QtQuick.Window import QtQuick.Window
import org.kde.plasma.core as PlasmaCore
import org.kde.plasma.plasmoid import org.kde.plasma.plasmoid
import org.kde.taskmanager as TaskManager import org.kde.taskmanager as TaskManager

View file

@ -10,8 +10,8 @@ import QtQuick.Layouts
import QtQuick.Window import QtQuick.Window
import QtQuick.Effects import QtQuick.Effects
import org.kde.kirigami 2.20 as Kirigami
import org.kde.taskmanager 0.1 as TaskManager 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.kquickcontrolsaddons 2.0
import org.kde.plasma.private.mobileshell.state 1.0 as MobileShellState import org.kde.plasma.private.mobileshell.state 1.0 as MobileShellState
@ -120,7 +120,7 @@ Item {
when: root.width < root.height when: root.width < root.height
PropertyChanges { PropertyChanges {
target: icons 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 { AnchorChanges {
target: leftButton target: leftButton
@ -160,7 +160,7 @@ Item {
} }
PropertyChanges { PropertyChanges {
target: rightCornerButton target: rightCornerButton
height: PlasmaCore.Units.gridUnit * 2 height: Kirigami.Units.gridUnit * 2
width: icons.width width: icons.width
} }
}, State { }, State {
@ -168,7 +168,7 @@ Item {
when: root.width >= root.height when: root.width >= root.height
PropertyChanges { PropertyChanges {
target: icons 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 { AnchorChanges {
target: leftButton target: leftButton
@ -209,7 +209,7 @@ Item {
PropertyChanges { PropertyChanges {
target: rightCornerButton target: rightCornerButton
height: parent.height height: parent.height
width: PlasmaCore.Units.gridUnit * 2 width: Kirigami.Units.gridUnit * 2
} }
} }
] ]

View file

@ -10,6 +10,7 @@ import QtQuick.Layouts
import QtQuick.Controls as Controls import QtQuick.Controls as Controls
import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.kirigami 2.20 as Kirigami
import org.kde.kquickcontrolsaddons 2.0 import org.kde.kquickcontrolsaddons 2.0
Controls.AbstractButton { Controls.AbstractButton {
@ -26,7 +27,7 @@ Controls.AbstractButton {
radius: height/2 radius: height/2
anchors.fill: parent anchors.fill: parent
opacity: 0 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) // 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 property bool buttonHeld: button.pressed && button.enabled
@ -49,7 +50,7 @@ Controls.AbstractButton {
} }
NumberAnimation on opacity { NumberAnimation on opacity {
id: opacityAnimator id: opacityAnimator
duration: PlasmaCore.Units.shortDuration duration: Kirigami.Units.shortDuration
easing.type: Easing.InOutQuad easing.type: Easing.InOutQuad
onFinished: { onFinished: {
// animate the state back // animate the state back
@ -69,6 +70,6 @@ Controls.AbstractButton {
fill: parent fill: parent
margins: Math.round((side - side * iconSizeFactor * 0.6) / 2) margins: Math.round((side - side * iconSizeFactor * 0.6) / 2)
} }
colorGroup: PlasmaCore.ColorScope.colorGroup colorSet: Kirigami.Theme.colorSet
} }
} }

View file

@ -8,7 +8,6 @@
import QtQuick 2.12 import QtQuick 2.12
import QtQuick.Layouts 1.15 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.plasma5support 2.0 as P5Support
import org.kde.plasma.components 3.0 as PlasmaComponents import org.kde.plasma.components 3.0 as PlasmaComponents
import org.kde.plasma.private.mobileshell 1.0 as MobileShell import org.kde.plasma.private.mobileshell 1.0 as MobileShell
@ -23,6 +22,6 @@ PlasmaComponents.Label {
property bool is24HourTime: MobileShell.ShellUtil.isSystem24HourFormat property bool is24HourTime: MobileShell.ShellUtil.isSystem24HourFormat
text: Qt.formatTime(source.data.Local.DateTime, is24HourTime ? "h:mm" : "h:mm ap") text: Qt.formatTime(source.data.Local.DateTime, is24HourTime ? "h:mm" : "h:mm ap")
color: PlasmaCore.ColorScope.textColor color: Kirigami.Theme.textColor
verticalAlignment: Qt.AlignVCenter verticalAlignment: Qt.AlignVCenter
} }

View file

@ -12,6 +12,8 @@ import QtQuick.Effects
import QtQuick.Controls as Controls import QtQuick.Controls as Controls
import QtQml.Models import QtQml.Models
import org.kde.kirigami 2.20 as Kirigami
import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.plasma5support 2.0 as P5Support import org.kde.plasma.plasma5support 2.0 as P5Support
import org.kde.plasma.components 3.0 as PlasmaComponents import org.kde.plasma.components 3.0 as PlasmaComponents
@ -57,7 +59,7 @@ Item {
readonly property real textPixelSize: 11 readonly property real textPixelSize: 11
readonly property real smallerTextPixelSize: 9 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 { P5Support.DataSource {
id: timeSource id: timeSource
@ -97,18 +99,19 @@ Item {
} }
// screen top panel // screen top panel
PlasmaCore.ColorScope { Item {
id: icons id: icons
z: 1 z: 1
colorGroup: root.colorGroup Kirigami.Theme.colorSet: root.Kirigami.Theme.colorSet
Kirigami.Theme.inherit: false
anchors.fill: parent anchors.fill: parent
Controls.Control { Controls.Control {
id: control id: control
topPadding: PlasmaCore.Units.smallSpacing topPadding: Kirigami.Units.smallSpacing
bottomPadding: PlasmaCore.Units.smallSpacing bottomPadding: Kirigami.Units.smallSpacing
rightPadding: PlasmaCore.Units.smallSpacing * 3 rightPadding: Kirigami.Units.smallSpacing * 3
leftPadding: PlasmaCore.Units.smallSpacing * 3 leftPadding: Kirigami.Units.smallSpacing * 3
anchors.fill: parent anchors.fill: parent
background: Rectangle { background: Rectangle {
@ -116,7 +119,7 @@ Item {
} }
contentItem: ColumnLayout { contentItem: ColumnLayout {
spacing: PlasmaCore.Units.smallSpacing / 2 spacing: Kirigami.Units.smallSpacing / 2
RowLayout { RowLayout {
id: row id: row
@ -163,7 +166,7 @@ Item {
// system indicators // system indicators
RowLayout { RowLayout {
id: indicators 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 Layout.fillHeight: true
spacing: root.elementSpacing spacing: root.elementSpacing

View file

@ -6,6 +6,7 @@
import QtQuick 2.1 import QtQuick 2.1
import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.kirigami 2.20 as Kirigami
Item { Item {
id: taskIcon id: taskIcon
@ -28,7 +29,7 @@ Item {
width: Math.min(parent.width, parent.height) width: Math.min(parent.width, parent.height)
height: width height: width
anchors.centerIn: parent anchors.centerIn: parent
colorGroup: PlasmaCore.ColorScope.colorGroup colorSet: Kirigami.Theme.colorSet
} }
MouseArea { MouseArea {

View file

@ -8,7 +8,8 @@
import QtQuick 2.6 import QtQuick 2.6
import QtQuick.Layouts 1.4 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.components 3.0 as PlasmaComponents
import org.kde.plasma.workspace.components 2.0 as PW import org.kde.plasma.workspace.components 2.0 as PW
@ -16,7 +17,7 @@ import "../../dataproviders" as DataProviders
RowLayout { RowLayout {
readonly property var provider: DataProviders.BatteryInfo {} 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 visible: provider.isVisible
@ -37,7 +38,7 @@ RowLayout {
text: i18n("%1%", provider.percent) text: i18n("%1%", provider.percent)
Layout.alignment: Qt.AlignVCenter Layout.alignment: Qt.AlignVCenter
color: PlasmaCore.ColorScope.textColor color: Kirigami.Theme.textColor
font.pixelSize: textPixelSize font.pixelSize: textPixelSize
} }
} }

View file

@ -10,6 +10,7 @@ import QtQuick
import QtQuick.Layouts import QtQuick.Layouts
import org.kde.plasma.core as PlasmaCore import org.kde.plasma.core as PlasmaCore
import org.kde.kirigami 2.20 as Kirigami
import org.kde.bluezqt as BluezQt import org.kde.bluezqt as BluezQt
import "../../dataproviders" as DataProviders import "../../dataproviders" as DataProviders
@ -20,7 +21,7 @@ PlasmaCore.IconItem {
readonly property var provider: DataProviders.BluetoothInfo {} readonly property var provider: DataProviders.BluetoothInfo {}
source: "network-bluetooth" // provider.icon source: "network-bluetooth" // provider.icon
colorGroup: PlasmaCore.ColorScope.colorGroup colorSet: Kirigami.Theme.colorSet
visible: provider.isVisible visible: provider.isVisible
} }

View file

@ -11,6 +11,7 @@ import QtQuick.Layouts
import org.kde.plasma.core as PlasmaCore import org.kde.plasma.core as PlasmaCore
import org.kde.plasma.components 3.0 as PlasmaComponents import org.kde.plasma.components 3.0 as PlasmaComponents
import org.kde.plasma.networkmanagement 0.2 as PlasmaNM import org.kde.plasma.networkmanagement 0.2 as PlasmaNM
import org.kde.kirigami 2.20 as Kirigami
PlasmaCore.IconItem { PlasmaCore.IconItem {
id: connectionIcon id: connectionIcon
@ -39,7 +40,7 @@ PlasmaCore.IconItem {
// implementation // implementation
source: icon source: icon
colorGroup: PlasmaCore.ColorScope.colorGroup colorSet: Kirigami.Theme.colorSet
PlasmaComponents.BusyIndicator { PlasmaComponents.BusyIndicator {
id: connectingIndicator id: connectingIndicator

View file

@ -10,6 +10,7 @@ import QtQuick.Layouts
import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.components 3.0 as PlasmaComponents import org.kde.plasma.components 3.0 as PlasmaComponents
import org.kde.kirigami 2.20 as Kirigami
import "../../dataproviders" as DataProviders import "../../dataproviders" as DataProviders
@ -22,14 +23,14 @@ Item {
readonly property bool isInternetIndicatorMobileData: internetIndicator && internetIndicator.icon && internetIndicator.icon.startsWith('network-mobile-') readonly property bool isInternetIndicatorMobileData: internetIndicator && internetIndicator.icon && internetIndicator.icon.startsWith('network-mobile-')
property bool showLabel: true 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 width: strengthIcon.width + label.width
Layout.minimumWidth: strengthIcon.width + label.width Layout.minimumWidth: strengthIcon.width + label.width
PlasmaCore.IconItem { PlasmaCore.IconItem {
id: strengthIcon id: strengthIcon
colorGroup: PlasmaCore.ColorScope.colorGroup colorSet: Kirigami.Theme.colorSet
anchors.left: parent.left anchors.left: parent.left
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
width: height width: height
@ -45,12 +46,12 @@ Item {
id: label id: label
visible: showLabel visible: showLabel
width: visible ? implicitWidth : 0 width: visible ? implicitWidth : 0
anchors.leftMargin: PlasmaCore.Units.smallSpacing anchors.leftMargin: Kirigami.Units.smallSpacing
anchors.left: strengthIcon.right anchors.left: strengthIcon.right
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
text: provider.label text: provider.label
color: PlasmaCore.ColorScope.textColor color: Kirigami.Theme.textColor
font.pixelSize: textPixelSize font.pixelSize: textPixelSize
} }
} }

View file

@ -11,6 +11,7 @@ import QtQuick.Layouts
import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.private.volume 0.1 import org.kde.plasma.private.volume 0.1
import org.kde.kirigami 2.20 as Kirigami
import "../../dataproviders" as DataProviders import "../../dataproviders" as DataProviders
@ -20,7 +21,7 @@ PlasmaCore.IconItem {
source: provider.icon source: provider.icon
colorGroup: PlasmaCore.ColorScope.colorGroup colorSet: Kirigami.Theme.colorSet
visible: provider.isVisible visible: provider.isVisible
} }

View file

@ -10,9 +10,8 @@ import QtQuick.Layouts
import QtQuick.Window import QtQuick.Window
import QtQuick.Controls as Controls 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.components 3.0 as PlasmaComponents
import org.kde.plasma.extras as PlasmaExtra
import org.kde.kquickcontrolsaddons as KQCAddons import org.kde.kquickcontrolsaddons as KQCAddons
import org.kde.plasma.private.volume import org.kde.plasma.private.volume
@ -53,17 +52,17 @@ ColumnLayout {
PopupCard { PopupCard {
Layout.alignment: Qt.AlignHCenter Layout.alignment: Qt.AlignHCenter
Layout.bottomMargin: PlasmaCore.Units.largeSpacing Layout.bottomMargin: Kirigami.Units.gridUnit
contentItem: ColumnLayout { contentItem: ColumnLayout {
anchors.rightMargin: PlasmaCore.Units.smallSpacing anchors.rightMargin: Kirigami.Units.smallSpacing
anchors.leftMargin: PlasmaCore.Units.smallSpacing anchors.leftMargin: Kirigami.Units.smallSpacing
PlasmaExtra.Heading { Kirigami.Heading {
level: 2 level: 2
text: i18n("Outputs") text: i18n("Outputs")
Layout.fillWidth: true Layout.fillWidth: true
Layout.topMargin: PlasmaCore.Units.smallSpacing Layout.topMargin: Kirigami.Units.smallSpacing
Layout.leftMargin: PlasmaCore.Units.smallSpacing Layout.leftMargin: Kirigami.Units.smallSpacing
} }
Repeater { Repeater {
@ -73,7 +72,7 @@ ColumnLayout {
model: paSinkFilterModel model: paSinkFilterModel
delegate: DeviceListItem { delegate: DeviceListItem {
Layout.fillWidth: true Layout.fillWidth: true
Layout.margins: PlasmaCore.Units.smallSpacing Layout.margins: Kirigami.Units.smallSpacing
type: "sink" type: "sink"
onlyone: sinkView.count === 1 onlyone: sinkView.count === 1
} }
@ -83,17 +82,17 @@ ColumnLayout {
PopupCard { PopupCard {
Layout.alignment: Qt.AlignHCenter Layout.alignment: Qt.AlignHCenter
Layout.bottomMargin: PlasmaCore.Units.largeSpacing Layout.bottomMargin: Kirigami.Units.gridUnit
contentItem: ColumnLayout { contentItem: ColumnLayout {
anchors.rightMargin: PlasmaCore.Units.smallSpacing anchors.rightMargin: Kirigami.Units.smallSpacing
anchors.leftMargin: PlasmaCore.Units.smallSpacing anchors.leftMargin: Kirigami.Units.smallSpacing
PlasmaExtra.Heading { Kirigami.Heading {
level: 2 level: 2
text: i18n("Inputs") text: i18n("Inputs")
Layout.fillWidth: true Layout.fillWidth: true
Layout.topMargin: PlasmaCore.Units.smallSpacing Layout.topMargin: Kirigami.Units.smallSpacing
Layout.leftMargin: PlasmaCore.Units.smallSpacing Layout.leftMargin: Kirigami.Units.smallSpacing
} }
Repeater { Repeater {
@ -103,7 +102,7 @@ ColumnLayout {
model: paSourceFilterModel model: paSourceFilterModel
delegate: DeviceListItem { delegate: DeviceListItem {
Layout.fillWidth: true Layout.fillWidth: true
Layout.margins: PlasmaCore.Units.smallSpacing Layout.margins: Kirigami.Units.smallSpacing
type: "source" type: "source"
onlyone: sinkView.count === 1 onlyone: sinkView.count === 1
} }
@ -114,17 +113,17 @@ ColumnLayout {
PopupCard { PopupCard {
visible: sourceInputView.model.count + sourceMediaInputView.model.count !== 0 visible: sourceInputView.model.count + sourceMediaInputView.model.count !== 0
Layout.alignment: Qt.AlignHCenter Layout.alignment: Qt.AlignHCenter
Layout.bottomMargin: PlasmaCore.Units.largeSpacing Layout.bottomMargin: Kirigami.Units.gridUnit
contentItem: ColumnLayout { contentItem: ColumnLayout {
anchors.rightMargin: PlasmaCore.Units.smallSpacing anchors.rightMargin: Kirigami.Units.smallSpacing
anchors.leftMargin: PlasmaCore.Units.smallSpacing anchors.leftMargin: Kirigami.Units.smallSpacing
PlasmaExtra.Heading { Kirigami.Heading {
level: 2 level: 2
text: i18n("Playback Streams") text: i18n("Playback Streams")
Layout.fillWidth: true Layout.fillWidth: true
Layout.topMargin: PlasmaCore.Units.smallSpacing Layout.topMargin: Kirigami.Units.smallSpacing
Layout.leftMargin: PlasmaCore.Units.smallSpacing Layout.leftMargin: Kirigami.Units.smallSpacing
} }
Repeater { Repeater {
@ -137,7 +136,7 @@ ColumnLayout {
} }
delegate: StreamListItem { delegate: StreamListItem {
Layout.fillWidth: true Layout.fillWidth: true
Layout.margins: PlasmaCore.Units.smallSpacing Layout.margins: Kirigami.Units.smallSpacing
width: sourceOutputView.width width: sourceOutputView.width
type: "sink-input" type: "sink-input"
devicesModel: sourceView.model devicesModel: sourceView.model
@ -155,7 +154,7 @@ ColumnLayout {
delegate: StreamListItem { delegate: StreamListItem {
Layout.fillWidth: true Layout.fillWidth: true
Layout.margins: PlasmaCore.Units.smallSpacing Layout.margins: Kirigami.Units.smallSpacing
width: sourceOutputView.width width: sourceOutputView.width
type: "sink-input" type: "sink-input"
devicesModel: sourceView.model devicesModel: sourceView.model
@ -167,17 +166,17 @@ ColumnLayout {
PopupCard { PopupCard {
visible: sourceOutputView.model.count !== 0 visible: sourceOutputView.model.count !== 0
Layout.alignment: Qt.AlignHCenter Layout.alignment: Qt.AlignHCenter
Layout.bottomMargin: PlasmaCore.Units.largeSpacing Layout.bottomMargin: Kirigami.Units.gridUnit
contentItem: ColumnLayout { contentItem: ColumnLayout {
anchors.rightMargin: PlasmaCore.Units.smallSpacing anchors.rightMargin: Kirigami.Units.smallSpacing
anchors.leftMargin: PlasmaCore.Units.smallSpacing anchors.leftMargin: Kirigami.Units.smallSpacing
PlasmaExtra.Heading { Kirigami.Heading {
level: 2 level: 2
text: i18n("Recording Streams") text: i18n("Recording Streams")
Layout.fillWidth: true Layout.fillWidth: true
Layout.topMargin: PlasmaCore.Units.smallSpacing Layout.topMargin: Kirigami.Units.smallSpacing
Layout.leftMargin: PlasmaCore.Units.smallSpacing Layout.leftMargin: Kirigami.Units.smallSpacing
} }
Repeater { Repeater {
@ -190,7 +189,7 @@ ColumnLayout {
} }
delegate: StreamListItem { delegate: StreamListItem {
Layout.fillWidth: true Layout.fillWidth: true
Layout.margins: PlasmaCore.Units.smallSpacing Layout.margins: Kirigami.Units.smallSpacing
width: sourceOutputView.width width: sourceOutputView.width
type: "source-output" type: "source-output"
devicesModel: sourceView.model devicesModel: sourceView.model

View file

@ -11,11 +11,11 @@ import QtQuick.Controls 2.15 as Controls
import QtQuick.Layouts 1.1 import QtQuick.Layouts 1.1
import QtQuick.Window 2.2 import QtQuick.Window 2.2
import org.kde.kirigami 2.20 as Kirigami
import org.kde.ksvg 1.0 as KSvg import org.kde.ksvg 1.0 as KSvg
import org.kde.kquickcontrolsaddons 2.0 import org.kde.kquickcontrolsaddons 2.0
import org.kde.plasma.core 2.1 as PlasmaCore import org.kde.plasma.core 2.1 as PlasmaCore
import org.kde.plasma.components 3.0 as PlasmaComponents 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 org.kde.plasma.private.volume 0.1
import "icon.js" as Icon import "icon.js" as Icon
@ -37,12 +37,12 @@ Controls.ItemDelegate {
contentItem: RowLayout { contentItem: RowLayout {
id: row id: row
spacing: PlasmaCore.Units.smallSpacing spacing: Kirigami.Units.smallSpacing
PlasmaComponents.RadioButton { PlasmaComponents.RadioButton {
id: selectButton id: selectButton
Layout.alignment: Qt.AlignTop 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 checked: model.PulseObject.hasOwnProperty("default") ? model.PulseObject.default : false
visible: (baseItem.type == "sink" && sinkView.model.count > 1) || (baseItem.type == "source" && sourceView.model.count > 1) visible: (baseItem.type == "sink" && sinkView.model.count > 1) || (baseItem.type == "source" && sourceView.model.count > 1)
onClicked: model.PulseObject.default = true onClicked: model.PulseObject.default = true
@ -52,9 +52,9 @@ Controls.ItemDelegate {
PlasmaCore.IconItem { PlasmaCore.IconItem {
id: clientIcon id: clientIcon
Layout.alignment: Qt.AlignVCenter Layout.alignment: Qt.AlignVCenter
Layout.rightMargin: PlasmaCore.Units.smallSpacing Layout.rightMargin: Kirigami.Units.smallSpacing
Layout.preferredWidth: PlasmaCore.Units.iconSizes.smallMedium Layout.preferredWidth: Kirigami.Units.iconSizes.smallMedium
Layout.preferredHeight: PlasmaCore.Units.iconSizes.smallMedium Layout.preferredHeight: Kirigami.Units.iconSizes.smallMedium
visible: type === "sink-input" || type === "source-output" visible: type === "sink-input" || type === "source-output"
source: "unknown" source: "unknown"
onSourceChanged: { onSourceChanged: {
@ -67,11 +67,11 @@ Controls.ItemDelegate {
ColumnLayout { ColumnLayout {
Layout.alignment: Qt.AlignVCenter Layout.alignment: Qt.AlignVCenter
Layout.fillWidth: true Layout.fillWidth: true
spacing: PlasmaCore.Units.smallSpacing spacing: Kirigami.Units.smallSpacing
RowLayout { RowLayout {
Layout.fillWidth: true Layout.fillWidth: true
spacing: PlasmaCore.Units.smallSpacing spacing: Kirigami.Units.smallSpacing
Layout.alignment: Qt.AlignBottom Layout.alignment: Qt.AlignBottom
PlasmaComponents.Label { PlasmaComponents.Label {
@ -84,7 +84,7 @@ Controls.ItemDelegate {
PlasmaComponents.ToolButton { PlasmaComponents.ToolButton {
Layout.alignment: Qt.AlignBottom Layout.alignment: Qt.AlignBottom
Layout.bottomMargin: -PlasmaCore.Units.smallSpacing Layout.bottomMargin: -Kirigami.Units.smallSpacing
icon.name: "application-menu" icon.name: "application-menu"
checkable: true checkable: true
checked: contextMenu.visible && contextMenu.visualParent === this checked: contextMenu.visible && contextMenu.visualParent === this
@ -127,7 +127,7 @@ Controls.ItemDelegate {
RowLayout { RowLayout {
Layout.fillWidth: true 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) // this slider was effectively copied from the source (linked at the top of the file)
PlasmaComponents.Slider { PlasmaComponents.Slider {
@ -175,7 +175,7 @@ Controls.ItemDelegate {
Behavior on width { Behavior on width {
NumberAnimation { NumberAnimation {
id: animation id: animation
duration: PlasmaCore.Units.shortDuration duration: Kirigami.Units.shortDuration
easing.type: Easing.OutQuad easing.type: Easing.OutQuad
} }
} }
@ -231,11 +231,11 @@ Controls.ItemDelegate {
text: i18nc("volume percentage", "%1%", displayValue) text: i18nc("volume percentage", "%1%", displayValue)
color: { color: {
if (displayValue <= 100) { if (displayValue <= 100) {
return PlasmaCore.Theme.textColor return Kirigami.Theme.textColor
} else if (displayValue > 100 && displayValue <= 125) { } else if (displayValue > 100 && displayValue <= 125) {
return PlasmaCore.Theme.neutralTextColor return Kirigami.Theme.neutralTextColor
} else { } else {
return PlasmaCore.Theme.negativeTextColor return Kirigami.Theme.negativeTextColor
} }
} }
} }

View file

@ -9,18 +9,18 @@ import QtQuick.Controls as Controls
import QtQuick.Layouts import QtQuick.Layouts
import QtQuick.Window import QtQuick.Window
import org.kde.kirigami 2.20 as Kirigami
import org.kde.ksvg 1.0 as KSvg 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 import org.kde.plasma.components 3.0 as PlasmaComponents
// capture presses on the audio applet so it doesn't close the overlay // capture presses on the audio applet so it doesn't close the overlay
Controls.Control { Controls.Control {
id: content id: content
implicitWidth: Math.min(PlasmaCore.Units.gridUnit * 20, parent.width - PlasmaCore.Units.largeSpacing * 2) implicitWidth: Math.min(Kirigami.Units.gridUnit * 20, parent.width - Kirigami.Units.gridUnit * 2)
padding: PlasmaCore.Units.smallSpacing * 2 padding: Kirigami.Units.smallSpacing * 2
background: KSvg.FrameSvgItem { background: KSvg.FrameSvgItem {
imagePath: "widgets/background" imagePath: "widgets/background"
anchors.margins: -PlasmaCore.Units.smallSpacing * 2 anchors.margins: -Kirigami.Units.smallSpacing * 2
anchors.fill: parent anchors.fill: parent
} }
} }

View file

@ -11,10 +11,8 @@ import QtQuick.Controls as Controls
import QtQuick.Layouts import QtQuick.Layouts
import QtQuick.Window import QtQuick.Window
import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.kirigami 2.20 as Kirigami
import org.kde.plasma.extras 2.0 as PlasmaExtra
import org.kde.plasma.components 3.0 as PlasmaComponents 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.nanoshell 2.0 as NanoShell
import org.kde.plasma.private.mobileshell 1.0 as MobileShell import org.kde.plasma.private.mobileshell 1.0 as MobileShell
import org.kde.plasma.private.mobileshell.state 1.0 as MobileShellState import org.kde.plasma.private.mobileshell.state 1.0 as MobileShellState
@ -99,24 +97,24 @@ NanoShell.FullScreenOverlay {
// osd card // osd card
PopupCard { PopupCard {
id: osd id: osd
Layout.topMargin: PlasmaCore.Units.largeSpacing Layout.topMargin: Kirigami.Units.gridUnit
Layout.alignment: Qt.AlignHCenter Layout.alignment: Qt.AlignHCenter
contentItem: RowLayout { contentItem: RowLayout {
id: containerLayout id: containerLayout
spacing: PlasmaCore.Units.smallSpacing spacing: Kirigami.Units.smallSpacing
anchors.leftMargin: PlasmaCore.Units.smallSpacing * 2 anchors.leftMargin: Kirigami.Units.smallSpacing * 2
anchors.rightMargin: PlasmaCore.Units.smallSpacing anchors.rightMargin: Kirigami.Units.smallSpacing
PlasmaComponents.ToolButton { PlasmaComponents.ToolButton {
icon.name: !audioInfo.paSinkModel.preferredSink || audioInfo.paSinkModel.preferredSink.muted ? "audio-volume-muted" : "audio-volume-high" 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") text: !audioInfo.paSinkModel.preferredSink || audioInfo.paSinkModel.preferredSink.muted ? i18n("Unmute") : i18n("Mute")
display: Controls.AbstractButton.IconOnly display: Controls.AbstractButton.IconOnly
Layout.alignment: Qt.AlignVCenter Layout.alignment: Qt.AlignVCenter
Layout.preferredWidth: PlasmaCore.Units.iconSizes.medium Layout.preferredWidth: Kirigami.Units.iconSizes.medium
Layout.preferredHeight: PlasmaCore.Units.iconSizes.medium Layout.preferredHeight: Kirigami.Units.iconSizes.medium
Layout.rightMargin: PlasmaCore.Units.smallSpacing Layout.rightMargin: Kirigami.Units.smallSpacing
onClicked: muteVolume() onClicked: muteVolume()
} }
@ -124,11 +122,11 @@ NanoShell.FullScreenOverlay {
id: volumeSlider id: volumeSlider
Layout.fillWidth: true Layout.fillWidth: true
Layout.alignment: Qt.AlignVCenter Layout.alignment: Qt.AlignVCenter
Layout.rightMargin: PlasmaCore.Units.smallSpacing * 2 Layout.rightMargin: Kirigami.Units.smallSpacing * 2
value: window.volume value: window.volume
from: 0 from: 0
to: 100 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 // Get the width of a three-digit number so we can size the label
@ -139,11 +137,11 @@ NanoShell.FullScreenOverlay {
font: percentageLabel.font font: percentageLabel.font
} }
PlasmaExtra.Heading { Kirigami.Heading {
id: percentageLabel id: percentageLabel
Layout.preferredWidth: widestLabelSize.width Layout.preferredWidth: widestLabelSize.width
Layout.alignment: Qt.AlignVCenter Layout.alignment: Qt.AlignVCenter
Layout.rightMargin: PlasmaCore.Units.smallSpacing Layout.rightMargin: Kirigami.Units.smallSpacing
level: 3 level: 3
text: i18nc("Percentage value", "%1%", window.volume) text: i18nc("Percentage value", "%1%", window.volume)
@ -154,11 +152,11 @@ NanoShell.FullScreenOverlay {
// and plasma-pa:VolumeSlider.qml // and plasma-pa:VolumeSlider.qml
color: { color: {
if (volumeSlider.value <= 100) { if (volumeSlider.value <= 100) {
return PlasmaCore.Theme.textColor return Kirigami.Theme.textColor
} else if (volumeSlider.value > 100 && volumeSlider.value <= 125) { } else if (volumeSlider.value > 100 && volumeSlider.value <= 125) {
return PlasmaCore.Theme.neutralTextColor return Kirigami.Theme.neutralTextColor
} else { } else {
return PlasmaCore.Theme.negativeTextColor return Kirigami.Theme.negativeTextColor
} }
} }
} }
@ -170,15 +168,15 @@ NanoShell.FullScreenOverlay {
opacity: showFullApplet ? 1 : 0 opacity: showFullApplet ? 1 : 0
display: Controls.AbstractButton.IconOnly display: Controls.AbstractButton.IconOnly
Layout.alignment: Qt.AlignVCenter Layout.alignment: Qt.AlignVCenter
Layout.preferredWidth: PlasmaCore.Units.iconSizes.medium Layout.preferredWidth: Kirigami.Units.iconSizes.medium
Layout.preferredHeight: PlasmaCore.Units.iconSizes.medium Layout.preferredHeight: Kirigami.Units.iconSizes.medium
Layout.rightMargin: PlasmaCore.Units.smallSpacing Layout.rightMargin: Kirigami.Units.smallSpacing
Behavior on opacity { NumberAnimation { duration: PlasmaCore.Units.shortDuration } } Behavior on opacity { NumberAnimation { duration: Kirigami.Units.shortDuration } }
onClicked: { onClicked: {
let coords = mapToItem(flickable, 0, 0); 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"); MobileShell.ShellUtil.executeCommand("plasma-open-settings kcm_pulseaudio");
} }
} }
@ -188,8 +186,8 @@ NanoShell.FullScreenOverlay {
text: i18n("Toggle showing audio streams") text: i18n("Toggle showing audio streams")
display: Controls.AbstractButton.IconOnly display: Controls.AbstractButton.IconOnly
Layout.alignment: Qt.AlignVCenter Layout.alignment: Qt.AlignVCenter
Layout.preferredWidth: PlasmaCore.Units.iconSizes.medium Layout.preferredWidth: Kirigami.Units.iconSizes.medium
Layout.preferredHeight: PlasmaCore.Units.iconSizes.medium Layout.preferredHeight: Kirigami.Units.iconSizes.medium
onClicked: { onClicked: {
window.showFullApplet = !window.showFullApplet window.showFullApplet = !window.showFullApplet
// don't autohide applet when full applet is shown // don't autohide applet when full applet is shown
@ -206,7 +204,7 @@ NanoShell.FullScreenOverlay {
// other applet cards // other applet cards
AudioApplet { AudioApplet {
id: applet id: applet
Layout.topMargin: PlasmaCore.Units.largeSpacing Layout.topMargin: Kirigami.Units.gridUnit
Layout.alignment: Qt.AlignHCenter Layout.alignment: Qt.AlignHCenter
Layout.preferredWidth: cards.width Layout.preferredWidth: cards.width
@ -215,7 +213,7 @@ NanoShell.FullScreenOverlay {
opacity: window.showFullApplet ? 1 : 0 opacity: window.showFullApplet ? 1 : 0
visible: opacity !== 0 visible: opacity !== 0
transform: Translate { transform: Translate {
y: window.showFullApplet ? 0 : -PlasmaCore.Units.gridUnit y: window.showFullApplet ? 0 : -Kirigami.Units.gridUnit
Behavior on y { NumberAnimation {} } Behavior on y { NumberAnimation {} }
} }

View file

@ -62,7 +62,7 @@ Item {
// emitted when an item on the ListView is triggered // emitted when an item on the ListView is triggered
signal actionTriggered() 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 openedContentY: 0
readonly property real openFactor: Math.max(0, Math.min(1, 1 - flickable.contentY / closedContentY)) readonly property real openFactor: Math.max(0, Math.min(1, 1 - flickable.contentY / closedContentY))
readonly property bool isOpen: openFactor != 0 readonly property bool isOpen: openFactor != 0
@ -118,7 +118,7 @@ Item {
NumberAnimation on contentY { NumberAnimation on contentY {
id: anim id: anim
duration: PlasmaCore.Units.longDuration * 2 duration: Kirigami.Units.longDuration * 2
easing.type: Easing.OutQuad easing.type: Easing.OutQuad
running: false running: false
onFinished: { onFinished: {
@ -136,16 +136,16 @@ Item {
Controls.Control { Controls.Control {
opacity: root.openFactor opacity: root.openFactor
Layout.fillWidth: true Layout.fillWidth: true
Layout.maximumWidth: PlasmaCore.Units.gridUnit * 30 Layout.maximumWidth: Kirigami.Units.gridUnit * 30
Layout.alignment: Qt.AlignHCenter Layout.alignment: Qt.AlignHCenter
Layout.topMargin: PlasmaCore.Units.gridUnit Layout.topMargin: Kirigami.Units.gridUnit
Layout.leftMargin: PlasmaCore.Units.gridUnit Layout.leftMargin: Kirigami.Units.gridUnit
Layout.rightMargin: PlasmaCore.Units.gridUnit Layout.rightMargin: Kirigami.Units.gridUnit
leftPadding: PlasmaCore.Units.smallSpacing leftPadding: Kirigami.Units.smallSpacing
rightPadding: PlasmaCore.Units.smallSpacing rightPadding: Kirigami.Units.smallSpacing
topPadding: PlasmaCore.Units.smallSpacing topPadding: Kirigami.Units.smallSpacing
bottomPadding: PlasmaCore.Units.smallSpacing bottomPadding: Kirigami.Units.smallSpacing
background: Item { background: Item {
@ -162,8 +162,8 @@ Item {
Rectangle { Rectangle {
id: rectBackground id: rectBackground
anchors.fill: parent anchors.fill: parent
color: PlasmaCore.Theme.backgroundColor color: Kirigami.Theme.backgroundColor
radius: PlasmaCore.Units.smallSpacing radius: Kirigami.Units.smallSpacing
} }
} }
@ -189,7 +189,7 @@ Item {
Controls.ScrollView { Controls.ScrollView {
opacity: root.openFactor === 1 ? 1 : 0 opacity: root.openFactor === 1 ? 1 : 0
Behavior on opacity { Behavior on opacity {
NumberAnimation { duration: PlasmaCore.Units.shortDuration } NumberAnimation { duration: Kirigami.Units.shortDuration }
} }
Layout.fillWidth: true Layout.fillWidth: true
@ -199,7 +199,7 @@ Item {
id: listView id: listView
queryString: queryField.text queryString: queryField.text
clip: true clip: true
PlasmaCore.ColorScope.colorGroup: PlasmaCore.Theme.NormalColorGroup Kirigami.Theme.colorSet: Kirigami.Theme.Window
highlight: activeFocus ? highlightComponent : null highlight: activeFocus ? highlightComponent : null
Component{ Component{
@ -239,49 +239,49 @@ Item {
anchors.fill: parent anchors.fill: parent
color: delegate.pressed ? Qt.rgba(255, 255, 255, 0.2) : (delegate.containsMouse ? Qt.rgba(255, 255, 255, 0.05) : "transparent") color: delegate.pressed ? Qt.rgba(255, 255, 255, 0.2) : (delegate.containsMouse ? Qt.rgba(255, 255, 255, 0.05) : "transparent")
Behavior on color { Behavior on color {
ColorAnimation { duration: PlasmaCore.Units.shortDuration } ColorAnimation { duration: Kirigami.Units.shortDuration }
} }
} }
RowLayout { RowLayout {
id: rowLayout id: rowLayout
height: PlasmaCore.Units.gridUnit * 3 height: Kirigami.Units.gridUnit * 3
anchors.top: parent.top anchors.top: parent.top
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
anchors.leftMargin: PlasmaCore.Units.largeSpacing anchors.leftMargin: Kirigami.Units.gridUnit
anchors.rightMargin: PlasmaCore.Units.largeSpacing anchors.rightMargin: Kirigami.Units.gridUnit
Kirigami.Icon { Kirigami.Icon {
Layout.alignment: Qt.AlignVCenter Layout.alignment: Qt.AlignVCenter
source: model.decoration source: model.decoration
implicitWidth: PlasmaCore.Units.iconSizes.medium implicitWidth: Kirigami.Units.iconSizes.medium
implicitHeight: PlasmaCore.Units.iconSizes.medium implicitHeight: Kirigami.Units.iconSizes.medium
} }
ColumnLayout { ColumnLayout {
Layout.fillWidth: true Layout.fillWidth: true
Layout.alignment: Qt.AlignVCenter Layout.alignment: Qt.AlignVCenter
spacing: PlasmaCore.Units.smallSpacing spacing: Kirigami.Units.smallSpacing
PlasmaComponents.Label { PlasmaComponents.Label {
id: title id: title
Layout.fillWidth: true Layout.fillWidth: true
Layout.leftMargin: PlasmaCore.Units.smallSpacing * 2 Layout.leftMargin: Kirigami.Units.smallSpacing * 2
Layout.rightMargin: PlasmaCore.Units.largeSpacing Layout.rightMargin: Kirigami.Units.gridUnit
maximumLineCount: 1 maximumLineCount: 1
elide: Text.ElideRight elide: Text.ElideRight
text: typeof modelData !== "undefined" ? modelData : model.display text: typeof modelData !== "undefined" ? modelData : model.display
color: "white" color: "white"
font.pointSize: PlasmaCore.Theme.defaultFont.pointSize font.pointSize: Kirigami.Theme.defaultFont.pointSize
} }
PlasmaComponents.Label { PlasmaComponents.Label {
id: subtitle id: subtitle
Layout.fillWidth: true Layout.fillWidth: true
Layout.leftMargin: PlasmaCore.Units.smallSpacing * 2 Layout.leftMargin: Kirigami.Units.smallSpacing * 2
Layout.rightMargin: PlasmaCore.Units.largeSpacing Layout.rightMargin: Kirigami.Units.gridUnit
maximumLineCount: 1 maximumLineCount: 1
elide: Text.ElideRight elide: Text.ElideRight
@ -289,7 +289,7 @@ Item {
color: "white" color: "white"
opacity: 0.8 opacity: 0.8
font.pointSize: Math.round(PlasmaCore.Theme.defaultFont.pointSize * 0.8) font.pointSize: Math.round(Kirigami.Theme.defaultFont.pointSize * 0.8)
} }
} }

View file

@ -5,7 +5,7 @@ import QtQuick
import QtQuick.Effects import QtQuick.Effects
import Qt5Compat.GraphicalEffects import Qt5Compat.GraphicalEffects
import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.kirigami 2.20 as Kirigami
Item { Item {
id: root id: root
@ -24,7 +24,7 @@ Item {
anchors.centerIn: parent anchors.centerIn: parent
width: img.width width: img.width
height: img.height height: img.height
radius: PlasmaCore.Units.smallSpacing radius: Kirigami.Units.smallSpacing
} }
} }
} }

View file

@ -7,7 +7,6 @@
import QtQuick import QtQuick
import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.plasma5support 2.0 as P5Support import org.kde.plasma.plasma5support 2.0 as P5Support
P5Support.DataSource { P5Support.DataSource {

View file

@ -12,9 +12,7 @@ import QtQuick.Controls as QQC2
import org.kde.kirigami as Kirigami import org.kde.kirigami as Kirigami
import org.kde.plasma.private.mobileshell.state 1.0 as MobileShellState 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.components 3.0 as PlasmaComponents3
import org.kde.plasma.extras 2.0 as PlasmaExtras
import "../../components" as Components import "../../components" as Components
@ -25,8 +23,8 @@ Item {
id: root id: root
visible: mpris2Source.hasPlayer visible: mpris2Source.hasPlayer
readonly property real padding: Kirigami.Units.largeSpacing + Kirigami.Units.smallSpacing readonly property real padding: Kirigami.Units.gridUnit + Kirigami.Units.smallSpacing
readonly property real contentHeight: PlasmaCore.Units.gridUnit * 2 + PlasmaCore.Units.smallSpacing readonly property real contentHeight: Kirigami.Units.gridUnit * 2 + Kirigami.Units.smallSpacing
implicitHeight: visible ? padding * 2 + contentHeight : 0 implicitHeight: visible ? padding * 2 + contentHeight : 0
MediaControlsSource { MediaControlsSource {
@ -93,8 +91,9 @@ Item {
imageSource: mpris2Source.albumArt(playerItem.source) imageSource: mpris2Source.albumArt(playerItem.source)
} }
contentItem: PlasmaCore.ColorScope { contentItem: Item {
colorGroup: PlasmaCore.Theme.ComplementaryColorGroup Kirigami.Theme.colorSet: Kirigami.Theme.Complementary
Kirigami.Theme.inherit: false
width: playerItem.width - playerItem.leftPadding - playerItem.rightPadding width: playerItem.width - playerItem.leftPadding - playerItem.rightPadding
RowLayout { RowLayout {
@ -117,7 +116,7 @@ Item {
} }
ColumnLayout { ColumnLayout {
Layout.leftMargin: albumArt.visible ? Kirigami.Units.largeSpacing : 0 Layout.leftMargin: albumArt.visible ? Kirigami.Units.gridUnit : 0
Layout.fillWidth: true Layout.fillWidth: true
spacing: Kirigami.Units.smallSpacing spacing: Kirigami.Units.smallSpacing
@ -126,7 +125,7 @@ Item {
inputText: mpris2Source.track(playerItem.source) || i18n("No media playing") inputText: mpris2Source.track(playerItem.source) || i18n("No media playing")
textFormat: Text.PlainText textFormat: Text.PlainText
font.pointSize: PlasmaCore.Theme.defaultFont.pointSize font.pointSize: Kirigami.Theme.defaultFont.pointSize
color: "white" color: "white"
} }
@ -136,7 +135,7 @@ Item {
// if no artist is given, show player name instead // if no artist is given, show player name instead
inputText: mpris2Source.artist(playerItem.source) || modelData.application || "" inputText: mpris2Source.artist(playerItem.source) || modelData.application || ""
textFormat: Text.PlainText textFormat: Text.PlainText
font.pointSize: PlasmaCore.Theme.defaultFont.pointSize * 0.9 font.pointSize: Kirigami.Theme.defaultFont.pointSize * 0.9
opacity: 0.9 opacity: 0.9
color: "white" color: "white"
} }
@ -148,8 +147,8 @@ Item {
enabled: mpris2Source.canGoBack(playerItem.source) enabled: mpris2Source.canGoBack(playerItem.source)
icon.name: LayoutMirroring.enabled ? "media-skip-forward" : "media-skip-backward" icon.name: LayoutMirroring.enabled ? "media-skip-forward" : "media-skip-backward"
icon.width: PlasmaCore.Units.iconSizes.small icon.width: Kirigami.Units.iconSizes.small
icon.height: PlasmaCore.Units.iconSizes.small icon.height: Kirigami.Units.iconSizes.small
onClicked: mpris2Source.goPrevious(playerItem.source) onClicked: mpris2Source.goPrevious(playerItem.source)
visible: mpris2Source.canGoBack(playerItem.source) || mpris2Source.canGoNext(playerItem.source) visible: mpris2Source.canGoBack(playerItem.source) || mpris2Source.canGoNext(playerItem.source)
Accessible.name: i18nd("plasma_lookandfeel_org.kde.lookandfeel", "Previous track") Accessible.name: i18nd("plasma_lookandfeel_org.kde.lookandfeel", "Previous track")
@ -160,8 +159,8 @@ Item {
Layout.preferredWidth: height Layout.preferredWidth: height
icon.name: mpris2Source.isPlaying(playerItem.source) ? "media-playback-pause" : "media-playback-start" icon.name: mpris2Source.isPlaying(playerItem.source) ? "media-playback-pause" : "media-playback-start"
icon.width: PlasmaCore.Units.iconSizes.small icon.width: Kirigami.Units.iconSizes.small
icon.height: PlasmaCore.Units.iconSizes.small icon.height: Kirigami.Units.iconSizes.small
onClicked: mpris2Source.playPause(playerItem.source) onClicked: mpris2Source.playPause(playerItem.source)
Accessible.name: i18nd("plasma_lookandfeel_org.kde.lookandfeel", "Play or Pause media") Accessible.name: i18nd("plasma_lookandfeel_org.kde.lookandfeel", "Play or Pause media")
} }
@ -172,8 +171,8 @@ Item {
enabled: mpris2Source.canGoBack(playerItem.source) enabled: mpris2Source.canGoBack(playerItem.source)
icon.name: LayoutMirroring.enabled ? "media-skip-backward" : "media-skip-forward" icon.name: LayoutMirroring.enabled ? "media-skip-backward" : "media-skip-forward"
icon.width: PlasmaCore.Units.iconSizes.small icon.width: Kirigami.Units.iconSizes.small
icon.height: PlasmaCore.Units.iconSizes.small icon.height: Kirigami.Units.iconSizes.small
onClicked: mpris2Source.goNext(playerItem.source) onClicked: mpris2Source.goNext(playerItem.source)
visible: mpris2Source.canGoBack(playerItem.source) || mpris2Source.canGoNext(playerItem.source) visible: mpris2Source.canGoBack(playerItem.source) || mpris2Source.canGoNext(playerItem.source)
Accessible.name: i18nd("plasma_lookandfeel_org.kde.lookandfeel", "Next track") Accessible.name: i18nd("plasma_lookandfeel_org.kde.lookandfeel", "Next track")

View file

@ -9,10 +9,8 @@ import QtQuick
import QtQuick.Layouts import QtQuick.Layouts
import QtQuick.Window 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.plasma5support 2.0 as P5Support
import org.kde.plasma.components 3.0 as PlasmaComponents3 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 import org.kde.notificationmanager 1.0 as NotificationManager

View file

@ -6,7 +6,6 @@ import QtQuick.Effects
import org.kde.kirigami 2.12 as Kirigami 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 import org.kde.plasma.components 3.0 as PlasmaComponents
Item { Item {
@ -27,7 +26,7 @@ Item {
onContentItemChanged: { onContentItemChanged: {
contentItem.parent = contentParent; contentItem.parent = contentParent;
contentItem.anchors.fill = contentParent; contentItem.anchors.fill = contentParent;
contentItem.anchors.margins = Kirigami.Units.largeSpacing; contentItem.anchors.margins = Kirigami.Units.gridUnit;
contentParent.children.push(contentItem); contentParent.children.push(contentItem);
} }
@ -35,7 +34,7 @@ Item {
NumberAnimation on dragOffset { NumberAnimation on dragOffset {
id: dragAnim id: dragAnim
duration: PlasmaCore.Units.longDuration duration: Kirigami.Units.longDuration
onFinished: { onFinished: {
if (to !== 0) { if (to !== 0) {
root.dismissRequested(); root.dismissRequested();
@ -52,7 +51,7 @@ Item {
shadowEnabled: true shadowEnabled: true
shadowVerticalOffset: 1 shadowVerticalOffset: 1
shadowOpacity: 0.5 shadowOpacity: 0.5
shadowColor: Qt.lighter(PlasmaCore.Theme.backgroundColor, 0.1) shadowColor: Qt.lighter(Kirigami.Theme.backgroundColor, 0.1)
} }
// shadow // shadow
@ -63,8 +62,8 @@ Item {
anchors.rightMargin: -1 anchors.rightMargin: -1
anchors.bottomMargin: -1 anchors.bottomMargin: -1
color: Qt.darker(PlasmaCore.Theme.backgroundColor, 1.3) color: Qt.darker(Kirigami.Theme.backgroundColor, 1.3)
radius: PlasmaCore.Units.smallSpacing radius: Kirigami.Units.smallSpacing
} }
// card // card
@ -76,8 +75,8 @@ Item {
anchors.rightMargin: root.dragOffset < 0 ? -root.dragOffset : 0 anchors.rightMargin: root.dragOffset < 0 ? -root.dragOffset : 0
anchors.top: parent.top anchors.top: parent.top
color: (root.tapEnabled && mouseArea.pressed) ? Qt.darker(PlasmaCore.Theme.backgroundColor, 1.1) : PlasmaCore.Theme.backgroundColor color: (root.tapEnabled && mouseArea.pressed) ? Qt.darker(Kirigami.Theme.backgroundColor, 1.1) : Kirigami.Theme.backgroundColor
radius: PlasmaCore.Units.smallSpacing radius: Kirigami.Units.smallSpacing
implicitHeight: contentParent.implicitHeight implicitHeight: contentParent.implicitHeight
clip: true clip: true
@ -127,7 +126,7 @@ Item {
startActive = active; startActive = active;
if (!active) { // release event if (!active) { // release event
let threshold = PlasmaCore.Units.gridUnit * 5; // drag threshold let threshold = Kirigami.Units.gridUnit * 5; // drag threshold
if (root.dragOffset > threshold) { if (root.dragOffset > threshold) {
dragAnim.to = root.width; dragAnim.to = root.width;
} else if (root.dragOffset < -threshold) { } else if (root.dragOffset < -threshold) {

View file

@ -8,7 +8,7 @@
import QtQuick 2.15 import QtQuick 2.15
import QtQuick.Layouts 1.1 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 import org.kde.plasma.components 3.0 as PlasmaComponents
Item { Item {
@ -22,14 +22,14 @@ Item {
Flow { Flow {
id: actionFlow id: actionFlow
width: parent.width width: parent.width
spacing: PlasmaCore.Units.smallSpacing spacing: Kirigami.Units.smallSpacing
layoutDirection: Qt.RightToLeft layoutDirection: Qt.RightToLeft
enabled: !replyLoader.active enabled: !replyLoader.active
opacity: replyLoader.active ? 0 : 1 opacity: replyLoader.active ? 0 : 1
Behavior on opacity { Behavior on opacity {
NumberAnimation { NumberAnimation {
duration: PlasmaCore.Units.longDuration duration: Kirigami.Units.longDuration
easing.type: Easing.InOutQuad easing.type: Easing.InOutQuad
} }
} }
@ -88,13 +88,13 @@ Item {
Behavior on x { Behavior on x {
NumberAnimation { NumberAnimation {
duration: PlasmaCore.Units.longDuration duration: Kirigami.Units.longDuration
easing.type: Easing.InOutQuad easing.type: Easing.InOutQuad
} }
} }
Behavior on opacity { Behavior on opacity {
NumberAnimation { NumberAnimation {
duration: PlasmaCore.Units.longDuration duration: Kirigami.Units.longDuration
easing.type: Easing.InOutQuad easing.type: Easing.InOutQuad
} }
} }

View file

@ -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.core 2.0 as PlasmaCore
import org.kde.plasma.plasma5support 2.0 as P5Support import org.kde.plasma.plasma5support 2.0 as P5Support
import org.kde.plasma.components 3.0 as PlasmaComponents 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 import org.kde.notificationmanager 1.0 as NotificationManager
@ -39,15 +38,15 @@ RowLayout {
property real timeout: 5000 property real timeout: 5000
property real remainingTime: 0 property real remainingTime: 0
spacing: PlasmaCore.Units.smallSpacing spacing: Kirigami.Units.smallSpacing
Layout.preferredHeight: Math.max(applicationNameLabel.implicitHeight, PlasmaCore.Units.iconSizes.small) Layout.preferredHeight: Math.max(applicationNameLabel.implicitHeight, Kirigami.Units.iconSizes.small)
PlasmaCore.IconItem { PlasmaCore.IconItem {
id: applicationIconItem id: applicationIconItem
Layout.topMargin: PlasmaCore.Units.smallSpacing Layout.topMargin: Kirigami.Units.smallSpacing
Layout.bottomMargin: PlasmaCore.Units.smallSpacing Layout.bottomMargin: Kirigami.Units.smallSpacing
Layout.preferredWidth: PlasmaCore.Units.iconSizes.small Layout.preferredWidth: Kirigami.Units.iconSizes.small
Layout.preferredHeight: PlasmaCore.Units.iconSizes.small Layout.preferredHeight: Kirigami.Units.iconSizes.small
source: notificationHeading.applicationIconSource source: notificationHeading.applicationIconSource
usesPlasmaTheme: false usesPlasmaTheme: false
visible: valid visible: valid
@ -55,7 +54,7 @@ RowLayout {
PlasmaComponents.Label { PlasmaComponents.Label {
id: applicationNameLabel id: applicationNameLabel
Layout.leftMargin: PlasmaCore.Units.smallSpacing Layout.leftMargin: Kirigami.Units.smallSpacing
Layout.fillWidth: true Layout.fillWidth: true
opacity: 0.6 opacity: 0.6
textFormat: Text.PlainText textFormat: Text.PlainText

View file

@ -11,7 +11,6 @@ import QtQuick.Window 2.2
import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.components 3.0 as PlasmaComponents 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 import org.kde.notificationmanager 1.0 as NotificationManager
@ -33,8 +32,8 @@ BaseNotificationItem {
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
PlasmaCore.ColorScope.colorGroup: PlasmaCore.Theme.HeaderColorGroup Kirigami.Theme.colorSet: Kirigami.Theme.Header
PlasmaCore.ColorScope.inherit: false Kirigami.Theme.inherit: false
visible: !notificationItem.inGroup visible: !notificationItem.inGroup
height: visible ? implicitHeight : 0 height: visible ? implicitHeight : 0
@ -54,7 +53,7 @@ BaseNotificationItem {
// notification // notification
NotificationCard { NotificationCard {
id: mainCard id: mainCard
anchors.topMargin: notificationHeading.visible ? Kirigami.Units.largeSpacing : 0 anchors.topMargin: notificationHeading.visible ? Kirigami.Units.gridUnit : 0
anchors.top: notificationHeading.bottom anchors.top: notificationHeading.bottom
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
@ -71,7 +70,7 @@ BaseNotificationItem {
// notification summary row // notification summary row
RowLayout { RowLayout {
Layout.fillWidth: true Layout.fillWidth: true
Layout.bottomMargin: PlasmaCore.Units.smallSpacing Layout.bottomMargin: Kirigami.Units.smallSpacing
// notification summary // notification summary
PlasmaComponents.Label { PlasmaComponents.Label {
@ -101,7 +100,7 @@ BaseNotificationItem {
// notification contents // notification contents
RowLayout { RowLayout {
Layout.fillWidth: true Layout.fillWidth: true
spacing: PlasmaCore.Units.smallSpacing spacing: Kirigami.Units.smallSpacing
// notification text // notification text
NotificationBodyLabel { NotificationBodyLabel {
@ -112,7 +111,7 @@ BaseNotificationItem {
// HACK RichText does not allow to specify link color and since LineEdit // 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, // does not support StyledText, we have to inject some CSS to force the color,
// cf. QTBUG-81463 and to some extent QTBUG-80354 // cf. QTBUG-81463 and to some extent QTBUG-80354
text: "<style>a { color: " + PlasmaCore.Theme.linkColor + "; }</style>" + notificationItem.body text: "<style>a { color: " + Kirigami.Theme.linkColor + "; }</style>" + notificationItem.body
// Cannot do text !== "" because RichText adds some HTML tags even when empty // Cannot do text !== "" because RichText adds some HTML tags even when empty
visible: notificationItem.body !== "" visible: notificationItem.body !== ""
@ -121,10 +120,10 @@ BaseNotificationItem {
// notification icon // notification icon
Item { Item {
id: iconContainer id: iconContainer
Layout.preferredWidth: PlasmaCore.Units.iconSizes.large Layout.preferredWidth: Kirigami.Units.iconSizes.large
Layout.preferredHeight: PlasmaCore.Units.iconSizes.large Layout.preferredHeight: Kirigami.Units.iconSizes.large
Layout.topMargin: PlasmaCore.Units.smallSpacing Layout.topMargin: Kirigami.Units.smallSpacing
Layout.bottomMargin: PlasmaCore.Units.smallSpacing Layout.bottomMargin: Kirigami.Units.smallSpacing
visible: iconItem.active visible: iconItem.active
@ -151,7 +150,7 @@ BaseNotificationItem {
// thumbnails // thumbnails
Loader { Loader {
id: thumbnailStripLoader id: thumbnailStripLoader
Layout.topMargin: Kirigami.Units.largeSpacing Layout.topMargin: Kirigami.Units.gridUnit
Layout.fillWidth: true Layout.fillWidth: true
active: notificationItem.urls.length > 0 active: notificationItem.urls.length > 0
visible: active visible: active

View file

@ -8,7 +8,7 @@
import QtQuick 2.8 import QtQuick 2.8
import QtQuick.Layouts 1.1 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 import org.kde.plasma.components 3.0 as PlasmaComponents3
RowLayout { RowLayout {
@ -24,7 +24,7 @@ RowLayout {
property string buttonIconName property string buttonIconName
property string buttonText property string buttonText
spacing: PlasmaCore.Units.smallSpacing spacing: Kirigami.Units.smallSpacing
function activate() { function activate() {
replyTextField.forceActiveFocus(); replyTextField.forceActiveFocus();

View file

@ -9,10 +9,8 @@ import QtQuick 2.8
import QtQuick.Layouts 1.1 import QtQuick.Layouts 1.1
import QtQuick.Window 2.2 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.plasma5support 2.0 as P5Support
import org.kde.plasma.components 3.0 as PlasmaComponents 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 import org.kde.notificationmanager 1.0 as NotificationManager
@ -47,7 +45,7 @@ PlasmaComponents.Label {
ageLabel.agoText = Util.generateNotificationHeaderAgoText(time, jobState); 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 // the "n minutes ago" text, for jobs we show remaining time instead
// updated periodically by a Timer hence this property with generate() function // updated periodically by a Timer hence this property with generate() function

View file

@ -12,7 +12,6 @@ import Qt5Compat.GraphicalEffects
import org.kde.kirigami 2.12 as Kirigami 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.plasma5support 2.0 as P5Support
import org.kde.plasma.private.mobileshell 1.0 as MobileShell import org.kde.plasma.private.mobileshell 1.0 as MobileShell
import org.kde.plasma.private.mobileshell.shellsettingsplugin as ShellSettings import org.kde.plasma.private.mobileshell.shellsettingsplugin as ShellSettings
@ -144,7 +143,7 @@ Item {
property var pendingNotificationWithAction 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. // 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 readonly property bool listOverflowing: contentItem.childrenRect.height + toolButtons.height + spacing >= root.height
@ -159,7 +158,7 @@ Item {
} }
boundsBehavior: Flickable.StopAtBounds boundsBehavior: Flickable.StopAtBounds
spacing: Kirigami.Units.largeSpacing spacing: Kirigami.Units.gridUnit
// TODO keyboard focus // TODO keyboard focus
highlightMoveDuration: 0 highlightMoveDuration: 0
@ -173,7 +172,7 @@ Item {
PlasmaExtras.PlaceholderMessage { PlasmaExtras.PlaceholderMessage {
anchors.centerIn: parent anchors.centerIn: parent
width: parent.width - (PlasmaCore.Units.largeSpacing * 4) width: parent.width - (Kirigami.Units.gridUnit * 4)
text: i18n("Notification service not available") text: i18n("Notification service not available")
visible: list.count === 0 && !NotificationManager.Server.valid && historyModelType === NotificationsModelType.NotificationsModel visible: list.count === 0 && !NotificationManager.Server.valid && historyModelType === NotificationsModelType.NotificationsModel
@ -230,9 +229,9 @@ Item {
anchors { anchors {
left: parent ? parent.left : undefined left: parent ? parent.left : undefined
leftMargin: PlasmaCore.Units.largeSpacing leftMargin: Kirigami.Units.gridUnit
right: parent ? parent.right : undefined right: parent ? parent.right : undefined
rightMargin: PlasmaCore.Units.largeSpacing rightMargin: Kirigami.Units.gridUnit
} }
height: model.isGroup ? groupDelegate.height : notificationDelegate.height height: model.isGroup ? groupDelegate.height : notificationDelegate.height
@ -263,7 +262,7 @@ Item {
id: notificationDelegate id: notificationDelegate
Column { Column {
spacing: PlasmaCore.Units.smallSpacing spacing: Kirigami.Units.smallSpacing
height: notificationItem.height + showMoreLoader.height height: notificationItem.height + showMoreLoader.height
@ -354,7 +353,7 @@ Item {
visible: list.listOverflowing visible: list.listOverflowing
height: 1 height: 1
opacity: 0.25 opacity: 0.25
color: PlasmaCore.Theme.textColor color: Kirigami.Theme.textColor
} }
RowLayout { RowLayout {
@ -364,8 +363,8 @@ Item {
top: spacer.bottom top: spacer.bottom
right: parent.right right: parent.right
left: parent.left left: parent.left
leftMargin: PlasmaCore.Units.largeSpacing leftMargin: Kirigami.Units.gridUnit
rightMargin: PlasmaCore.Units.largeSpacing rightMargin: Kirigami.Units.gridUnit
topMargin: list.spacing topMargin: list.spacing
bottomMargin: list.spacing bottomMargin: list.spacing
} }

View file

@ -8,9 +8,9 @@ import QtQuick
import QtQuick.Layouts import QtQuick.Layouts
import QtQuick.Effects import QtQuick.Effects
import org.kde.kirigami 2.20 as Kirigami
import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.components 3.0 as PlasmaComponents3 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.plasma.private.mobileshell 1.0 as MobileShell
import org.kde.kquickcontrolsaddons 2.0 as KQCAddons import org.kde.kquickcontrolsaddons 2.0 as KQCAddons
@ -95,7 +95,7 @@ MouseArea {
PlasmaCore.IconItem { PlasmaCore.IconItem {
anchors.centerIn: parent anchors.centerIn: parent
width: height width: height
height: PlasmaCore.Units.roundToIconSize(parent.height) height: Kirigami.Units.iconSizes.roundedIconSize(parent.height)
usesPlasmaTheme: false usesPlasmaTheme: false
source: !thumbnailer.busy && !thumbnailer.hasPreview ? thumbnailer.iconName : "" source: !thumbnailer.busy && !thumbnailer.hasPreview ? thumbnailer.iconName : ""
} }
@ -111,7 +111,7 @@ MouseArea {
anchors { anchors {
top: parent.top top: parent.top
right: parent.right right: parent.right
margins: PlasmaCore.Units.smallSpacing margins: Kirigami.Units.smallSpacing
} }
Accessible.name: tooltip.text Accessible.name: tooltip.text
icon.name: "application-menu" icon.name: "application-menu"

View file

@ -8,8 +8,9 @@ import QtQuick 2.4
import QtQuick.Layouts 1.1 import QtQuick.Layouts 1.1
import QtQuick.Controls 2.3 as Controls 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.plasmoid 2.0
import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.kquickcontrolsaddons 2.0 import org.kde.kquickcontrolsaddons 2.0
@ -26,13 +27,13 @@ LauncherContainer {
Behavior on height { Behavior on height {
NumberAnimation { NumberAnimation {
duration: PlasmaCore.Units.longDuration duration: Kirigami.Units.longDuration
easing.type: Easing.InOutQuad easing.type: Easing.InOutQuad
} }
} }
Behavior on opacity { Behavior on opacity {
OpacityAnimator { OpacityAnimator {
duration: PlasmaCore.Units.longDuration * 4 duration: Kirigami.Units.longDuration * 4
easing.type: Easing.InOutQuad easing.type: Easing.InOutQuad
} }
} }

View file

@ -8,7 +8,6 @@ import QtQuick 2.15
import QtQuick.Layouts 1.15 import QtQuick.Layouts 1.15
import org.kde.taskmanager 0.1 as TaskManager 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.components 3.0 as PlasmaComponents
import org.kde.plasma.private.mobileshell 1.0 as MobileShell import org.kde.plasma.private.mobileshell 1.0 as MobileShell

View file

@ -9,6 +9,8 @@ import QtQuick.Layouts 1.1
import QtQuick.Controls 2.3 as Controls import QtQuick.Controls 2.3 as Controls
import Qt5Compat.GraphicalEffects import Qt5Compat.GraphicalEffects
import org.kde.kirigami 2.20 as Kirigami
import org.kde.plasma.plasmoid 2.0 import org.kde.plasma.plasmoid 2.0
import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.components 3.0 as PC3 import org.kde.plasma.components 3.0 as PC3
@ -60,7 +62,7 @@ ContainmentLayoutManager.ItemContainer {
if (modelData.applicationRunning) { if (modelData.applicationRunning) {
delegate.launch(0, 0, "", modelData.applicationName); delegate.launch(0, 0, "", modelData.applicationName);
} else { } 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); desktopModel.setMinimizedDelegate(index, delegate);
@ -148,10 +150,10 @@ ContainmentLayoutManager.ItemContainer {
ColumnLayout { ColumnLayout {
anchors { anchors {
fill: parent fill: parent
leftMargin: PlasmaCore.Units.smallSpacing * 2 leftMargin: Kirigami.Units.smallSpacing * 2
topMargin: PlasmaCore.Units.smallSpacing * 2 topMargin: Kirigami.Units.smallSpacing * 2
rightMargin: PlasmaCore.Units.smallSpacing * 2 rightMargin: Kirigami.Units.smallSpacing * 2
bottomMargin: PlasmaCore.Units.smallSpacing * 2 bottomMargin: Kirigami.Units.smallSpacing * 2
} }
spacing: 0 spacing: 0
@ -160,7 +162,7 @@ ContainmentLayoutManager.ItemContainer {
Layout.alignment: Qt.AlignHCenter | Qt.AlignTop Layout.alignment: Qt.AlignHCenter | Qt.AlignTop
Layout.fillWidth: true 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 Layout.preferredHeight: Layout.minimumHeight
usesPlasmaTheme: false usesPlasmaTheme: false
@ -173,9 +175,9 @@ ContainmentLayoutManager.ItemContainer {
} }
visible: model.applicationRunning visible: model.applicationRunning
radius: width radius: width
width: PlasmaCore.Units.smallSpacing width: Kirigami.Units.smallSpacing
height: width height: width
color: PlasmaCore.Theme.highlightColor color: Kirigami.Theme.highlightColor
} }
// darken effect when hovered/pressed // darken effect when hovered/pressed
@ -200,9 +202,9 @@ ContainmentLayoutManager.ItemContainer {
Layout.fillWidth: true Layout.fillWidth: true
Layout.preferredHeight: delegate.reservedSpaceForLabel Layout.preferredHeight: delegate.reservedSpaceForLabel
Layout.alignment: Qt.AlignTop Layout.alignment: Qt.AlignTop
Layout.topMargin: PlasmaCore.Units.smallSpacing Layout.topMargin: Kirigami.Units.smallSpacing
Layout.leftMargin: -parent.anchors.leftMargin + PlasmaCore.Units.smallSpacing * 2 Layout.leftMargin: -parent.anchors.leftMargin + Kirigami.Units.smallSpacing * 2
Layout.rightMargin: -parent.anchors.rightMargin + PlasmaCore.Units.smallSpacing * 2 Layout.rightMargin: -parent.anchors.rightMargin + Kirigami.Units.smallSpacing * 2
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
@ -212,7 +214,7 @@ ContainmentLayoutManager.ItemContainer {
text: model.applicationName text: model.applicationName
font.pointSize: PlasmaCore.Theme.defaultFont.pointSize * 0.8 font.pointSize: Kirigami.Theme.defaultFont.pointSize * 0.8
font.weight: Font.Bold font.weight: Font.Bold
color: "white" color: "white"

View file

@ -10,7 +10,6 @@ import QtQuick.Window 2.12
import QtQuick.Layouts 1.1 import QtQuick.Layouts 1.1
import org.kde.plasma.plasmoid 2.0 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.components 3.0 as PlasmaComponents
import org.kde.draganddrop 2.0 as DragDrop import org.kde.draganddrop 2.0 as DragDrop

View file

@ -9,8 +9,9 @@ import QtQuick.Window 2.12
import QtQuick.Layouts 1.1 import QtQuick.Layouts 1.1
import Qt5Compat.GraphicalEffects import Qt5Compat.GraphicalEffects
import org.kde.kirigami 2.20 as Kirigami
import org.kde.plasma.plasmoid 2.0 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.components 3.0 as PlasmaComponents
import org.kde.draganddrop 2.0 as DragDrop import org.kde.draganddrop 2.0 as DragDrop
@ -89,10 +90,10 @@ DragDrop.DropArea {
let scenePos = mapToItem(null, event.x, event.y); let scenePos = mapToItem(null, event.x, event.y);
//SCROLL LEFT //SCROLL LEFT
if (scenePos.x < PlasmaCore.Units.gridUnit) { if (scenePos.x < Kirigami.Units.gridUnit) {
homeScreenPages.scrollLeft(); homeScreenPages.scrollLeft();
//SCROLL RIGHT //SCROLL RIGHT
} else if (scenePos.x > homeScreenPages.width - PlasmaCore.Units.gridUnit) { } else if (scenePos.x > homeScreenPages.width - Kirigami.Units.gridUnit) {
homeScreenPages.scrollRight(); homeScreenPages.scrollRight();
//DON't SCROLL //DON't SCROLL
} else { } else {
@ -194,10 +195,10 @@ DragDrop.DropArea {
// Sets the containment in edit mode when we go in edit mode as well // Sets the containment in edit mode when we go in edit mode as well
onEditModeChanged: plasmoid.editMode = editMode; onEditModeChanged: plasmoid.editMode = editMode;
minimumItemWidth: PlasmaCore.Units.gridUnit * 3 minimumItemWidth: Kirigami.Units.gridUnit * 3
minimumItemHeight: minimumItemWidth minimumItemHeight: minimumItemWidth
defaultItemWidth: PlasmaCore.Units.gridUnit * 6 defaultItemWidth: Kirigami.Units.gridUnit * 6
defaultItemHeight: defaultItemWidth defaultItemHeight: defaultItemWidth
acceptsAppletCallback: function(applet, x, y) { acceptsAppletCallback: function(applet, x, y) {
@ -219,7 +220,7 @@ DragDrop.DropArea {
id: metrics id: metrics
text: "M\nM" text: "M\nM"
visible: false visible: false
font.pointSize: PlasmaCore.Theme.defaultFont.pointSize * 0.9 font.pointSize: Kirigami.Theme.defaultFont.pointSize * 0.9
} }
LauncherRepeater { LauncherRepeater {
id: launcherRepeater id: launcherRepeater

View file

@ -9,8 +9,9 @@ import QtQuick 2.12
import QtQuick.Window 2.12 import QtQuick.Window 2.12
import QtQuick.Layouts 1.1 import QtQuick.Layouts 1.1
import org.kde.kirigami 2.20 as Kirigami
import org.kde.plasma.plasmoid 2.0 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.components 3.0 as PlasmaComponents
import org.kde.draganddrop 2.0 as DragDrop import org.kde.draganddrop 2.0 as DragDrop
@ -82,7 +83,7 @@ MobileShell.Flickable {
repeat: true repeat: true
interval: 1500 interval: 1500
onTriggered: { 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 bottomMargin: mainFlickable.footer ? mainFlickable.footer.height : 0
} }
PlasmaCore.ColorScope.inherit: false Kirigami.Theme.inherit: false
PlasmaCore.ColorScope.colorGroup: PlasmaCore.Theme.ComplementaryColorGroup Kirigami.Theme.colorSet: Kirigami.Theme.Complementary
parent: mainFlickable parent: mainFlickable
visible: count > 1 visible: count > 1
@ -105,11 +106,11 @@ MobileShell.Flickable {
delegate: Rectangle { delegate: Rectangle {
property bool isAddPageIndicator: index === pageIndicator.count-1 && mainFlickable.showAddPageIndicator property bool isAddPageIndicator: index === pageIndicator.count-1 && mainFlickable.showAddPageIndicator
implicitWidth: PlasmaCore.Units.gridUnit/2 implicitWidth: Kirigami.Units.gridUnit/2
implicitHeight: implicitWidth implicitHeight: implicitWidth
radius: width radius: width
color: isAddPageIndicator ? "transparent" : PlasmaCore.ColorScope.textColor color: isAddPageIndicator ? "transparent" : Kirigami.Theme.textColor
PlasmaComponents.Label { PlasmaComponents.Label {
anchors.centerIn: parent anchors.centerIn: parent
@ -120,7 +121,7 @@ MobileShell.Flickable {
opacity: index === pageIndicator.currentIndex ? 0.9 : pressed ? 0.7 : 0.5 opacity: index === pageIndicator.currentIndex ? 0.9 : pressed ? 0.7 : 0.5
Behavior on opacity { Behavior on opacity {
OpacityAnimator { OpacityAnimator {
duration: PlasmaCore.Units.longDuration duration: Kirigami.Units.longDuration
easing.type: Easing.InOutQuad easing.type: Easing.InOutQuad
} }
} }
@ -142,7 +143,7 @@ MobileShell.Flickable {
id: scrollLeftIndicator id: scrollLeftIndicator
anchors { anchors {
left: parent.left left: parent.left
leftMargin: PlasmaCore.Units.smallSpacing leftMargin: Kirigami.Units.smallSpacing
} }
elementId: "left-arrow" elementId: "left-arrow"
} }
@ -150,7 +151,7 @@ MobileShell.Flickable {
id: scrollRightIndicator id: scrollRightIndicator
anchors { anchors {
right: parent.right right: parent.right
rightMargin: PlasmaCore.Units.smallSpacing rightMargin: Kirigami.Units.smallSpacing
} }
elementId: "right-arrow" elementId: "right-arrow"
} }

View file

@ -6,7 +6,7 @@
import QtQuick 2.15 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 import org.kde.plasma.private.mobileshell 1.0 as MobileShell
@ -311,7 +311,7 @@ QtObject {
case HomeScreenState.SwipingPages: { case HomeScreenState.SwipingPages: {
// update pages position // update pages position
let currentPageIndexPosition = xPositionFromPageIndex(currentPageIndex); let currentPageIndexPosition = xPositionFromPageIndex(currentPageIndex);
let duration = PlasmaCore.Units.longDuration * 2; let duration = Kirigami.Units.longDuration * 2;
if (xPosition < currentPageIndexPosition) { if (xPosition < currentPageIndexPosition) {
if (movingRight) { if (movingRight) {
@ -409,7 +409,7 @@ QtObject {
target: root target: root
property: "yPosition" property: "yPosition"
to: appDrawerOpenYPosition to: appDrawerOpenYPosition
duration: PlasmaCore.Units.longDuration * 2 duration: Kirigami.Units.longDuration * 2
easing.type: Easing.OutCubic easing.type: Easing.OutCubic
onFinished: { onFinished: {
@ -422,7 +422,7 @@ QtObject {
target: root target: root
property: "yPosition" property: "yPosition"
to: pagesYPosition to: pagesYPosition
duration: PlasmaCore.Units.longDuration * 2 duration: Kirigami.Units.longDuration * 2
easing.type: Easing.OutCubic easing.type: Easing.OutCubic
onFinished: { onFinished: {

View file

@ -8,8 +8,9 @@ import QtQuick 2.4
import QtQuick.Layouts 1.1 import QtQuick.Layouts 1.1
import QtQuick.Controls 2.3 as Controls 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.plasmoid 2.0
import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.kquickcontrolsaddons 2.0 import org.kde.kquickcontrolsaddons 2.0
import org.kde.plasma.private.containmentlayoutmanager 1.0 as ContainmentLayoutManager import org.kde.plasma.private.containmentlayoutmanager 1.0 as ContainmentLayoutManager
@ -18,9 +19,9 @@ Item {
id: root id: root
readonly property int reservedSpaceForLabel: metrics.height 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 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 property ContainmentLayoutManager.AppletsLayout appletsLayout
@ -28,18 +29,18 @@ Item {
property alias flow: applicationsFlow property alias flow: applicationsFlow
implicitWidth: frame.implicitWidth implicitWidth: frame.implicitWidth
implicitHeight: Math.max(PlasmaCore.Units.gridUnit*3, frame.implicitHeight) implicitHeight: Math.max(Kirigami.Units.gridUnit*3, frame.implicitHeight)
Controls.Label { Controls.Label {
id: metrics id: metrics
text: "M\nM" text: "M\nM"
visible: false visible: false
font.pointSize: PlasmaCore.Theme.defaultFont.pointSize * 0.9 font.pointSize: Kirigami.Theme.defaultFont.pointSize * 0.9
} }
Item { Item {
id: spacer id: spacer
width: PlasmaCore.Units.gridUnit * 4 width: Kirigami.Units.gridUnit * 4
height: width height: width
} }
@ -67,7 +68,7 @@ Item {
move: Transition { move: Transition {
NumberAnimation { NumberAnimation {
duration: PlasmaCore.Units.longDuration duration: Kirigami.Units.longDuration
easing.type: Easing.InOutQuad easing.type: Easing.InOutQuad
properties: "x,y" properties: "x,y"
} }
@ -76,7 +77,7 @@ Item {
} }
Behavior on implicitWidth { Behavior on implicitWidth {
NumberAnimation { NumberAnimation {
duration: PlasmaCore.Units.longDuration duration: Kirigami.Units.longDuration
easing.type: Easing.InOutQuad easing.type: Easing.InOutQuad
} }
} }

View file

@ -10,7 +10,6 @@ import QtQuick.Controls 2.3 as Controls
import Qt5Compat.GraphicalEffects import Qt5Compat.GraphicalEffects
import org.kde.plasma.plasmoid 2.0 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.kquickcontrolsaddons 2.0
import org.kde.plasma.private.containmentlayoutmanager 1.0 as ContainmentLayoutManager 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); var pos = plasmoid.fullRepresentationItem.mapFromItem(delegate, dragCenter.x, dragCenter.y);
//SCROLL LEFT //SCROLL LEFT
if (pos.x < PlasmaCore.Units.gridUnit) { if (pos.x < Kirigami.Units.gridUnit) {
launcherRepeater.scrollLeftRequested(); launcherRepeater.scrollLeftRequested();
//SCROLL RIGHT //SCROLL RIGHT
} else if (pos.x > homeScreenState.pageWidth - PlasmaCore.Units.gridUnit) { } else if (pos.x > homeScreenState.pageWidth - Kirigami.Units.gridUnit) {
launcherRepeater.scrollRightRequested(); launcherRepeater.scrollRightRequested();
//DON't SCROLL //DON't SCROLL
} else { } else {

View file

@ -9,8 +9,9 @@ import QtQuick.Window 2.12
import QtQuick.Layouts 1.1 import QtQuick.Layouts 1.1
import Qt5Compat.GraphicalEffects import Qt5Compat.GraphicalEffects
import org.kde.kirigami 2.20 as Kirigami
import org.kde.plasma.plasmoid 2.0 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.components 3.0 as PlasmaComponents
import org.kde.draganddrop 2.0 as DragDrop import org.kde.draganddrop 2.0 as DragDrop
@ -68,10 +69,10 @@ ContainmentLayoutManager.BasicAppletContainer {
var pos = plasmoid.fullRepresentationItem.mapFromItem(appletContainer, dragCenter.x, dragCenter.y); var pos = plasmoid.fullRepresentationItem.mapFromItem(appletContainer, dragCenter.x, dragCenter.y);
//SCROLL LEFT //SCROLL LEFT
if (pos.x < PlasmaCore.Units.gridUnit) { if (pos.x < Kirigami.Units.gridUnit) {
launcherRepeater.scrollLeftRequested(); launcherRepeater.scrollLeftRequested();
//SCROLL RIGHT //SCROLL RIGHT
} else if (pos.x > screenWidth - PlasmaCore.Units.gridUnit) { } else if (pos.x > screenWidth - Kirigami.Units.gridUnit) {
launcherRepeater.scrollRightRequested(); launcherRepeater.scrollRightRequested();
//DON't SCROLL //DON't SCROLL
} else { } else {

View file

@ -10,9 +10,7 @@ import QtQuick.Layouts 1.1
import QtQuick.Controls 2.15 as Controls import QtQuick.Controls 2.15 as Controls
import org.kde.plasma.plasmoid 2.0 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.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.kirigami 2.10 as Kirigami
import org.kde.plasma.private.mobileshell 1.0 as MobileShell import org.kde.plasma.private.mobileshell 1.0 as MobileShell
@ -41,9 +39,9 @@ Item {
signal dragStarted signal dragStarted
readonly property int reservedSpaceForLabel: metrics.height 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 // height from top of screen that the drawer starts
readonly property real drawerTopMargin: height - topPadding - bottomPadding - closedPositionOffset readonly property real drawerTopMargin: height - topPadding - bottomPadding - closedPositionOffset
@ -63,7 +61,7 @@ Item {
id: metrics id: metrics
text: "M\nM" text: "M\nM"
visible: false visible: false
font.pointSize: PlasmaCore.Theme.defaultFont.pointSize * 0.8 font.pointSize: Kirigami.Theme.defaultFont.pointSize * 0.8
font.weight: Font.Bold font.weight: Font.Bold
} }
@ -137,7 +135,7 @@ Item {
opacity: 0.6 * root.openFactor opacity: 0.6 * root.openFactor
// remove radius // 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 { Behavior on radius {
NumberAnimation { duration: Kirigami.Units.shortDuration; easing.type: Easing.InOutQuad } NumberAnimation { duration: Kirigami.Units.shortDuration; easing.type: Easing.InOutQuad }
} }

View file

@ -7,17 +7,18 @@
import QtQuick 2.12 import QtQuick 2.12
import QtQuick.Layouts 1.1 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
import org.kde.plasma.extras 2.0 as PlasmaExtra
PlasmaCore.ColorScope { import org.kde.plasma.components 3.0 as PlasmaComponents
Item {
id: root id: root
signal switchToListRequested() signal switchToListRequested()
signal switchToGridRequested() 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 // HACK: Here only to steal inputs the would normally be delivered to home
MouseArea { MouseArea {
@ -25,13 +26,13 @@ PlasmaCore.ColorScope {
} }
RowLayout { RowLayout {
anchors.topMargin: PlasmaCore.Units.smallSpacing anchors.topMargin: Kirigami.Units.smallSpacing
anchors.leftMargin: PlasmaCore.Units.largeSpacing anchors.leftMargin: Kirigami.Units.gridUnit
anchors.rightMargin: PlasmaCore.Units.largeSpacing anchors.rightMargin: Kirigami.Units.gridUnit
anchors.fill: parent anchors.fill: parent
spacing: PlasmaCore.Units.smallSpacing spacing: Kirigami.Units.smallSpacing
PlasmaExtra.Heading { Kirigami.Heading {
color: "white" color: "white"
level: 1 level: 1
text: i18n("Applications") text: i18n("Applications")
@ -40,14 +41,14 @@ PlasmaCore.ColorScope {
Item { Layout.fillWidth: true } Item { Layout.fillWidth: true }
PlasmaComponents.ToolButton { PlasmaComponents.ToolButton {
icon.name: "view-list-symbolic" icon.name: "view-list-symbolic"
implicitWidth: Math.round(PlasmaCore.Units.gridUnit * 2.1) implicitWidth: Math.round(Kirigami.Units.gridUnit * 2.1)
implicitHeight: Math.round(PlasmaCore.Units.gridUnit * 2.1) implicitHeight: Math.round(Kirigami.Units.gridUnit * 2.1)
onClicked: root.switchToListRequested() onClicked: root.switchToListRequested()
} }
PlasmaComponents.ToolButton { PlasmaComponents.ToolButton {
icon.name: "view-grid-symbolic" icon.name: "view-grid-symbolic"
implicitWidth: Math.round(PlasmaCore.Units.gridUnit * 2.1) implicitWidth: Math.round(Kirigami.Units.gridUnit * 2.1)
implicitHeight: Math.round(PlasmaCore.Units.gridUnit * 2.1) implicitHeight: Math.round(Kirigami.Units.gridUnit * 2.1)
onClicked: root.switchToGridRequested() onClicked: root.switchToGridRequested()
} }
} }

View file

@ -9,8 +9,9 @@ import QtQuick 2.12
import QtQuick.Window 2.12 import QtQuick.Window 2.12
import QtQuick.Layouts 1.1 import QtQuick.Layouts 1.1
import org.kde.kirigami 2.20 as Kirigami
import org.kde.plasma.plasmoid 2.0 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.components 3.0 as PlasmaComponents
Loader { Loader {
@ -25,7 +26,7 @@ Loader {
property string appDrawerType: "gridview" // gridview/listview 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 sourceComponent: appDrawerType === "gridview" ? gridViewDrawer : listViewDrawer

View file

@ -9,6 +9,8 @@ import QtQuick.Layouts 1.1
import QtQuick.Controls 2.3 as Controls import QtQuick.Controls 2.3 as Controls
import Qt5Compat.GraphicalEffects import Qt5Compat.GraphicalEffects
import org.kde.kirigami 2.20 as Kirigami
import org.kde.plasma.plasmoid 2.0 import org.kde.plasma.plasmoid 2.0
import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.components 3.0 as PlasmaComponents import org.kde.plasma.components 3.0 as PlasmaComponents
@ -35,7 +37,7 @@ MouseArea {
if (model.applicationRunning) { if (model.applicationRunning) {
delegate.launch(0, 0, "", model.applicationName, model.applicationStorageId); delegate.launch(0, 0, "", model.applicationName, model.applicationStorageId);
} else { } 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 visible: model.applicationRunning
radius: width radius: width
width: PlasmaCore.Units.smallSpacing width: Kirigami.Units.smallSpacing
height: width height: width
color: theme.highlightColor color: theme.highlightColor
} }
@ -144,9 +146,9 @@ MouseArea {
Layout.fillWidth: true Layout.fillWidth: true
Layout.preferredHeight: delegate.reservedSpaceForLabel Layout.preferredHeight: delegate.reservedSpaceForLabel
Layout.topMargin: PlasmaCore.Units.smallSpacing Layout.topMargin: Kirigami.Units.smallSpacing
Layout.leftMargin: -parent.anchors.leftMargin + PlasmaCore.Units.smallSpacing Layout.leftMargin: -parent.anchors.leftMargin + Kirigami.Units.smallSpacing
Layout.rightMargin: -parent.anchors.rightMargin + PlasmaCore.Units.smallSpacing Layout.rightMargin: -parent.anchors.rightMargin + Kirigami.Units.smallSpacing
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
maximumLineCount: 2 maximumLineCount: 2

View file

@ -10,6 +10,8 @@ import QtQuick.Layouts 1.1
import QtQuick.Controls 2.3 as Controls import QtQuick.Controls 2.3 as Controls
import Qt5Compat.GraphicalEffects import Qt5Compat.GraphicalEffects
import org.kde.kirigami 2.20 as Kirigami
import org.kde.plasma.plasmoid 2.0 import org.kde.plasma.plasmoid 2.0
import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.components 3.0 as PlasmaComponents import org.kde.plasma.components 3.0 as PlasmaComponents
@ -37,7 +39,7 @@ MouseArea {
if (model.applicationRunning) { if (model.applicationRunning) {
delegate.launch(0, 0, "", model.applicationName, model.applicationStorageId); delegate.launch(0, 0, "", model.applicationName, model.applicationStorageId);
} else { } 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 hoverEnabled: true
@ -46,17 +48,17 @@ MouseArea {
anchors.fill: parent anchors.fill: parent
color: delegate.pressed ? Qt.rgba(255, 255, 255, 0.2) : (delegate.containsMouse ? Qt.rgba(255, 255, 255, 0.05) : "transparent") color: delegate.pressed ? Qt.rgba(255, 255, 255, 0.2) : (delegate.containsMouse ? Qt.rgba(255, 255, 255, 0.05) : "transparent")
Behavior on color { Behavior on color {
ColorAnimation { duration: PlasmaCore.Units.shortDuration } ColorAnimation { duration: Kirigami.Units.shortDuration }
} }
} }
RowLayout { RowLayout {
anchors { anchors {
fill: parent fill: parent
leftMargin: PlasmaCore.Units.smallSpacing * 2 leftMargin: Kirigami.Units.smallSpacing * 2
topMargin: PlasmaCore.Units.smallSpacing topMargin: Kirigami.Units.smallSpacing
rightMargin: PlasmaCore.Units.smallSpacing * 2 rightMargin: Kirigami.Units.smallSpacing * 2
bottomMargin: PlasmaCore.Units.smallSpacing bottomMargin: Kirigami.Units.smallSpacing
} }
spacing: 0 spacing: 0
@ -79,7 +81,7 @@ MouseArea {
} }
visible: model.applicationRunning visible: model.applicationRunning
radius: width radius: width
width: PlasmaCore.Units.smallSpacing width: Kirigami.Units.smallSpacing
height: width height: width
color: theme.highlightColor color: theme.highlightColor
} }
@ -91,8 +93,8 @@ MouseArea {
Layout.fillWidth: true Layout.fillWidth: true
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
Layout.leftMargin: PlasmaCore.Units.smallSpacing * 2 Layout.leftMargin: Kirigami.Units.smallSpacing * 2
Layout.rightMargin: PlasmaCore.Units.largeSpacing Layout.rightMargin: Kirigami.Units.gridUnit
maximumLineCount: 1 maximumLineCount: 1
elide: Text.ElideRight elide: Text.ElideRight

View file

@ -10,9 +10,7 @@ import QtQuick.Layouts 1.1
import QtQuick.Controls 2.15 as Controls import QtQuick.Controls 2.15 as Controls
import org.kde.plasma.plasmoid 2.0 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.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.kirigami 2.10 as Kirigami
import org.kde.plasma.private.mobileshell 1.0 as MobileShell import org.kde.plasma.private.mobileshell 1.0 as MobileShell
@ -39,7 +37,7 @@ AbstractAppDrawer {
leftMargin: horizontalMargin leftMargin: horizontalMargin
rightMargin: 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 cellHeight: cellWidth + root.reservedSpaceForLabel
readonly property int columns: Math.floor(effectiveContentWidth / cellWidth) readonly property int columns: Math.floor(effectiveContentWidth / cellWidth)
@ -89,11 +87,11 @@ AbstractAppDrawer {
enabled: true enabled: true
Behavior on opacity { Behavior on opacity {
OpacityAnimator { OpacityAnimator {
duration: PlasmaCore.Units.longDuration * 2 duration: Kirigami.Units.longDuration * 2
easing.type: Easing.InOutQuad easing.type: Easing.InOutQuad
} }
} }
implicitWidth: PlasmaCore.Units.smallSpacing implicitWidth: Kirigami.Units.smallSpacing
contentItem: Rectangle { contentItem: Rectangle {
radius: width/2 radius: width/2
color: Qt.rgba(1, 1, 1, 0.3) color: Qt.rgba(1, 1, 1, 0.3)

View file

@ -10,9 +10,7 @@ import QtQuick.Layouts 1.1
import QtQuick.Controls 2.15 as Controls import QtQuick.Controls 2.15 as Controls
import org.kde.plasma.plasmoid 2.0 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.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.kirigami 2.10 as Kirigami
import org.kde.plasma.private.mobileshell 1.0 as MobileShell import org.kde.plasma.private.mobileshell 1.0 as MobileShell
@ -31,7 +29,7 @@ AbstractAppDrawer {
interactive: root.homeScreenState.appDrawerInteractive interactive: root.homeScreenState.appDrawerInteractive
property int delegateHeight: PlasmaCore.Units.gridUnit * 3 property int delegateHeight: Kirigami.Units.gridUnit * 3
model: Folio.ApplicationListModel model: Folio.ApplicationListModel
@ -75,11 +73,11 @@ AbstractAppDrawer {
enabled: true enabled: true
Behavior on opacity { Behavior on opacity {
OpacityAnimator { OpacityAnimator {
duration: PlasmaCore.Units.longDuration * 2 duration: Kirigami.Units.longDuration * 2
easing.type: Easing.InOutQuad easing.type: Easing.InOutQuad
} }
} }
implicitWidth: PlasmaCore.Units.smallSpacing implicitWidth: Kirigami.Units.smallSpacing
contentItem: Rectangle { contentItem: Rectangle {
radius: width/2 radius: width/2
color: Qt.rgba(1, 1, 1, 0.3) color: Qt.rgba(1, 1, 1, 0.3)

View file

@ -9,8 +9,9 @@ import QtQuick 2.15
import QtQuick.Window 2.15 import QtQuick.Window 2.15
import QtQuick.Layouts 1.1 import QtQuick.Layouts 1.1
import org.kde.kirigami 2.20 as Kirigami
import org.kde.plasma.plasmoid 2.0 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.components 3.0 as PlasmaComponents
import org.kde.plasma.private.mobileshell 1.0 as MobileShell import org.kde.plasma.private.mobileshell 1.0 as MobileShell
@ -59,7 +60,7 @@ ContainmentItem {
id: homeScreen id: homeScreen
onResetHomeScreenPosition: { onResetHomeScreenPosition: {
folioHomeScreen.homeScreenState.animateGoToPageIndex(0, PlasmaCore.Units.longDuration); folioHomeScreen.homeScreenState.animateGoToPageIndex(0, Kirigami.Units.longDuration);
folioHomeScreen.homeScreenState.closeAppDrawer(); folioHomeScreen.homeScreenState.closeAppDrawer();
} }

View file

@ -8,6 +8,7 @@
import QtQuick 2.0 import QtQuick 2.0
import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.ksvg 1.0 as KSvg import org.kde.ksvg 1.0 as KSvg
import org.kde.kirigami 2.20 as Kirigami
PlasmaCore.ToolTipArea { PlasmaCore.ToolTipArea {
id: button id: button
@ -21,7 +22,7 @@ PlasmaCore.ToolTipArea {
property alias elementId: icon.elementId property alias elementId: icon.elementId
property QtObject action property QtObject action
property bool backgroundVisible: false property bool backgroundVisible: false
property int iconSize: PlasmaCore.Units.iconSizes.large property int iconSize: Kirigami.Units.iconSizes.large
property int pressedOffset: 1 property int pressedOffset: 1
property bool checked: false property bool checked: false
property bool toggle: false property bool toggle: false
@ -37,7 +38,7 @@ PlasmaCore.ToolTipArea {
Behavior on opacity { Behavior on opacity {
NumberAnimation { NumberAnimation {
duration: PlasmaCore.Units.longDuration duration: Kirigami.Units.longDuration
easing.type: Easing.InOutQuad easing.type: Easing.InOutQuad
} }
} }
@ -95,7 +96,7 @@ PlasmaCore.ToolTipArea {
id: actionText id: actionText
text: button.text text: button.text
style: Text.Outline style: Text.Outline
color: PlasmaCore.Theme.textColor color: Kirigami.Theme.textColor
styleColor: Qt.rgba(1,1,1,0.4) styleColor: Qt.rgba(1,1,1,0.4)
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
} }

View file

@ -7,8 +7,9 @@
import QtQuick 2.12 import QtQuick 2.12
import QtQuick.Layouts 1.1 import QtQuick.Layouts 1.1
import org.kde.kirigami 2.20 as Kirigami
import org.kde.plasma.plasmoid 2.0 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.components 3.0 as PlasmaComponents
import org.kde.ksvg 1.0 as KSvg import org.kde.ksvg 1.0 as KSvg
@ -21,7 +22,7 @@ ContainmentLayoutManager.ConfigOverlayWithHandles {
signal requestRemoveTrigger signal requestRemoveTrigger
signal requestEditModeClose signal requestEditModeClose
readonly property int iconSize: PlasmaCore.Units.iconSizes.medium readonly property int iconSize: Kirigami.Units.iconSizes.medium
KSvg.Svg { KSvg.Svg {
id: configIconsSvg id: configIconsSvg
imagePath: "widgets/configuration-icons" imagePath: "widgets/configuration-icons"
@ -45,7 +46,7 @@ ContainmentLayoutManager.ConfigOverlayWithHandles {
property: "scale" property: "scale"
from: 1 from: 1
to: 0 to: 0
duration: PlasmaCore.Units.longDuration duration: Kirigami.Units.longDuration
easing.type: Easing.InOutQuad easing.type: Easing.InOutQuad
} }
ScriptAction { ScriptAction {
@ -65,7 +66,7 @@ ContainmentLayoutManager.ConfigOverlayWithHandles {
RowLayout { RowLayout {
id: layout id: layout
spacing: PlasmaCore.Units.largeSpacing spacing: Kirigami.Units.gridUnit
anchors { anchors {
fill: parent fill: parent
topMargin: parent.margins.top topMargin: parent.margins.top

View file

@ -9,8 +9,9 @@ import QtQuick.Layouts 1.1
import QtQuick.Controls 2.3 as Controls import QtQuick.Controls 2.3 as Controls
import Qt5Compat.GraphicalEffects import Qt5Compat.GraphicalEffects
import org.kde.kirigami 2.20 as Kirigami
import org.kde.plasma.plasmoid 2.0 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.components 3.0 as PC3
import org.kde.kquickcontrolsaddons 2.0 import org.kde.kquickcontrolsaddons 2.0
@ -54,7 +55,7 @@ PC3.RoundButton {
property: "scale" property: "scale"
from: 1 from: 1
to: 0 to: 0
duration: PlasmaCore.Units.longDuration duration: Kirigami.Units.longDuration
easing.type: Easing.InOutQuad easing.type: Easing.InOutQuad
} }
ScriptAction { ScriptAction {
@ -70,7 +71,7 @@ PC3.RoundButton {
id: removeButtonScaleAnim id: removeButtonScaleAnim
target: removeButton target: removeButton
property: "scale" property: "scale"
duration: PlasmaCore.Units.longDuration duration: Kirigami.Units.longDuration
easing.type: Easing.InOutQuad easing.type: Easing.InOutQuad
} }
ScriptAction { ScriptAction {

View file

@ -5,12 +5,12 @@
*/ */
import QtQuick 2.15 import QtQuick 2.15
import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.kirigami 2.20 as Kirigami
Item { Item {
Behavior on opacity { Behavior on opacity {
OpacityAnimator { OpacityAnimator {
duration: PlasmaCore.Units.longDuration * 2 duration: Kirigami.Units.longDuration * 2
easing.type: Easing.InOutQuad easing.type: Easing.InOutQuad
} }
} }
@ -20,8 +20,8 @@ Item {
left: parent.left left: parent.left
right: parent.right right: parent.right
bottom: parent.bottom bottom: parent.bottom
leftMargin: PlasmaCore.Units.gridUnit + root.leftPadding leftMargin: Kirigami.Units.gridUnit + root.leftPadding
rightMargin: PlasmaCore.Units.gridUnit + root.rightPadding rightMargin: Kirigami.Units.gridUnit + root.rightPadding
} }
height: 1 height: 1
gradient: Gradient { gradient: Gradient {

View file

@ -9,8 +9,9 @@ import QtQuick.Window 2.12
import QtQuick.Layouts 1.1 import QtQuick.Layouts 1.1
import Qt5Compat.GraphicalEffects import Qt5Compat.GraphicalEffects
import org.kde.kirigami 2.20 as Kirigami
import org.kde.plasma.plasmoid 2.0 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.components 3.0 as PlasmaComponents
import org.kde.draganddrop 2.0 as DragDrop import org.kde.draganddrop 2.0 as DragDrop
@ -24,7 +25,7 @@ MouseArea {
property real factor: 0 property real factor: 0
cursorShape: Qt.PointingHandCursor cursorShape: Qt.PointingHandCursor
height: PlasmaCore.Units.iconSizes.smallMedium height: Kirigami.Units.iconSizes.smallMedium
signal openRequested signal openRequested
signal closeRequested signal closeRequested
@ -35,7 +36,7 @@ MouseArea {
Item { Item {
anchors.centerIn: parent anchors.centerIn: parent
width: PlasmaCore.Units.iconSizes.smallMedium width: Kirigami.Units.iconSizes.smallMedium
height: width height: width
Rectangle { Rectangle {

View file

@ -6,8 +6,8 @@
import QtQuick 2.4 import QtQuick 2.4
import Qt5Compat.GraphicalEffects import Qt5Compat.GraphicalEffects
import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.ksvg 1.0 as KSvg import org.kde.ksvg 1.0 as KSvg
import org.kde.kirigami 2.20 as Kirigami
KSvg.SvgItem { KSvg.SvgItem {
id: scrollIndicator id: scrollIndicator
@ -18,10 +18,10 @@ KSvg.SvgItem {
opacity: 0 opacity: 0
svg: KSvg.Svg { svg: KSvg.Svg {
imagePath: "widgets/arrows" imagePath: "widgets/arrows"
colorGroup: PlasmaCore.Theme.ComplementaryColorGroup colorGroup: Kirigami.Theme.ComplementaryColorGroup
} }
elementId: "left-arrow" elementId: "left-arrow"
width: PlasmaCore.Units.iconSizes.large width: Kirigami.Units.iconSizes.large
height: width height: width
layer.enabled: true layer.enabled: true
layer.effect: DropShadow { layer.effect: DropShadow {
@ -34,7 +34,7 @@ KSvg.SvgItem {
} }
Behavior on opacity { Behavior on opacity {
OpacityAnimator { OpacityAnimator {
duration: PlasmaCore.Units.longDuration * 2 duration: Kirigami.Units.longDuration * 2
easing.type: Easing.InOutQuad easing.type: Easing.InOutQuad
} }
} }

View file

@ -5,8 +5,8 @@ import QtQuick
import QtQuick.Layouts import QtQuick.Layouts
import QtQuick.Controls import QtQuick.Controls
import org.kde.plasma.core as PlasmaCore
import org.kde.plasma.plasma5support 2.0 as P5Support 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 import org.kde.plasma.private.mobileshell as MobileShell
@ -36,7 +36,7 @@ ColumnLayout {
} }
Label { Label {
Layout.topMargin: PlasmaCore.Units.smallSpacing Layout.topMargin: Kirigami.Units.smallSpacing
Layout.fillWidth: true Layout.fillWidth: true
horizontalAlignment: Text.AlignLeft horizontalAlignment: Text.AlignLeft

View file

@ -8,7 +8,6 @@ import QtQuick.Effects
import org.kde.plasma.core as PlasmaCore import org.kde.plasma.core as PlasmaCore
import org.kde.plasma.components 3.0 as PlasmaComponents 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.kquickcontrolsaddons 2.0
import org.kde.plasma.private.containmentlayoutmanager 1.0 as ContainmentLayoutManager import org.kde.plasma.private.containmentlayoutmanager 1.0 as ContainmentLayoutManager
@ -71,7 +70,7 @@ Item {
if (application.running) { if (application.running) {
launchAppWithAnim(0, 0, "", applicationName, applicationStorageId); launchAppWithAnim(0, 0, "", applicationName, applicationStorageId);
} else { } 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 id: rowLayout
anchors { anchors {
fill: parent fill: parent
leftMargin: PlasmaCore.Units.smallSpacing * 2 leftMargin: Kirigami.Units.smallSpacing * 2
topMargin: PlasmaCore.Units.smallSpacing topMargin: Kirigami.Units.smallSpacing
rightMargin: PlasmaCore.Units.smallSpacing * 2 rightMargin: Kirigami.Units.smallSpacing * 2
bottomMargin: PlasmaCore.Units.smallSpacing bottomMargin: Kirigami.Units.smallSpacing
} }
spacing: 0 spacing: 0
@ -222,15 +221,15 @@ Item {
textFormat: Text.MarkdownText textFormat: Text.MarkdownText
Layout.fillWidth: true Layout.fillWidth: true
Layout.leftMargin: PlasmaCore.Units.smallSpacing * 2 Layout.leftMargin: Kirigami.Units.smallSpacing * 2
Layout.rightMargin: PlasmaCore.Units.largeSpacing Layout.rightMargin: Kirigami.Units.gridUnit
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
maximumLineCount: 1 maximumLineCount: 1
elide: Text.ElideRight elide: Text.ElideRight
text: delegate.isFolder ? delegate.folderName : delegate.applicationName text: delegate.isFolder ? delegate.folderName : delegate.applicationName
font.pointSize: PlasmaCore.Theme.defaultFont.pointSize font.pointSize: Kirigami.Theme.defaultFont.pointSize
font.weight: Font.Bold font.weight: Font.Bold
color: "white" color: "white"
@ -265,9 +264,9 @@ Item {
Item { Item {
Rectangle { Rectangle {
anchors.fill: parent anchors.fill: parent
anchors.margins: PlasmaCore.Units.smallSpacing anchors.margins: Kirigami.Units.smallSpacing
color: Qt.rgba(255, 255, 255, 0.2) color: Qt.rgba(255, 255, 255, 0.2)
radius: PlasmaCore.Units.smallSpacing radius: Kirigami.Units.smallSpacing
opacity: delegate.dragFolderAnimationProgress opacity: delegate.dragFolderAnimationProgress
} }
@ -291,9 +290,9 @@ Item {
} }
visible: application ? application.running : false visible: application ? application.running : false
radius: width radius: width
width: PlasmaCore.Units.smallSpacing width: Kirigami.Units.smallSpacing
height: width height: width
color: PlasmaCore.Theme.highlightColor color: Kirigami.Theme.highlightColor
} }
layer.enabled: true layer.enabled: true
@ -314,9 +313,9 @@ Item {
Rectangle { Rectangle {
id: rect id: rect
anchors.fill: parent anchors.fill: parent
anchors.margins: PlasmaCore.Units.smallSpacing anchors.margins: Kirigami.Units.smallSpacing
color: Qt.rgba(255, 255, 255, 0.2) color: Qt.rgba(255, 255, 255, 0.2)
radius: PlasmaCore.Units.smallSpacing radius: Kirigami.Units.smallSpacing
transform: Scale { transform: Scale {
origin.x: rect.width / 2 origin.x: rect.width / 2
@ -329,17 +328,17 @@ Item {
Grid { Grid {
id: grid id: grid
anchors.fill: parent anchors.fill: parent
anchors.margins: PlasmaCore.Units.smallSpacing * 2 anchors.margins: Kirigami.Units.smallSpacing * 2
columns: 2 columns: 2
spacing: PlasmaCore.Units.smallSpacing spacing: Kirigami.Units.smallSpacing
property var previews: model.folder.appPreviews property var previews: model.folder.appPreviews
Repeater { Repeater {
model: grid.previews model: grid.previews
delegate: Kirigami.Icon { delegate: Kirigami.Icon {
implicitWidth: (grid.width - PlasmaCore.Units.smallSpacing) / 2 implicitWidth: (grid.width - Kirigami.Units.smallSpacing) / 2
implicitHeight: (grid.width - PlasmaCore.Units.smallSpacing) / 2 implicitHeight: (grid.width - Kirigami.Units.smallSpacing) / 2
source: modelData.icon source: modelData.icon
layer.enabled: true layer.enabled: true

View file

@ -6,8 +6,6 @@ import QtQuick.Controls as QQC2
import QtQuick.Layouts import QtQuick.Layouts
import QtQml.Models 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.plasma.components 3.0 as PC3
import org.kde.draganddrop as DragDrop import org.kde.draganddrop as DragDrop
@ -60,7 +58,7 @@ MobileShell.GridView {
header: MobileShell.BaseItem { header: MobileShell.BaseItem {
topPadding: Math.round(root.height * 0.2) topPadding: Math.round(root.height * 0.2)
bottomPadding: PlasmaCore.Units.largeSpacing bottomPadding: Kirigami.Units.gridUnit
// leftPadding: root.leftMargin // leftPadding: root.leftMargin
// rightPadding: root.rightMargin // rightPadding: root.rightMargin
implicitWidth: root.width implicitWidth: root.width
@ -261,7 +259,7 @@ MobileShell.GridView {
ColumnLayout { ColumnLayout {
id: placeholder id: placeholder
spacing: PlasmaCore.Units.gridUnit spacing: Kirigami.Units.gridUnit
visible: root.count == 0 visible: root.count == 0
opacity: 0.9 opacity: 0.9
@ -276,13 +274,13 @@ MobileShell.GridView {
Kirigami.Icon { Kirigami.Icon {
id: icon id: icon
Layout.alignment: Qt.AlignBottom | Qt.AlignHCenter Layout.alignment: Qt.AlignBottom | Qt.AlignHCenter
implicitWidth: PlasmaCore.Units.iconSizes.large implicitWidth: Kirigami.Units.iconSizes.large
implicitHeight: width implicitHeight: width
source: "arrow-left" source: "arrow-left"
color: "white" color: "white"
} }
PlasmaExtras.Heading { Kirigami.Heading {
Layout.fillWidth: true Layout.fillWidth: true
Layout.maximumWidth: placeholder.width * 0.75 Layout.maximumWidth: placeholder.width * 0.75
Layout.alignment: Qt.AlignTop | Qt.AlignHCenter Layout.alignment: Qt.AlignTop | Qt.AlignHCenter

View file

@ -6,8 +6,6 @@ import QtQuick.Controls 2.15 as QQC2
import QtQuick.Layouts 1.1 import QtQuick.Layouts 1.1
import QtQml.Models 2.15 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.plasma.components 3.0 as PC3
import org.kde.draganddrop 2.0 as DragDrop import org.kde.draganddrop 2.0 as DragDrop
@ -22,7 +20,7 @@ Item {
required property bool interactive required property bool interactive
required property var searchWidget 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 bool twoColumn: root.width / 2 > twoColumnThreshold
readonly property real cellWidth: twoColumn ? (root.width - leftMargin - rightMargin) / 2 : (root.width - leftMargin - rightMargin) 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 leftMargin: Math.round(width * 0.1)
readonly property real rightMargin: 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 property bool folderShown: false
@ -85,7 +83,7 @@ Item {
root.openFolder(); root.openFolder();
} }
property real translateX: openFolderProgress * -PlasmaCore.Units.gridUnit property real translateX: openFolderProgress * -Kirigami.Units.gridUnit
transform: Translate { x: favoritesGrid.translateX } transform: Translate { x: favoritesGrid.translateX }
opacity: 1 - openFolderProgress opacity: 1 - openFolderProgress
visible: opacity !== 0 visible: opacity !== 0
@ -115,7 +113,7 @@ Item {
onOpenConfigureRequested: root.openConfigureRequested() onOpenConfigureRequested: root.openConfigureRequested()
onCloseRequested: root.closeFolder() onCloseRequested: root.closeFolder()
property real translateX: (1 - openProgress) * PlasmaCore.Units.gridUnit property real translateX: (1 - openProgress) * Kirigami.Units.gridUnit
transform: Translate { x: folderGrid.translateX } transform: Translate { x: folderGrid.translateX }
opacity: openProgress opacity: openProgress
visible: opacity !== 0 visible: opacity !== 0
@ -136,7 +134,7 @@ Item {
// when dragged // when dragged
onTranslationChanged: { 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)); folderGrid.openProgress = 1 - Math.min(1, Math.max(0, moveAmount));
isClosing = translation.x > oldTranslationX; isClosing = translation.x > oldTranslationX;
oldTranslationX = translation.x; oldTranslationX = translation.x;

View file

@ -7,8 +7,6 @@ import QtQuick.Layouts
import QtQuick.Effects import QtQuick.Effects
import QtQml.Models 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.plasma.components 3.0 as PC3
import org.kde.draganddrop as DragDrop import org.kde.draganddrop as DragDrop
@ -37,7 +35,7 @@ MobileShell.GridView {
header: MobileShell.BaseItem { header: MobileShell.BaseItem {
topPadding: Math.round(root.height * 0.2) topPadding: Math.round(root.height * 0.2)
bottomPadding: PlasmaCore.Units.largeSpacing bottomPadding: Kirigami.Units.gridUnit
leftPadding: 0 leftPadding: 0
rightPadding: 0 rightPadding: 0
implicitWidth: root.width implicitWidth: root.width
@ -109,14 +107,14 @@ MobileShell.GridView {
contentItem: RowLayout { contentItem: RowLayout {
id: rowLayout id: rowLayout
spacing: PlasmaCore.Units.smallSpacing * 2 spacing: Kirigami.Units.smallSpacing * 2
// close folder button // close folder button
MouseArea { MouseArea {
id: button id: button
Layout.alignment: Qt.AlignVCenter Layout.alignment: Qt.AlignVCenter
implicitHeight: PlasmaCore.Units.iconSizes.small + PlasmaCore.Units.largeSpacing implicitHeight: Kirigami.Units.iconSizes.small + Kirigami.Units.gridUnit
implicitWidth: PlasmaCore.Units.iconSizes.small + PlasmaCore.Units.largeSpacing implicitWidth: Kirigami.Units.iconSizes.small + Kirigami.Units.gridUnit
cursorShape: Qt.PointingHandCursor cursorShape: Qt.PointingHandCursor
onClicked: root.closeRequested() onClicked: root.closeRequested()
@ -131,8 +129,8 @@ MobileShell.GridView {
// button icon // button icon
Kirigami.Icon { Kirigami.Icon {
anchors.centerIn: parent anchors.centerIn: parent
implicitHeight: PlasmaCore.Units.iconSizes.small implicitHeight: Kirigami.Units.iconSizes.small
implicitWidth: PlasmaCore.Units.iconSizes.small implicitWidth: Kirigami.Units.iconSizes.small
isMask: true isMask: true
color: 'white' color: 'white'
source: 'arrow-left' source: 'arrow-left'

View file

@ -11,7 +11,6 @@ import QtQuick.Controls as Controls
import org.kde.plasma.core as PlasmaCore import org.kde.plasma.core as PlasmaCore
import org.kde.plasma.components 3.0 as PlasmaComponents import org.kde.plasma.components 3.0 as PlasmaComponents
import org.kde.plasma.extras as PlasmaExtras
import org.kde.kquickcontrolsaddons import org.kde.kquickcontrolsaddons
import org.kde.plasma.private.mobileshell as MobileShell import org.kde.plasma.private.mobileshell as MobileShell
@ -48,7 +47,7 @@ MouseArea {
if (application.running) { if (application.running) {
delegate.launch(0, 0, "", application.name, application.storageId); delegate.launch(0, 0, "", application.name, application.storageId);
} else { } 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 visible: application.running
radius: width radius: width
width: PlasmaCore.Units.smallSpacing width: Kirigami.Units.smallSpacing
height: width height: width
color: theme.highlightColor color: theme.highlightColor
} }
@ -181,9 +180,9 @@ MouseArea {
Layout.fillWidth: true Layout.fillWidth: true
Layout.preferredHeight: delegate.reservedSpaceForLabel Layout.preferredHeight: delegate.reservedSpaceForLabel
Layout.topMargin: PlasmaCore.Units.smallSpacing Layout.topMargin: Kirigami.Units.smallSpacing
Layout.leftMargin: -parent.anchors.leftMargin + PlasmaCore.Units.smallSpacing Layout.leftMargin: -parent.anchors.leftMargin + Kirigami.Units.smallSpacing
Layout.rightMargin: -parent.anchors.rightMargin + PlasmaCore.Units.smallSpacing Layout.rightMargin: -parent.anchors.rightMargin + Kirigami.Units.smallSpacing
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
maximumLineCount: 2 maximumLineCount: 2

View file

@ -7,9 +7,7 @@ import QtQuick 2.15
import QtQuick.Layouts 1.1 import QtQuick.Layouts 1.1
import QtQuick.Controls 2.15 as Controls 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.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.kirigami 2.10 as Kirigami
import org.kde.plasma.private.mobileshell 1.0 as MobileShell import org.kde.plasma.private.mobileshell 1.0 as MobileShell
@ -37,7 +35,7 @@ MobileShell.GridView {
readonly property int reservedSpaceForLabel: metrics.height readonly property int reservedSpaceForLabel: metrics.height
readonly property real effectiveContentWidth: width - leftMargin - rightMargin 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 cellHeight: cellWidth + reservedSpaceForLabel
property int columns: Math.floor(effectiveContentWidth / cellWidth) property int columns: Math.floor(effectiveContentWidth / cellWidth)
@ -58,9 +56,9 @@ MobileShell.GridView {
header: MobileShell.BaseItem { header: MobileShell.BaseItem {
implicitWidth: gridView.effectiveContentWidth implicitWidth: gridView.effectiveContentWidth
topPadding: PlasmaCore.Units.largeSpacing + Math.round(gridView.height * 0.1) topPadding: Kirigami.Units.gridUnit + Math.round(gridView.height * 0.1)
bottomPadding: PlasmaCore.Units.largeSpacing bottomPadding: Kirigami.Units.gridUnit
leftPadding: PlasmaCore.Units.smallSpacing leftPadding: Kirigami.Units.smallSpacing
contentItem: PC3.Label { contentItem: PC3.Label {
color: "white" color: "white"
@ -74,7 +72,7 @@ MobileShell.GridView {
id: metrics id: metrics
text: "M\nM" text: "M\nM"
visible: false visible: false
font.pointSize: PlasmaCore.Theme.defaultFont.pointSize * 0.85 font.pointSize: Kirigami.Theme.defaultFont.pointSize * 0.85
font.weight: Font.Bold font.weight: Font.Bold
} }

View file

@ -7,8 +7,6 @@ import QtQuick.Layouts
import QtQuick.Window import QtQuick.Window
import org.kde.plasma.plasmoid 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.plasma.components 3.0 as PC3
import org.kde.draganddrop as DragDrop import org.kde.draganddrop as DragDrop

View file

@ -6,8 +6,8 @@ import QtQuick.Window
import QtQuick.Layouts import QtQuick.Layouts
import org.kde.plasma.plasmoid import org.kde.plasma.plasmoid
import org.kde.plasma.core as PlasmaCore
import org.kde.plasma.components 3.0 as PlasmaComponents 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 as MobileShell
import org.kde.plasma.private.mobileshell.state as MobileShellState import org.kde.plasma.private.mobileshell.state as MobileShellState
@ -57,7 +57,7 @@ ContainmentItem {
anchors.fill: parent anchors.fill: parent
z: -1 z: -1
Behavior on color { Behavior on color {
ColorAnimation { duration: PlasmaCore.Units.longDuration } ColorAnimation { duration: Kirigami.Units.longDuration }
} }
} }

View file

@ -32,7 +32,7 @@ ContainmentItem {
Binding { Binding {
target: Plasmoid.Window.window // assumed to be plasma-workspace "PanelView" component target: Plasmoid.Window.window // assumed to be plasma-workspace "PanelView" component
property: "thickness" property: "thickness"
value: PlasmaCore.Units.gridUnit + PlasmaCore.Units.smallSpacing value: Kirigami.Units.gridUnit + Kirigami.Units.smallSpacing
} }
//BEGIN API implementation //BEGIN API implementation
@ -78,7 +78,7 @@ ContainmentItem {
anchors.fill: parent anchors.fill: parent
showDropShadow: !root.showingApp 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 backgroundColor: !root.showingApp ? "transparent" : root.backgroundColor
} }

View file

@ -6,7 +6,6 @@ import QtQuick.Layouts
import QtQuick.Window import QtQuick.Window
import org.kde.plasma.plasmoid import org.kde.plasma.plasmoid
import org.kde.plasma.core as PlasmaCore
import org.kde.plasma.workspace.keyboardlayout as Keyboards import org.kde.plasma.workspace.keyboardlayout as Keyboards
import org.kde.plasma.private.mobileshell as MobileShell import org.kde.plasma.private.mobileshell as MobileShell
@ -22,8 +21,8 @@ MobileShell.NavigationPanel {
// - opaque if an app is shown or vkbd is shown // - opaque if an app is shown or vkbd is shown
// - translucent if the task switcher is open // - translucent if the task switcher is open
// - transparent if on the homescreen // - transparent if on the homescreen
backgroundColor: (Keyboards.KWinVirtualKeyboard.visible || opaqueBar) ? PlasmaCore.ColorScope.backgroundColor : "transparent"; backgroundColor: (Keyboards.KWinVirtualKeyboard.visible || opaqueBar) ? Kirigami.Theme.backgroundColor : "transparent";
foregroundColorGroup: opaqueBar ? PlasmaCore.Theme.NormalColorGroup : PlasmaCore.Theme.ComplementaryColorGroup foregroundColorGroup: opaqueBar ? Kirigami.Theme.Window : Kirigami.Theme.ComplementaryColorGroup
shadow: !opaqueBar shadow: !opaqueBar
TaskManager.VirtualDesktopInfo { TaskManager.VirtualDesktopInfo {

View file

@ -6,6 +6,8 @@ import QtQuick 2.4
import QtQuick.Layouts 1.1 import QtQuick.Layouts 1.1
import QtQuick.Window 2.15 import QtQuick.Window 2.15
import org.kde.kirigami 2.20 as Kirigami
import org.kde.taskmanager 0.1 as TaskManager import org.kde.taskmanager 0.1 as TaskManager
import org.kde.plasma.plasmoid 2.0 import org.kde.plasma.plasmoid 2.0
import org.kde.plasma.core 2.0 as PlasmaCore 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 inLandscape: Screen.width > Screen.height;
readonly property bool isInLandscapeNavPanelMode: inLandscape && ShellSettings.Settings.navigationPanelEnabled 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 intendedWindowThickness: navigationPanelHeight
readonly property real intendedWindowLength: isInLandscapeNavPanelMode ? Screen.height : Screen.width 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 // only opaque if there are no maximized windows on this screen
readonly property bool opaqueBar: WindowPlugin.WindowMaximizedTracker.showingWindow readonly property bool opaqueBar: WindowPlugin.WindowMaximizedTracker.showingWindow
PlasmaCore.ColorScope { Item {
anchors.fill: parent anchors.fill: parent
// contrasting colour // 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 // load appropriate system navigation component
Loader { Loader {

View file

@ -33,7 +33,7 @@ Item {
anchors { anchors {
fill: parent fill: parent
topMargin: Kirigami.Units.gridUnit topMargin: Kirigami.Units.gridUnit
bottomMargin: Kirigami.Units.largeSpacing bottomMargin: Kirigami.Units.gridUnit
} }
width: root.width width: root.width
spacing: Kirigami.Units.gridUnit spacing: Kirigami.Units.gridUnit

View file

@ -6,7 +6,6 @@ import QtQuick.Controls 2.15
import QtQuick.Layouts 1.15 import QtQuick.Layouts 1.15
import org.kde.kirigami 2.20 as Kirigami 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.kirigamiaddons.labs.mobileform 0.1 as MobileForm
import org.kde.plasma.mobileinitialstart.prepare 1.0 as Prepare import org.kde.plasma.mobileinitialstart.prepare 1.0 as Prepare
import org.kde.plasma.plasma5support 2.0 as P5Support import org.kde.plasma.plasma5support 2.0 as P5Support

View file

@ -6,7 +6,6 @@ import QtQuick.Controls 2.15
import QtQuick.Layouts 1.15 import QtQuick.Layouts 1.15
import org.kde.kirigami 2.20 as Kirigami 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.kirigamiaddons.labs.mobileform 0.1 as MobileForm
import org.kde.plasma.mobileinitialstart.time 1.0 as Time import org.kde.plasma.mobileinitialstart.time 1.0 as Time
@ -20,7 +19,7 @@ Item {
anchors { anchors {
fill: parent fill: parent
topMargin: Kirigami.Units.gridUnit topMargin: Kirigami.Units.gridUnit
bottomMargin: Kirigami.Units.largeSpacing bottomMargin: Kirigami.Units.gridUnit
} }
width: root.width width: root.width
@ -78,10 +77,10 @@ Item {
header: Control { header: Control {
width: listView.width width: listView.width
leftPadding: Kirigami.Units.largeSpacing leftPadding: Kirigami.Units.gridUnit
rightPadding: Kirigami.Units.largeSpacing rightPadding: Kirigami.Units.gridUnit
topPadding: Kirigami.Units.largeSpacing topPadding: Kirigami.Units.gridUnit
bottomPadding: Kirigami.Units.largeSpacing bottomPadding: Kirigami.Units.gridUnit
contentItem: Kirigami.SearchField { contentItem: Kirigami.SearchField {
id: searchField id: searchField

View file

@ -43,7 +43,7 @@ Kirigami.PromptDialog {
ColumnLayout { ColumnLayout {
id: column id: column
spacing: Kirigami.Units.largeSpacing spacing: Kirigami.Units.gridUnit
PasswordField { PasswordField {
id: passwordField id: passwordField

View file

@ -6,7 +6,6 @@ import QtQuick 2.15
import QtQuick.Layouts 1.15 import QtQuick.Layouts 1.15
import QtQuick.Controls 2.15 as Controls 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.plasma.networkmanagement 0.2 as PlasmaNM
import org.kde.kirigami 2.2 as Kirigami import org.kde.kirigami 2.2 as Kirigami
import org.kde.kirigamiaddons.labs.mobileform 0.1 as MobileForm import org.kde.kirigamiaddons.labs.mobileform 0.1 as MobileForm
@ -48,7 +47,7 @@ MobileForm.AbstractFormDelegate {
} }
contentItem: RowLayout { contentItem: RowLayout {
spacing: Kirigami.Units.largeSpacing spacing: Kirigami.Units.gridUnit
Item { Item {
Layout.preferredWidth: Kirigami.Units.gridUnit Layout.preferredWidth: Kirigami.Units.gridUnit
@ -61,7 +60,7 @@ MobileForm.AbstractFormDelegate {
svg: KSvg.Svg { svg: KSvg.Svg {
multipleImages: true multipleImages: true
imagePath: "icons/network" imagePath: "icons/network"
colorGroup: PlasmaCore.ColorScope.colorGroup colorSet: Kirigami.Theme.colorSet
} }
} }

View file

@ -7,7 +7,6 @@ import QtQuick.Controls 2.15
import QtQuick.Layouts 1.15 import QtQuick.Layouts 1.15
import org.kde.kirigami 2.20 as Kirigami 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.kirigamiaddons.labs.mobileform 0.1 as MobileForm
import org.kde.plasma.networkmanagement 0.2 as PlasmaNM import org.kde.plasma.networkmanagement 0.2 as PlasmaNM
import org.kde.plasma.mobileinitialstart.wifi 1.0 as WiFi import org.kde.plasma.mobileinitialstart.wifi 1.0 as WiFi
@ -54,7 +53,7 @@ Item {
ColumnLayout { ColumnLayout {
anchors.fill: parent anchors.fill: parent
anchors.topMargin: Kirigami.Units.gridUnit anchors.topMargin: Kirigami.Units.gridUnit
anchors.bottomMargin: Kirigami.Units.largeSpacing anchors.bottomMargin: Kirigami.Units.gridUnit
width: root.width width: root.width
spacing: Kirigami.Units.gridUnit spacing: Kirigami.Units.gridUnit
@ -95,7 +94,7 @@ Item {
Kirigami.PlaceholderMessage { Kirigami.PlaceholderMessage {
anchors.centerIn: parent anchors.centerIn: parent
width: parent.width - (Kirigami.Units.largeSpacing * 4) width: parent.width - (Kirigami.Units.gridUnit * 4)
visible: !enabledConnections.wirelessEnabled visible: !enabledConnections.wirelessEnabled
text: i18n("Wi-Fi is disabled") text: i18n("Wi-Fi is disabled")
icon.name: "network-wireless-disconnected" icon.name: "network-wireless-disconnected"

View file

@ -67,7 +67,7 @@ Item {
ColumnLayout { ColumnLayout {
opacity: root.contentOpacity opacity: root.contentOpacity
spacing: Kirigami.Units.largeSpacing spacing: Kirigami.Units.gridUnit
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left anchors.left: parent.left
@ -93,8 +93,8 @@ Item {
anchors.right: parent.right anchors.right: parent.right
anchors.margins: Kirigami.Units.gridUnit anchors.margins: Kirigami.Units.gridUnit
topPadding: Kirigami.Units.largeSpacing topPadding: Kirigami.Units.gridUnit
bottomPadding: Kirigami.Units.largeSpacing bottomPadding: Kirigami.Units.gridUnit
leftPadding: Kirigami.Units.gridUnit leftPadding: Kirigami.Units.gridUnit
rightPadding: Kirigami.Units.gridUnit rightPadding: Kirigami.Units.gridUnit

View file

@ -5,7 +5,6 @@ import QtQuick 2.15
import QtQuick.Controls 2.15 import QtQuick.Controls 2.15
import QtQuick.Layouts 1.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.kirigami 2.20 as Kirigami
import org.kde.plasma.private.mobileshell 1.0 as MobileShell import org.kde.plasma.private.mobileshell 1.0 as MobileShell
@ -123,7 +122,7 @@ Kirigami.Page {
height: Kirigami.Units.gridUnit * 1.25 height: Kirigami.Units.gridUnit * 1.25
colorGroup: PlasmaCore.Theme.ComplementaryColorGroup colorGroup: Kirigami.Theme.ComplementaryColorGroup
backgroundColor: "transparent" backgroundColor: "transparent"
showSecondRow: false showSecondRow: false
@ -287,8 +286,8 @@ Kirigami.Page {
Layout.leftMargin: Kirigami.Units.gridUnit Layout.leftMargin: Kirigami.Units.gridUnit
Layout.bottomMargin: Kirigami.Units.gridUnit Layout.bottomMargin: Kirigami.Units.gridUnit
topPadding: Kirigami.Units.largeSpacing topPadding: Kirigami.Units.gridUnit
bottomPadding: Kirigami.Units.largeSpacing bottomPadding: Kirigami.Units.gridUnit
leftPadding: Kirigami.Units.gridUnit leftPadding: Kirigami.Units.gridUnit
rightPadding: Kirigami.Units.gridUnit rightPadding: Kirigami.Units.gridUnit
@ -305,8 +304,8 @@ Kirigami.Page {
Layout.rightMargin: Kirigami.Units.gridUnit Layout.rightMargin: Kirigami.Units.gridUnit
Layout.bottomMargin: Kirigami.Units.gridUnit Layout.bottomMargin: Kirigami.Units.gridUnit
topPadding: Kirigami.Units.largeSpacing topPadding: Kirigami.Units.gridUnit
bottomPadding: Kirigami.Units.largeSpacing bottomPadding: Kirigami.Units.gridUnit
leftPadding: Kirigami.Units.gridUnit leftPadding: Kirigami.Units.gridUnit
rightPadding: Kirigami.Units.gridUnit rightPadding: Kirigami.Units.gridUnit
@ -322,8 +321,8 @@ Kirigami.Page {
Layout.rightMargin: Kirigami.Units.gridUnit Layout.rightMargin: Kirigami.Units.gridUnit
Layout.bottomMargin: Kirigami.Units.gridUnit Layout.bottomMargin: Kirigami.Units.gridUnit
topPadding: Kirigami.Units.largeSpacing topPadding: Kirigami.Units.gridUnit
bottomPadding: Kirigami.Units.largeSpacing bottomPadding: Kirigami.Units.gridUnit
leftPadding: Kirigami.Units.gridUnit leftPadding: Kirigami.Units.gridUnit
rightPadding: Kirigami.Units.gridUnit rightPadding: Kirigami.Units.gridUnit

View file

@ -25,7 +25,7 @@ Kirigami.ScrollablePage {
MessagesList { MessagesList {
visible: count != 0 visible: count != 0
Layout.fillWidth: true Layout.fillWidth: true
Layout.margins: Kirigami.Units.largeSpacing Layout.margins: Kirigami.Units.gridUnit
model: kcm.messages model: kcm.messages
} }
} }

View file

@ -23,7 +23,7 @@ ColumnLayout {
model: root.model model: root.model
delegate: Kirigami.InlineMessage { delegate: Kirigami.InlineMessage {
Layout.bottomMargin: Kirigami.Units.largeSpacing Layout.bottomMargin: Kirigami.Units.gridUnit
Layout.fillWidth: true Layout.fillWidth: true
visible: true visible: true
text: modelData.message text: modelData.message

View file

@ -60,7 +60,7 @@ Kirigami.ScrollablePage {
MobileForm.FormCard { MobileForm.FormCard {
Layout.fillWidth: true Layout.fillWidth: true
Layout.topMargin: Kirigami.Units.largeSpacing Layout.topMargin: Kirigami.Units.gridUnit
contentItem: ColumnLayout { contentItem: ColumnLayout {
spacing: 0 spacing: 0

View file

@ -29,7 +29,7 @@ Controls.Dialog {
header: Item { header: Item {
transform: Translate { y: dialog.translateY } transform: Translate { y: dialog.translateY }
implicitHeight: heading.implicitHeight + Kirigami.Units.largeSpacing * 2 implicitHeight: heading.implicitHeight + Kirigami.Units.gridUnit * 2
Kirigami.Heading { Kirigami.Heading {
id: heading id: heading
@ -38,7 +38,7 @@ Controls.Dialog {
elide: Text.ElideRight elide: Text.ElideRight
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
anchors.leftMargin: Kirigami.Units.largeSpacing anchors.leftMargin: Kirigami.Units.gridUnit
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
// use tooltip for long text that is elided // use tooltip for long text that is elided

View file

@ -21,7 +21,7 @@ Kirigami.ScrollablePage {
anchors.centerIn: parent anchors.centerIn: parent
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
anchors.margins: Kirigami.Units.largeSpacing anchors.margins: Kirigami.Units.gridUnit
visible: profileListView.count === 0 visible: profileListView.count === 0
text: i18n("No APNs configured") text: i18n("No APNs configured")
icon.name: "globe" icon.name: "globe"
@ -52,14 +52,14 @@ Kirigami.ScrollablePage {
id: messagesList id: messagesList
visible: count != 0 visible: count != 0
Layout.fillWidth: true Layout.fillWidth: true
Layout.margins: Kirigami.Units.largeSpacing Layout.margins: Kirigami.Units.gridUnit
model: kcm.messages model: kcm.messages
} }
Kirigami.InlineMessage { Kirigami.InlineMessage {
id: cannotFindWarning id: cannotFindWarning
Layout.margins: visible ? Kirigami.Units.largeSpacing : 0 Layout.margins: visible ? Kirigami.Units.gridUnit : 0
Layout.topMargin: visible && !messagesList.visible ? Kirigami.Units.largeSpacing : 0 Layout.topMargin: visible && !messagesList.visible ? Kirigami.Units.gridUnit : 0
Layout.fillWidth: true Layout.fillWidth: true
visible: false visible: false

View file

@ -28,7 +28,7 @@ Kirigami.ScrollablePage {
MessagesList { MessagesList {
Layout.fillWidth: true Layout.fillWidth: true
Layout.margins: Kirigami.Units.largeSpacing Layout.margins: Kirigami.Units.gridUnit
model: kcm.messages model: kcm.messages
} }
@ -92,8 +92,8 @@ Kirigami.ScrollablePage {
} }
Kirigami.Separator { Kirigami.Separator {
Layout.leftMargin: Kirigami.Units.largeSpacing Layout.leftMargin: Kirigami.Units.gridUnit
Layout.rightMargin: Kirigami.Units.largeSpacing Layout.rightMargin: Kirigami.Units.gridUnit
Layout.fillWidth: true Layout.fillWidth: true
opacity: (!disableSimLockButton.controlHovered && !changePinButton.controlHovered) ? 0.5 : 0 opacity: (!disableSimLockButton.controlHovered && !changePinButton.controlHovered) ? 0.5 : 0
} }
@ -118,7 +118,7 @@ Kirigami.ScrollablePage {
id: unlockPinDialog id: unlockPinDialog
title: i18n("Unlock SIM") title: i18n("Unlock SIM")
standardButtons: Controls.Dialog.Ok | Controls.Dialog.Cancel standardButtons: Controls.Dialog.Ok | Controls.Dialog.Cancel
padding: Kirigami.Units.largeSpacing padding: Kirigami.Units.gridUnit
onAccepted: sim.sendPin(unlockPinCurPin.text) onAccepted: sim.sendPin(unlockPinCurPin.text)
@ -138,7 +138,7 @@ Kirigami.ScrollablePage {
id: changePinDialog id: changePinDialog
title: i18n("Change SIM PIN") title: i18n("Change SIM PIN")
standardButtons: isValid ? Controls.Dialog.Ok | Controls.Dialog.Cancel : Controls.Dialog.Cancel 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 && property bool isValid: changePinNewPin.text == changePinConfirmPin.text &&
changePinNewPin.text.length >= 4 && changePinNewPin.text.length <= 8 // SIM PINs are between 4-8 digits changePinNewPin.text.length >= 4 && changePinNewPin.text.length <= 8 // SIM PINs are between 4-8 digits
@ -186,7 +186,7 @@ Kirigami.ScrollablePage {
id: removePinDialog id: removePinDialog
title: i18n("Remove SIM PIN") title: i18n("Remove SIM PIN")
standardButtons: Controls.Dialog.Ok | Controls.Dialog.Cancel standardButtons: Controls.Dialog.Ok | Controls.Dialog.Cancel
padding: Kirigami.Units.largeSpacing padding: Kirigami.Units.gridUnit
onAccepted: sim.togglePinEnabled(removePinCurPin.text); onAccepted: sim.togglePinEnabled(removePinCurPin.text);
@ -203,7 +203,7 @@ Kirigami.ScrollablePage {
id: createPinDialog id: createPinDialog
title: i18n("Add SIM PIN") title: i18n("Add SIM PIN")
standardButtons: isValid ? Controls.Dialog.Ok | Controls.Dialog.Cancel : Controls.Dialog.Cancel 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 && property bool isValid: createPinNewPin.text == createPinConfirmPin.text &&
createPinNewPin.text.length >= 4 && createPinNewPin.text.length <= 8 // SIM PINs are between 4-8 digits createPinNewPin.text.length >= 4 && createPinNewPin.text.length <= 8 // SIM PINs are between 4-8 digits

View file

@ -47,8 +47,8 @@ Kirigami.ScrollablePage {
Kirigami.InlineMessage { Kirigami.InlineMessage {
Layout.fillWidth: true Layout.fillWidth: true
Layout.margins: Kirigami.Units.largeSpacing Layout.margins: Kirigami.Units.gridUnit
Layout.bottomMargin: visible && !messagesList.visible ? Kirigami.Units.largeSpacing : 0 Layout.bottomMargin: visible && !messagesList.visible ? Kirigami.Units.gridUnit : 0
visible: !simEnabled visible: !simEnabled
type: Kirigami.MessageType.Error 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.") 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 { MessagesList {
id: messagesList id: messagesList
Layout.fillWidth: true Layout.fillWidth: true
Layout.margins: Kirigami.Units.largeSpacing Layout.margins: Kirigami.Units.gridUnit
model: kcm.messages model: kcm.messages
} }
@ -123,7 +123,7 @@ Kirigami.ScrollablePage {
MobileForm.FormCard { MobileForm.FormCard {
Layout.fillWidth: true Layout.fillWidth: true
Layout.topMargin: Kirigami.Units.largeSpacing Layout.topMargin: Kirigami.Units.gridUnit
contentItem: ColumnLayout { contentItem: ColumnLayout {
spacing: 0 spacing: 0

View file

@ -28,7 +28,7 @@ KCM.SimpleKCM {
anchors.centerIn: parent anchors.centerIn: parent
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
anchors.margins: Kirigami.Units.largeSpacing anchors.margins: Kirigami.Units.gridUnit
visible: !enabledConnections.wwanHwEnabled || !availableDevices.modemDeviceAvailable || !kcm.modemFound visible: !enabledConnections.wwanHwEnabled || !availableDevices.modemDeviceAvailable || !kcm.modemFound
icon.name: "auth-sim-missing" icon.name: "auth-sim-missing"
@ -59,7 +59,7 @@ KCM.SimpleKCM {
MessagesList { MessagesList {
Layout.fillWidth: true Layout.fillWidth: true
Layout.margins: Kirigami.Units.largeSpacing Layout.margins: Kirigami.Units.gridUnit
model: kcm.messages model: kcm.messages
} }
@ -124,7 +124,7 @@ KCM.SimpleKCM {
MobileForm.FormCard { MobileForm.FormCard {
Layout.fillWidth: true Layout.fillWidth: true
Layout.topMargin: Kirigami.Units.largeSpacing Layout.topMargin: Kirigami.Units.gridUnit
contentItem: ColumnLayout { contentItem: ColumnLayout {
spacing: 0 spacing: 0
@ -142,8 +142,8 @@ KCM.SimpleKCM {
Kirigami.Separator { Kirigami.Separator {
visible: model.index !== 0 visible: model.index !== 0
Layout.leftMargin: Kirigami.Units.largeSpacing Layout.leftMargin: Kirigami.Units.gridUnit
Layout.rightMargin: Kirigami.Units.largeSpacing Layout.rightMargin: Kirigami.Units.gridUnit
Layout.fillWidth: true Layout.fillWidth: true
opacity: (!(model.index && repeater.itemAt(model.index - 1).controlHovered) && !simDelegate.controlHovered) ? 0.5 : 0 opacity: (!(model.index && repeater.itemAt(model.index - 1).controlHovered) && !simDelegate.controlHovered) ? 0.5 : 0
} }

View file

@ -57,7 +57,7 @@ SimpleKCM {
MobileForm.FormCard { MobileForm.FormCard {
Layout.fillWidth: true Layout.fillWidth: true
Layout.topMargin: Kirigami.Units.largeSpacing Layout.topMargin: Kirigami.Units.gridUnit
contentItem: ColumnLayout { contentItem: ColumnLayout {
spacing: 0 spacing: 0

View file

@ -57,7 +57,7 @@ KCM.SimpleKCM {
MobileForm.FormCard { MobileForm.FormCard {
Layout.fillWidth: true Layout.fillWidth: true
Layout.topMargin: Kirigami.Units.largeSpacing Layout.topMargin: Kirigami.Units.gridUnit
contentItem: ColumnLayout { contentItem: ColumnLayout {
spacing: 0 spacing: 0
@ -103,7 +103,7 @@ KCM.SimpleKCM {
MobileForm.FormCard { MobileForm.FormCard {
Layout.fillWidth: true Layout.fillWidth: true
Layout.topMargin: Kirigami.Units.largeSpacing Layout.topMargin: Kirigami.Units.gridUnit
contentItem: ColumnLayout { contentItem: ColumnLayout {
spacing: 0 spacing: 0

View file

@ -31,7 +31,7 @@ Kirigami.ScrollablePage {
contentItem: RowLayout { contentItem: RowLayout {
Kirigami.ListItemDragHandle { Kirigami.ListItemDragHandle {
visible: qsDelegate.isEnabled visible: qsDelegate.isEnabled
Layout.rightMargin: Kirigami.Units.largeSpacing Layout.rightMargin: Kirigami.Units.gridUnit
listItem: qsDelegate listItem: qsDelegate
listView: qsDelegate.parent ? qsDelegate.parent.parentView : null listView: qsDelegate.parent ? qsDelegate.parent.parentView : null
onMoveRequested: savedQuickSettings.enabledModel.moveRow(oldIndex, newIndex) onMoveRequested: savedQuickSettings.enabledModel.moveRow(oldIndex, newIndex)
@ -42,7 +42,7 @@ Kirigami.ScrollablePage {
visible: iconAvailable visible: iconAvailable
source: model ? model.icon : "" 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 implicitWidth: iconAvailable ? Kirigami.Units.iconSizes.small : 0
implicitHeight: iconAvailable ? Kirigami.Units.iconSizes.small : 0 implicitHeight: iconAvailable ? Kirigami.Units.iconSizes.small : 0
} }

Some files were not shown because too many files have changed in this diff Show more