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 real verticalPadding: Appearance.padding.smaller
|
||||||
property int type: SplitButton.Filled
|
property int type: SplitButton.Filled
|
||||||
property bool disabled
|
property bool disabled
|
||||||
|
property bool menuOnTop
|
||||||
property string fallbackIcon
|
property string fallbackIcon
|
||||||
property string fallbackText
|
property string fallbackText
|
||||||
|
|
||||||
|
|
@ -144,9 +145,20 @@ Row {
|
||||||
Menu {
|
Menu {
|
||||||
id: menu
|
id: menu
|
||||||
|
|
||||||
|
states: State {
|
||||||
|
when: root.menuOnTop
|
||||||
|
|
||||||
|
AnchorChanges {
|
||||||
|
target: menu
|
||||||
|
anchors.top: undefined
|
||||||
|
anchors.bottom: expandBtn.top
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
anchors.top: parent.bottom
|
anchors.top: parent.bottom
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.topMargin: Appearance.spacing.small
|
anchors.topMargin: Appearance.spacing.small
|
||||||
|
anchors.bottomMargin: Appearance.spacing.small
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -334,9 +334,7 @@ Item {
|
||||||
label.elide: Text.ElideRight
|
label.elide: Text.ElideRight
|
||||||
|
|
||||||
stateLayer.disabled: true
|
stateLayer.disabled: true
|
||||||
menu.anchors.top: undefined
|
menuOnTop: true
|
||||||
menu.anchors.bottom: menu.parent.top
|
|
||||||
menu.anchors.bottomMargin: Appearance.spacing.small
|
|
||||||
|
|
||||||
Variants {
|
Variants {
|
||||||
id: playerList
|
id: playerList
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue