mirror of
https://github.com/redstrate/Astra.git
synced 2025-04-25 13:57:45 +00:00
Make current profile/account menus model and place them properly
This commit is contained in:
parent
6845b91695
commit
67e482141d
1 changed files with 8 additions and 2 deletions
|
@ -110,12 +110,16 @@ QQC2.Control {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
||||||
FormCard.FormButtonDelegate {
|
FormCard.FormButtonDelegate {
|
||||||
|
id: currentProfileDelegate
|
||||||
|
|
||||||
text: i18n("Current Profile")
|
text: i18n("Current Profile")
|
||||||
description: LauncherCore.currentProfile.name
|
description: LauncherCore.currentProfile.name
|
||||||
|
|
||||||
QQC2.Menu {
|
QQC2.Menu {
|
||||||
id: profileMenu
|
id: profileMenu
|
||||||
|
|
||||||
|
modal: true
|
||||||
|
|
||||||
Repeater {
|
Repeater {
|
||||||
model: LauncherCore.profileManager
|
model: LauncherCore.profileManager
|
||||||
|
|
||||||
|
@ -136,7 +140,7 @@ QQC2.Control {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onClicked: profileMenu.popup()
|
onClicked: profileMenu.popup(currentProfileDelegate, currentProfileDelegate.width, currentProfileDelegate.height)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -161,6 +165,8 @@ QQC2.Control {
|
||||||
QQC2.Menu {
|
QQC2.Menu {
|
||||||
id: accountMenu
|
id: accountMenu
|
||||||
|
|
||||||
|
modal: true
|
||||||
|
|
||||||
Repeater {
|
Repeater {
|
||||||
model: LauncherCore.accountManager
|
model: LauncherCore.accountManager
|
||||||
|
|
||||||
|
@ -183,7 +189,7 @@ QQC2.Control {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onClicked: accountMenu.popup()
|
onClicked: accountMenu.popup(currentAccountDelegate, currentAccountDelegate.width, currentAccountDelegate.height)
|
||||||
}
|
}
|
||||||
|
|
||||||
FormCard.FormDelegateSeparator {
|
FormCard.FormDelegateSeparator {
|
||||||
|
|
Loading…
Add table
Reference in a new issue