Create new Account Switcher

This commit is contained in:
Tobias Fella
2022-11-13 15:54:42 +00:00
parent cfe3825d63
commit 90cbe37a92
5 changed files with 220 additions and 14 deletions

View File

@@ -165,7 +165,7 @@ Kirigami.ScrollablePage {
id: listView
activeFocusOnTab: true
clip: accountList.count > 1
clip: AccountRegistry.count > 1
header: QQC2.ItemDelegate {
visible: page.collapsedMode
@@ -376,18 +376,7 @@ Kirigami.ScrollablePage {
}
}
footer: QQC2.ToolBar {
visible: AccountRegistry.accountCount > 1 && !collapsedMode
height: visible ? implicitHeight : 0
contentItem: QQC2.ComboBox {
id: accountList
model: AccountRegistry
textRole: "userId"
valueRole: "connection"
onActivated: Controller.activeConnection = currentValue
Component.onCompleted: currentIndex = indexOfValue(Controller.activeConnection)
}
footer: UserInfo {
width: parent.width
}
}