summaryrefslogtreecommitdiff
path: root/components/controls/SplitButton.qml
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-09-23 23:16:17 +1000
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-09-23 23:16:17 +1000
commit06f366e27eb7b54567a3e8f74d6ccf89977876c7 (patch)
treee0e778de96e558f33865a226c887a53b157ae7db /components/controls/SplitButton.qml
parentreadme: update with new configs (diff)
downloadcaelestia-shell-06f366e27eb7b54567a3e8f74d6ccf89977876c7.tar.gz
caelestia-shell-06f366e27eb7b54567a3e8f74d6ccf89977876c7.tar.bz2
caelestia-shell-06f366e27eb7b54567a3e8f74d6ccf89977876c7.zip
dashboard/media: improve ui
Diffstat (limited to 'components/controls/SplitButton.qml')
-rw-r--r--components/controls/SplitButton.qml14
1 files changed, 10 insertions, 4 deletions
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