diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-09-24 12:53:23 +1000 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-09-24 12:53:23 +1000 |
| commit | 262ade0e59d47df89b547bfa19e43ace0c968fcd (patch) | |
| tree | 4a8e3b33e0fa7eb86cbfb5cbdeba6617461b88a7 | |
| parent | plugin/ia: fix luminance (diff) | |
| download | caelestia-shell-262ade0e59d47df89b547bfa19e43ace0c968fcd.tar.gz caelestia-shell-262ade0e59d47df89b547bfa19e43ace0c968fcd.tar.bz2 caelestia-shell-262ade0e59d47df89b547bfa19e43ace0c968fcd.zip | |
internal: add option for splitbutton menu pos
| -rw-r--r-- | components/controls/SplitButton.qml | 12 | ||||
| -rw-r--r-- | 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 |