internal: add option for splitbutton menu pos
This commit is contained in:
parent
86348e4f66
commit
262ade0e59
2 changed files with 13 additions and 3 deletions
|
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue