From 262ade0e59d47df89b547bfa19e43ace0c968fcd Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Wed, 24 Sep 2025 12:53:23 +1000 Subject: internal: add option for splitbutton menu pos --- components/controls/SplitButton.qml | 12 ++++++++++++ modules/dashboard/Media.qml | 4 +--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/components/controls/SplitButton.qml b/components/controls/SplitButton.qml index 600821c..d7f2651 100644 --- a/components/controls/SplitButton.qml +++ b/components/controls/SplitButton.qml @@ -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 } } } diff --git a/modules/dashboard/Media.qml b/modules/dashboard/Media.qml index 0e74115..3d4dcdb 100644 --- a/modules/dashboard/Media.qml +++ b/modules/dashboard/Media.qml @@ -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 -- cgit v1.2.3-freya