mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-08-01 17:24:48 +00:00
Port implicit default content items to use contentItem: property
See also https://invent.kde.org/frameworks/kirigami/-/merge_requests/1338 and https://invent.kde.org/frameworks/kirigami/-/merge_requests/1340 And while at it, fix wifi delegates, so that their icon once again draws property and now uses system-wide icon theme instead of a deprecated Plasma icon set.
This commit is contained in:
parent
f2beec9005
commit
c0f2642647
2 changed files with 13 additions and 47 deletions
|
|
@ -49,36 +49,20 @@ FormCard.AbstractFormDelegate {
|
||||||
contentItem: RowLayout {
|
contentItem: RowLayout {
|
||||||
spacing: Kirigami.Units.largeSpacing
|
spacing: Kirigami.Units.largeSpacing
|
||||||
|
|
||||||
Item {
|
Kirigami.Icon {
|
||||||
Layout.preferredWidth: Kirigami.Units.gridUnit
|
Layout.alignment: Qt.AlignVCenter
|
||||||
Layout.preferredHeight: Kirigami.Units.gridUnit
|
Layout.preferredWidth: Kirigami.Units.iconSizes.medium
|
||||||
|
Layout.preferredHeight: Kirigami.Units.iconSizes.medium
|
||||||
|
|
||||||
KSvg.SvgItem {
|
source: mobileProxyModel.showSavedMode ? "network-wireless-connected-100" : ConnectionIcon
|
||||||
id: connectionSvgIcon
|
|
||||||
elementId: mobileProxyModel.showSavedMode ? "network-wireless-connected-100" : ConnectionIcon
|
|
||||||
|
|
||||||
svg: KSvg.Svg {
|
|
||||||
multipleImages: true
|
|
||||||
imagePath: "icons/network"
|
|
||||||
colorSet: Kirigami.Theme.colorSet
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Controls.BusyIndicator {
|
Controls.BusyIndicator {
|
||||||
id: connectingIndicator
|
anchors.fill: parent
|
||||||
|
|
||||||
anchors {
|
|
||||||
horizontalCenter: connectionSvgIcon.horizontalCenter
|
|
||||||
verticalCenter: connectionSvgIcon.verticalCenter
|
|
||||||
}
|
|
||||||
running: ConnectionState == PlasmaNM.Enums.Activating
|
running: ConnectionState == PlasmaNM.Enums.Activating
|
||||||
visible: running
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Controls.Label {
|
Controls.Label {
|
||||||
id: connectionNameLabel
|
|
||||||
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
text: ItemUniqueName
|
text: ItemUniqueName
|
||||||
|
|
|
||||||
|
|
@ -22,41 +22,23 @@ Kirigami.SwipeListItem {
|
||||||
SecurityType == PlasmaNM.Enums.Wpa2Psk ||
|
SecurityType == PlasmaNM.Enums.Wpa2Psk ||
|
||||||
SecurityType == PlasmaNM.Enums.SAE)
|
SecurityType == PlasmaNM.Enums.SAE)
|
||||||
|
|
||||||
RowLayout {
|
contentItem: RowLayout {
|
||||||
anchors.leftMargin: Kirigami.Units.largeSpacing * 5
|
|
||||||
spacing: Kirigami.Units.largeSpacing
|
spacing: Kirigami.Units.largeSpacing
|
||||||
Kirigami.Separator {}
|
|
||||||
|
|
||||||
Item {
|
Kirigami.Icon {
|
||||||
Layout.preferredWidth: Kirigami.Units.gridUnit
|
Layout.alignment: Qt.AlignVCenter
|
||||||
Layout.preferredHeight: Kirigami.Units.gridUnit
|
Layout.preferredWidth: Kirigami.Units.iconSizes.medium
|
||||||
|
Layout.preferredHeight: Kirigami.Units.iconSizes.medium
|
||||||
|
|
||||||
KSvg.SvgItem {
|
source: mobileProxyModel.showSavedMode ? "network-wireless-connected-100" : ConnectionIcon
|
||||||
id: connectionSvgIcon
|
|
||||||
elementId: mobileProxyModel.showSavedMode ? "network-wireless-connected-100" : ConnectionIcon
|
|
||||||
|
|
||||||
svg: KSvg.Svg {
|
|
||||||
multipleImages: true
|
|
||||||
imagePath: "icons/network"
|
|
||||||
colorSet: Kirigami.Theme.colorSet
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Controls.BusyIndicator {
|
Controls.BusyIndicator {
|
||||||
id: connectingIndicator
|
anchors.fill: parent
|
||||||
|
|
||||||
anchors {
|
|
||||||
horizontalCenter: connectionSvgIcon.horizontalCenter
|
|
||||||
verticalCenter: connectionSvgIcon.verticalCenter
|
|
||||||
}
|
|
||||||
running: ConnectionState == PlasmaNM.Enums.Activating
|
running: ConnectionState == PlasmaNM.Enums.Activating
|
||||||
visible: running
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Controls.Label {
|
Controls.Label {
|
||||||
id: connectionNameLabel
|
|
||||||
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
text: ItemUniqueName
|
text: ItemUniqueName
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue