diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-09-15 23:09:51 +1000 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-09-15 23:09:51 +1000 |
| commit | debf99a5d947f6641e74770d7b72bad0988e706c (patch) | |
| tree | 4b9076136c07e73c0f3e819330970e0d3385c34a | |
| parent | utilities/toggles: add gamemode (diff) | |
| download | caelestia-shell-debf99a5d947f6641e74770d7b72bad0988e706c.tar.gz caelestia-shell-debf99a5d947f6641e74770d7b72bad0988e706c.tar.bz2 caelestia-shell-debf99a5d947f6641e74770d7b72bad0988e706c.zip | |
utilities: fix colours
Fix transparency + some button colours
| -rw-r--r-- | components/controls/IconButton.qml | 6 | ||||
| -rw-r--r-- | components/controls/IconTextButton.qml | 2 | ||||
| -rw-r--r-- | components/controls/TextButton.qml | 14 | ||||
| -rw-r--r-- | modules/utilities/RecordingDeleteModal.qml | 4 | ||||
| -rw-r--r-- | modules/utilities/cards/IdleInhibit.qml | 2 | ||||
| -rw-r--r-- | modules/utilities/cards/Record.qml | 2 | ||||
| -rw-r--r-- | modules/utilities/cards/Toggles.qml | 4 |
7 files changed, 19 insertions, 15 deletions
diff --git a/components/controls/IconButton.qml b/components/controls/IconButton.qml index 36f8e38..590cd7d 100644 --- a/components/controls/IconButton.qml +++ b/components/controls/IconButton.qml @@ -28,13 +28,13 @@ StyledRect { property color inactiveColour: { if (!toggle && type === IconButton.Filled) return Colours.palette.m3primary; - return type === IconButton.Filled ? Colours.palette.m3surfaceContainer : Colours.palette.m3secondaryContainer; + return type === IconButton.Filled ? Colours.tPalette.m3surfaceContainer : Colours.palette.m3secondaryContainer; } - property color activeOnColour: type === IconButton.Filled ? Colours.palette.m3onPrimary : Colours.palette.m3onSecondary + property color activeOnColour: type === IconButton.Filled ? Colours.palette.m3onPrimary : type === IconButton.Tonal ? Colours.palette.m3onSecondary : Colours.palette.m3primary property color inactiveOnColour: { if (!toggle && type === IconButton.Filled) return Colours.palette.m3onPrimary; - return type === IconButton.Filled ? Colours.palette.m3onSurfaceVariant : Colours.palette.m3onSecondaryContainer; + return type === IconButton.Tonal ? Colours.palette.m3onSecondaryContainer : Colours.palette.m3onSurfaceVariant; } signal clicked diff --git a/components/controls/IconTextButton.qml b/components/controls/IconTextButton.qml index c776401..78e7c5b 100644 --- a/components/controls/IconTextButton.qml +++ b/components/controls/IconTextButton.qml @@ -27,7 +27,7 @@ StyledRect { property bool internalChecked property color activeColour: type === IconTextButton.Filled ? Colours.palette.m3primary : Colours.palette.m3secondary - property color inactiveColour: type === IconTextButton.Filled ? Colours.palette.m3surfaceContainer : Colours.palette.m3secondaryContainer + property color inactiveColour: type === IconTextButton.Filled ? Colours.tPalette.m3surfaceContainer : Colours.palette.m3secondaryContainer property color activeOnColour: type === IconTextButton.Filled ? Colours.palette.m3onPrimary : Colours.palette.m3onSecondary property color inactiveOnColour: type === IconTextButton.Filled ? Colours.palette.m3onSurface : Colours.palette.m3onSecondaryContainer diff --git a/components/controls/TextButton.qml b/components/controls/TextButton.qml index 65e9f09..71ebcfa 100644 --- a/components/controls/TextButton.qml +++ b/components/controls/TextButton.qml @@ -25,9 +25,17 @@ StyledRect { property bool internalChecked 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 + property color inactiveColour: type === TextButton.Filled ? Colours.tPalette.m3surfaceContainer : Colours.palette.m3secondaryContainer + property color activeOnColour: { + if (type === TextButton.Text) + return Colours.palette.m3primary; + return type === TextButton.Filled ? Colours.palette.m3onPrimary : Colours.palette.m3onSecondary; + } + property color inactiveOnColour: { + if (type === TextButton.Text) + return Colours.palette.m3primary; + return type === TextButton.Filled ? Colours.palette.m3onSurface : Colours.palette.m3onSecondaryContainer; + } signal clicked diff --git a/modules/utilities/RecordingDeleteModal.qml b/modules/utilities/RecordingDeleteModal.qml index 83e6d59..e832c27 100644 --- a/modules/utilities/RecordingDeleteModal.qml +++ b/modules/utilities/RecordingDeleteModal.qml @@ -179,16 +179,12 @@ Loader { TextButton { text: qsTr("Cancel") type: TextButton.Text - label.color: Colours.palette.m3primary - stateLayer.color: Colours.palette.m3primary onClicked: root.props.recordingConfirmDelete = "" } TextButton { text: qsTr("Delete") type: TextButton.Text - label.color: Colours.palette.m3primary - stateLayer.color: Colours.palette.m3primary onClicked: { CUtils.deleteFile(Qt.resolvedUrl(root.props.recordingConfirmDelete)); root.props.recordingConfirmDelete = ""; diff --git a/modules/utilities/cards/IdleInhibit.qml b/modules/utilities/cards/IdleInhibit.qml index 4e95a56..0344e3a 100644 --- a/modules/utilities/cards/IdleInhibit.qml +++ b/modules/utilities/cards/IdleInhibit.qml @@ -12,7 +12,7 @@ StyledRect { implicitHeight: layout.implicitHeight + (IdleInhibitor.enabled ? activeChip.implicitHeight + activeChip.anchors.topMargin : 0) + Appearance.padding.large * 2 radius: Appearance.rounding.normal - color: Colours.palette.m3surfaceContainer + color: Colours.tPalette.m3surfaceContainer clip: true RowLayout { diff --git a/modules/utilities/cards/Record.qml b/modules/utilities/cards/Record.qml index a14ec38..273c640 100644 --- a/modules/utilities/cards/Record.qml +++ b/modules/utilities/cards/Record.qml @@ -17,7 +17,7 @@ StyledRect { implicitHeight: layout.implicitHeight + layout.anchors.margins * 2 radius: Appearance.rounding.normal - color: Colours.palette.m3surfaceContainer + color: Colours.tPalette.m3surfaceContainer ColumnLayout { id: layout diff --git a/modules/utilities/cards/Toggles.qml b/modules/utilities/cards/Toggles.qml index a5a3db3..15924a4 100644 --- a/modules/utilities/cards/Toggles.qml +++ b/modules/utilities/cards/Toggles.qml @@ -17,7 +17,7 @@ StyledRect { implicitHeight: layout.implicitHeight + Appearance.padding.large * 2 radius: Appearance.rounding.normal - color: Colours.palette.m3surfaceContainer + color: Colours.tPalette.m3surfaceContainer ColumnLayout { id: layout @@ -85,7 +85,7 @@ StyledRect { Layout.fillWidth: true Layout.preferredWidth: implicitWidth + (stateLayer.pressed ? Appearance.padding.large : internalChecked ? Appearance.padding.smaller : 0) radius: stateLayer.pressed ? Appearance.rounding.small / 2 : internalChecked ? Appearance.rounding.small : Appearance.rounding.normal - inactiveColour: Colours.palette.m3surfaceContainerHighest + inactiveColour: Colours.layer(Colours.palette.m3surfaceContainerHighest, 2) toggle: true radiusAnim.duration: Appearance.anim.durations.expressiveFastSpatial radiusAnim.easing.bezierCurve: Appearance.anim.curves.expressiveFastSpatial |