From 06f366e27eb7b54567a3e8f74d6ccf89977876c7 Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Tue, 23 Sep 2025 23:16:17 +1000 Subject: dashboard/media: improve ui --- components/controls/SplitButton.qml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'components/controls/SplitButton.qml') diff --git a/components/controls/SplitButton.qml b/components/controls/SplitButton.qml index c601361..600821c 100644 --- a/components/controls/SplitButton.qml +++ b/components/controls/SplitButton.qml @@ -16,15 +16,21 @@ Row { property real verticalPadding: Appearance.padding.smaller property int type: SplitButton.Filled property bool disabled + property string fallbackIcon + property string fallbackText + property alias menuItems: menu.items property alias active: menu.active property alias expanded: menu.expanded property alias menu: menu + property alias iconLabel: iconLabel + property alias label: label + property alias stateLayer: stateLayer property color colour: type == SplitButton.Filled ? Colours.palette.m3primary : Colours.palette.m3secondaryContainer property color textColour: type == SplitButton.Filled ? Colours.palette.m3onPrimary : Colours.palette.m3onSecondaryContainer - readonly property color disabledColour: Qt.alpha(Colours.palette.m3onSurface, 0.1) - readonly property color disabledTextColour: Qt.alpha(Colours.palette.m3onSurface, 0.38) + property color disabledColour: Qt.alpha(Colours.palette.m3onSurface, 0.1) + property color disabledTextColour: Qt.alpha(Colours.palette.m3onSurface, 0.38) spacing: Math.floor(Appearance.spacing.small / 2) @@ -62,7 +68,7 @@ Row { Layout.alignment: Qt.AlignVCenter animate: true - text: root.active?.activeIcon ?? "" + text: root.active?.activeIcon ?? root.fallbackIcon color: root.disabled ? root.disabledTextColour : root.textColour fill: 1 } @@ -73,7 +79,7 @@ Row { Layout.alignment: Qt.AlignVCenter Layout.preferredWidth: implicitWidth animate: true - text: root.active?.activeText ?? "" + text: root.active?.activeText ?? root.fallbackText color: root.disabled ? root.disabledTextColour : root.textColour clip: true -- cgit v1.2.3-freya