Commit 6a8bf09c authored by Janet Blackquill's avatar Janet Blackquill 🌈 Committed by Nate Graham
Browse files

kickoff: use Kirigami.Avatar directly instead of wrapping in RoundButton

This works around a Kirigami bug in a manner that can be shipped in 5.21, as well as
bringing consistency with other clickable avatars which typically use actions.main
instead of wrapping the Avatar in another component.

As a bonus, we lose a lot of excess code.

CCBUG: 428380
parent 58946560
......@@ -78,29 +78,17 @@ PlasmaExtras.PlasmoidHeading {
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
anchors.rightMargin: Math.round(parent.width/1.5) + PlasmaCore.Units.gridUnit
PlasmaComponents.RoundButton {
id: avatarButton
visible: KQuickAddons.KCMShell.authorize("kcm_users.desktop").length > 0
flat: true
Kirigami.Avatar {
source: kuser.faceIconUrl
name: nameLabel.text
Layout.preferredWidth: PlasmaCore.Units.gridUnit * 2
Layout.preferredHeight: PlasmaCore.Units.gridUnit * 2
Accessible.name: nameLabel.text
Accessible.description: i18n("Go to user settings")
Kirigami.Avatar {
source: kuser.faceIconUrl
name: nameLabel.text
anchors {
fill: parent
margins: PlasmaCore.Units.smallSpacing
}
}
onClicked: {
KQuickAddons.KCMShell.openSystemSettings("kcm_users")
actions.main: Kirigami.Action {
text: i18n("Go to user settings")
onTriggered: KQuickAddons.KCMShell.openSystemSettings("kcm_users")
}
Keys.onPressed: {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment