mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 14:23:09 +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 {
|
||||
spacing: Kirigami.Units.largeSpacing
|
||||
|
||||
Item {
|
||||
Layout.preferredWidth: Kirigami.Units.gridUnit
|
||||
Layout.preferredHeight: Kirigami.Units.gridUnit
|
||||
Kirigami.Icon {
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
Layout.preferredWidth: Kirigami.Units.iconSizes.medium
|
||||
Layout.preferredHeight: Kirigami.Units.iconSizes.medium
|
||||
|
||||
KSvg.SvgItem {
|
||||
id: connectionSvgIcon
|
||||
elementId: mobileProxyModel.showSavedMode ? "network-wireless-connected-100" : ConnectionIcon
|
||||
|
||||
svg: KSvg.Svg {
|
||||
multipleImages: true
|
||||
imagePath: "icons/network"
|
||||
colorSet: Kirigami.Theme.colorSet
|
||||
}
|
||||
}
|
||||
source: mobileProxyModel.showSavedMode ? "network-wireless-connected-100" : ConnectionIcon
|
||||
|
||||
Controls.BusyIndicator {
|
||||
id: connectingIndicator
|
||||
|
||||
anchors {
|
||||
horizontalCenter: connectionSvgIcon.horizontalCenter
|
||||
verticalCenter: connectionSvgIcon.verticalCenter
|
||||
}
|
||||
anchors.fill: parent
|
||||
running: ConnectionState == PlasmaNM.Enums.Activating
|
||||
visible: running
|
||||
}
|
||||
}
|
||||
|
||||
Controls.Label {
|
||||
id: connectionNameLabel
|
||||
|
||||
Layout.fillWidth: true
|
||||
elide: Text.ElideRight
|
||||
text: ItemUniqueName
|
||||
|
|
|
|||
|
|
@ -22,41 +22,23 @@ Kirigami.SwipeListItem {
|
|||
SecurityType == PlasmaNM.Enums.Wpa2Psk ||
|
||||
SecurityType == PlasmaNM.Enums.SAE)
|
||||
|
||||
RowLayout {
|
||||
anchors.leftMargin: Kirigami.Units.largeSpacing * 5
|
||||
contentItem: RowLayout {
|
||||
spacing: Kirigami.Units.largeSpacing
|
||||
Kirigami.Separator {}
|
||||
|
||||
Item {
|
||||
Layout.preferredWidth: Kirigami.Units.gridUnit
|
||||
Layout.preferredHeight: Kirigami.Units.gridUnit
|
||||
Kirigami.Icon {
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
Layout.preferredWidth: Kirigami.Units.iconSizes.medium
|
||||
Layout.preferredHeight: Kirigami.Units.iconSizes.medium
|
||||
|
||||
KSvg.SvgItem {
|
||||
id: connectionSvgIcon
|
||||
elementId: mobileProxyModel.showSavedMode ? "network-wireless-connected-100" : ConnectionIcon
|
||||
|
||||
svg: KSvg.Svg {
|
||||
multipleImages: true
|
||||
imagePath: "icons/network"
|
||||
colorSet: Kirigami.Theme.colorSet
|
||||
}
|
||||
}
|
||||
source: mobileProxyModel.showSavedMode ? "network-wireless-connected-100" : ConnectionIcon
|
||||
|
||||
Controls.BusyIndicator {
|
||||
id: connectingIndicator
|
||||
|
||||
anchors {
|
||||
horizontalCenter: connectionSvgIcon.horizontalCenter
|
||||
verticalCenter: connectionSvgIcon.verticalCenter
|
||||
}
|
||||
anchors.fill: parent
|
||||
running: ConnectionState == PlasmaNM.Enums.Activating
|
||||
visible: running
|
||||
}
|
||||
}
|
||||
|
||||
Controls.Label {
|
||||
id: connectionNameLabel
|
||||
|
||||
Layout.fillWidth: true
|
||||
elide: Text.ElideRight
|
||||
text: ItemUniqueName
|
||||
|
|
|
|||
Loading…
Reference in a new issue