Add right click menu to accountlist avatar

Adds a right click menu with the following options

![image](/uploads/09a266fb609bb8f94b206eb66f09e06d/image.png)

depends upon frameworks/kirigami!933
This commit is contained in:
James Graham
2023-03-14 23:00:41 +00:00
committed by Carl Schwan
parent bc84ad8d56
commit 64dee7eb12
5 changed files with 66 additions and 1 deletions

View File

@@ -144,12 +144,17 @@ QQC2.ToolBar {
actions.main: Kirigami.Action {
text: i18n("Edit this account")
icon.name: "document-edit"
onTriggered: pageStack.pushDialogLayer(Qt.resolvedUrl('./AccountEditorPage.qml'), {
onTriggered: pageStack.pushDialogLayer(Qt.resolvedUrl('qrc:/AccountEditorPage.qml'), {
connection: Controller.activeConnection
}, {
title: i18n("Account editor")
});
}
TapHandler {
acceptedButtons: Qt.RightButton
acceptedDevices: PointerDevice.Mouse
onTapped: accountMenu.open()
}
}
}
ColumnLayout {
@@ -214,6 +219,11 @@ QQC2.ToolBar {
Item {
width: 1
}
AccountMenu {
id: accountMenu
y: -height
}
}
}
}