diff options
Diffstat (limited to 'components/controls/TextButton.qml')
| -rw-r--r-- | components/controls/TextButton.qml | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/components/controls/TextButton.qml b/components/controls/TextButton.qml index 55749cb..a4c8666 100644 --- a/components/controls/TextButton.qml +++ b/components/controls/TextButton.qml @@ -18,16 +18,16 @@ StyledRect { property real horizontalPadding: Appearance.padding.normal property real verticalPadding: Appearance.padding.smaller property alias font: label.font - property int type: IconButton.Filled + property int type: TextButton.Filled property alias stateLayer: stateLayer property alias label: label property bool internalChecked - property color activeColour: type == IconButton.Filled ? Colours.palette.m3primary : Colours.palette.m3secondary - property color inactiveColour: type == IconButton.Filled ? Colours.palette.m3surfaceContainer : Colours.palette.m3secondaryContainer - property color activeOnColour: type == IconButton.Filled ? Colours.palette.m3onPrimary : Colours.palette.m3onSecondary - property color inactiveOnColour: type == IconButton.Filled ? Colours.palette.m3onSurface : Colours.palette.m3onSecondaryContainer + property color activeColour: type == TextButton.Filled ? Colours.palette.m3primary : Colours.palette.m3secondary + property color inactiveColour: type == TextButton.Filled ? Colours.palette.m3surfaceContainer : Colours.palette.m3secondaryContainer + property color activeOnColour: type == TextButton.Filled ? Colours.palette.m3onPrimary : Colours.palette.m3onSecondary + property color inactiveOnColour: type == TextButton.Filled ? Colours.palette.m3onSurface : Colours.palette.m3onSecondaryContainer function onClicked(): void { } @@ -35,7 +35,7 @@ StyledRect { onCheckedChanged: internalChecked = checked radius: internalChecked ? Appearance.rounding.small : implicitHeight / 2 - color: type == IconButton.Text ? "transparent" : internalChecked ? activeColour : inactiveColour + color: type == TextButton.Text ? "transparent" : internalChecked ? activeColour : inactiveColour implicitWidth: label.implicitWidth + horizontalPadding * 2 implicitHeight: label.implicitHeight + verticalPadding * 2 |