internal: add option for splitbutton menu pos

This commit is contained in:
2 * r + 2 * t 2025-09-24 12:53:23 +10:00
parent 86348e4f66
commit 262ade0e59
2 changed files with 13 additions and 3 deletions

View file

@ -16,6 +16,7 @@ Row {
property real verticalPadding: Appearance.padding.smaller
property int type: SplitButton.Filled
property bool disabled
property bool menuOnTop
property string fallbackIcon
property string fallbackText
@ -144,9 +145,20 @@ Row {
Menu {
id: menu
states: State {
when: root.menuOnTop
AnchorChanges {
target: menu
anchors.top: undefined
anchors.bottom: expandBtn.top
}
}
anchors.top: parent.bottom
anchors.right: parent.right
anchors.topMargin: Appearance.spacing.small
anchors.bottomMargin: Appearance.spacing.small
}
}
}

View file

@ -334,9 +334,7 @@ Item {
label.elide: Text.ElideRight
stateLayer.disabled: true
menu.anchors.top: undefined
menu.anchors.bottom: menu.parent.top
menu.anchors.bottomMargin: Appearance.spacing.small
menuOnTop: true
Variants {
id: playerList