Revert "Port to upstream QML components where possible"

This reverts commit fd04fe04c0.

This change wasn't technically wrong, but presents an awkward developer
API until the point where we can port *all* PlasmaComponents to their
upstream QQC2 versions, and as such, it was premature.
This commit is contained in:
Nate Graham 2023-07-28 10:17:58 -06:00
parent fd04fe04c0
commit 6a25deed28
9 changed files with 18 additions and 21 deletions

View file

@ -10,7 +10,7 @@ import QtQuick
import QtQuick.Window
import org.kde.plasma.core as PlasmaCore
import org.kde.ksvg 1.0 as KSvg
import org.kde.kirigami 2.20 as Kirigami
import org.kde.plasma.extras as PlasmaExtras
import org.kde.kwin
PlasmaCore.Dialog {
@ -66,7 +66,7 @@ PlasmaCore.Dialog {
width: dialogItem.showGrid ? view.itemWidth * view.columns : Math.ceil(textElement.implicitWidth)
height: dialogItem.showGrid ? view.itemHeight * view.rows + textElement.height : textElement.height
Kirigami.Heading {
PlasmaExtras.Heading {
id: textElement
anchors.top: dialogItem.showGrid ? parent.top : undefined
anchors.left: parent.left

View file

@ -7,10 +7,10 @@
*/
import QtQuick
import QtQuick.Controls as QQC2
import org.kde.kwin as KWinComponents
import org.kde.kwin.private.effects
import org.kde.kirigami 2.20 as Kirigami
import org.kde.plasma.components 3.0 as PC3
import org.kde.kwin.private.desktopgrid
FocusScope {
@ -173,7 +173,7 @@ FocusScope {
cursorShape: dragHandler.active ? Qt.ClosedHandCursor : Qt.ArrowCursor
}
QQC2.Control {
PC3.Control {
id: desktopLabel
anchors.margins: Kirigami.Units.gridUnit
z: 9999
@ -293,7 +293,7 @@ FocusScope {
scale: 1 / desktopView.parent.scale
leftPadding: Kirigami.Units.smallSpacing
rightPadding: Kirigami.Units.smallSpacing
contentItem: QQC2.Label {
contentItem: PC3.Label {
text: desktopView.desktop.name
}
background: Rectangle {

View file

@ -5,7 +5,7 @@
*/
import QtQuick
import QtQuick.Controls as QQC2
import org.kde.plasma.components 3.0 as PlasmaComponents3
import org.kde.kirigami 2 as Kirigami
Rectangle {
@ -20,7 +20,7 @@ Rectangle {
implicitWidth: childrenRect.width + 2 * childrenRect.x
implicitHeight: childrenRect.height + 2 * childrenRect.y
QQC2.Label {
PlasmaComponents3.Label {
id: displayName
x: Kirigami.Units.largeSpacing * 2
y: Kirigami.Units.largeSpacing
@ -30,7 +30,7 @@ Rectangle {
horizontalAlignment: Text.AlignHCenter;
}
QQC2.Label {
PlasmaComponents3.Label {
id: modeLabel;
anchors {
horizontalCenter: displayName.horizontalCenter

View file

@ -194,7 +194,7 @@ Item {
height: Kirigami.Units.gridUnit
state: "normal"
Label {
PC3.Label {
anchors.fill: parent
elide: Text.ElideRight
text: delegate.desktop.name

View file

@ -6,7 +6,6 @@
*/
import QtQuick
import QtQuick.Controls as QQC2
import QtQuick.Window
import org.kde.kirigami 2.20 as Kirigami
import org.kde.kwin as KWinComponents
@ -147,7 +146,7 @@ Item {
}
}
QQC2.Label {
PC3.Label {
anchors.fill: thumbSource
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
@ -167,7 +166,7 @@ Item {
anchors.bottomMargin: -Math.round(height / 4)
visible: !thumb.activeHidden && !activeDragHandler.active
QQC2.Label {
PC3.Label {
id: caption
visible: thumb.windowTitleVisible
width: Math.min(implicitWidth, thumbSource.width)

View file

@ -5,7 +5,6 @@
*/
import QtQuick
import QtQuick.Controls as QQC2
import Qt5Compat.GraphicalEffects
import QtQuick.Layouts
import org.kde.kwin as KWinComponents
@ -126,7 +125,7 @@ FocusScope {
}
}
QQC2.Control {
PlasmaComponents.Control {
z: 2
anchors.right: parent.right
y: root.active ? 0 : -height
@ -148,7 +147,7 @@ FocusScope {
}
}
contentItem: RowLayout {
QQC2.Label {
PlasmaComponents.Label {
text: i18nd("kwin","Padding:")
}
PlasmaComponents.SpinBox {

View file

@ -6,12 +6,12 @@
*/
import QtQuick
import QtQuick.Controls as QQC2
import QtQuick.Layouts
import org.kde.plasma.core as PlasmaCore
import org.kde.kirigami 2.20 as Kirigami
import org.kde.ksvg 1.0 as KSvg
import org.kde.plasma.components 3.0 as PlasmaComponents
Item {
id: root
@ -49,7 +49,7 @@ Item {
source: root.effectFrame.icon
}
QQC2.Label {
PlasmaComponents.Label {
id: label
Layout.fillWidth: true
textFormat: Text.PlainText

View file

@ -6,12 +6,12 @@
*/
import QtQuick
import QtQuick.Controls as QQC2
import QtQuick.Layouts
import QtQuick.Window
import org.kde.plasma.core as PlasmaCore
import org.kde.kirigami 2.20 as Kirigami
import org.kde.plasma.components 3.0 as PlasmaComponents3
PlasmaCore.Dialog {
location: PlasmaCore.Types.Floating
@ -28,7 +28,7 @@ PlasmaCore.Dialog {
source: osd.iconName
visible: osd.iconName !== ""
}
QQC2.Label {
PlasmaComponents3.Label {
text: osd.message
}
}

View file

@ -9,7 +9,6 @@
*/
import QtQuick 2.0
import QtQuick.Controls as QQC2
import QtQuick.Layouts 1.1
import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.ksvg 1.0 as KSvg
@ -186,7 +185,7 @@ KWin.TabBoxSwitcher {
}
}
QQC2.Label {
PlasmaComponents3.Label {
Layout.fillWidth: true
text: model.caption
font.weight: thumbnailGridItem.isCurrentItem ? Font.Bold : Font.Normal