Commit 62a70dbc authored by Mikel Johnson's avatar Mikel Johnson
Browse files

[Kickoff] Use RoundButton for now

Right now Avatar isn't mature enough for keyboard navigation so it's best to work around touch issue for now
parent f2c11f14
......@@ -79,21 +79,40 @@ PlasmaExtras.PlasmoidHeading {
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
anchors.rightMargin: Math.round(parent.width/1.5) + PlasmaCore.Units.gridUnit
Kirigami.Avatar {
PlasmaComponents.RoundButton {
id: avatarButton
visible: KQuickAddons.KCMShell.authorize("kcm_users.desktop").length > 0
activeFocusOnTab: true
source: kuser.faceIconUrl
name: nameLabel.text
flat: true
Layout.preferredWidth: PlasmaCore.Units.gridUnit * 2
Layout.preferredHeight: PlasmaCore.Units.gridUnit * 2
actions.main: Kirigami.Action {
text: i18n("Go to user settings")
onTriggered: KQuickAddons.KCMShell.openSystemSettings("kcm_users")
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
}
// NOTE: for some reason Avatar eats touch events even though it shouldn't
// Ideally we'd be using Avatar but it doesn't have proper key nav yet
// see https://invent.kde.org/frameworks/kirigami/-/merge_requests/218
actions.main: Kirigami.Action {
text: avatarButton.Accessible.description
onTriggered: avatarButton.clicked()
}
// no keyboard nav
activeFocusOnTab: false
// ignore accessibility (done by the button)
Accessible.ignored: true
}
onClicked: {
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