internal: colour fixes

This commit is contained in:
2 * r + 2 * t 2025-08-08 21:12:46 +10:00
parent aa40234888
commit 729bc6f6f1
6 changed files with 60 additions and 61 deletions

View file

@ -124,7 +124,7 @@ Item {
implicitHeight: nonAnimHeight
radius: Appearance.rounding.normal
color: Qt.alpha(Colours.tPalette.m3surfaceContainerHighest, GridView.isCurrentItem ? 1 : 0)
color: Qt.alpha(Colours.tPalette.m3surfaceContainerHighest, GridView.isCurrentItem ? Colours.tPalette.m3surfaceContainerHighest.a : 0)
z: GridView.isCurrentItem || implicitHeight !== nonAnimHeight ? 1 : 0
clip: true

View file

@ -167,7 +167,7 @@ ColumnLayout {
anchors.right: parent.right
implicitHeight: deviceInner.implicitHeight + Appearance.padding.normal * 2
color: Qt.alpha(Colours.tPalette.m3surfaceContainer, root.session.bt.active === modelData ? 1 : 0)
color: Qt.alpha(Colours.tPalette.m3surfaceContainer, root.session.bt.active === modelData ? Colours.tPalette.m3surfaceContainer.a : 0)
radius: Appearance.rounding.normal
StateLayer {

View file

@ -58,7 +58,7 @@ Item {
text: root.modelData?.desc ?? ""
font.pointSize: Appearance.font.size.small
color: Colours.tPalette.m3outline
color: Colours.palette.m3outline
elide: Text.ElideRight
width: root.width - icon.width - Appearance.rounding.normal * 2

View file

@ -61,7 +61,7 @@ Item {
text: (root.modelData?.comment || root.modelData?.genericName || root.modelData?.name) ?? ""
font.pointSize: Appearance.font.size.small
color: Colours.tPalette.m3outline
color: Colours.palette.m3outline
elide: Text.ElideRight
width: root.width - icon.width - Appearance.rounding.normal * 2

View file

@ -58,7 +58,7 @@ Item {
text: root.modelData?.description ?? ""
font.pointSize: Appearance.font.size.small
color: Colours.tPalette.m3outline
color: Colours.palette.m3outline
elide: Text.ElideRight
width: root.width - icon.width - Appearance.rounding.normal * 2

View file

@ -5,7 +5,6 @@ import qs.utils
import Quickshell
import Quickshell.Io
import QtQuick
import QtQuick.Controls
Singleton {
id: root
@ -80,61 +79,61 @@ Singleton {
property real layers: 0.75
}
component M3TPalette: M3Palette {
m3primary_paletteKeyColor: root.layer(root.palette.m3primary_paletteKeyColor)
m3secondary_paletteKeyColor: root.layer(root.palette.m3secondary_paletteKeyColor)
m3tertiary_paletteKeyColor: root.layer(root.palette.m3tertiary_paletteKeyColor)
m3neutral_paletteKeyColor: root.layer(root.palette.m3neutral_paletteKeyColor)
m3neutral_variant_paletteKeyColor: root.layer(root.palette.m3neutral_variant_paletteKeyColor)
m3background: root.layer(root.palette.m3background, 0)
m3onBackground: root.layer(root.palette.m3onBackground)
m3surface: root.layer(root.palette.m3surface, 0)
m3surfaceDim: root.layer(root.palette.m3surfaceDim, 0)
m3surfaceBright: root.layer(root.palette.m3surfaceBright, 0)
m3surfaceContainerLowest: root.layer(root.palette.m3surfaceContainerLowest)
m3surfaceContainerLow: root.layer(root.palette.m3surfaceContainerLow)
m3surfaceContainer: root.layer(root.palette.m3surfaceContainer)
m3surfaceContainerHigh: root.layer(root.palette.m3surfaceContainerHigh)
m3surfaceContainerHighest: root.layer(root.palette.m3surfaceContainerHighest)
m3onSurface: root.layer(root.palette.m3onSurface)
m3surfaceVariant: root.layer(root.palette.m3surfaceVariant, 0)
m3onSurfaceVariant: root.layer(root.palette.m3onSurfaceVariant)
m3inverseSurface: root.layer(root.palette.m3inverseSurface, 0)
m3inverseOnSurface: root.layer(root.palette.m3inverseOnSurface)
m3outline: root.layer(root.palette.m3outline)
m3outlineVariant: root.layer(root.palette.m3outlineVariant)
m3shadow: root.layer(root.palette.m3shadow)
m3scrim: root.layer(root.palette.m3scrim)
m3surfaceTint: root.layer(root.palette.m3surfaceTint)
m3primary: root.layer(root.palette.m3primary)
m3onPrimary: root.layer(root.palette.m3onPrimary)
m3primaryContainer: root.layer(root.palette.m3primaryContainer)
m3onPrimaryContainer: root.layer(root.palette.m3onPrimaryContainer)
m3inversePrimary: root.layer(root.palette.m3inversePrimary)
m3secondary: root.layer(root.palette.m3secondary)
m3onSecondary: root.layer(root.palette.m3onSecondary)
m3secondaryContainer: root.layer(root.palette.m3secondaryContainer)
m3onSecondaryContainer: root.layer(root.palette.m3onSecondaryContainer)
m3tertiary: root.layer(root.palette.m3tertiary)
m3onTertiary: root.layer(root.palette.m3onTertiary)
m3tertiaryContainer: root.layer(root.palette.m3tertiaryContainer)
m3onTertiaryContainer: root.layer(root.palette.m3onTertiaryContainer)
m3error: root.layer(root.palette.m3error)
m3onError: root.layer(root.palette.m3onError)
m3errorContainer: root.layer(root.palette.m3errorContainer)
m3onErrorContainer: root.layer(root.palette.m3onErrorContainer)
m3primaryFixed: root.layer(root.palette.m3primaryFixed)
m3primaryFixedDim: root.layer(root.palette.m3primaryFixedDim)
m3onPrimaryFixed: root.layer(root.palette.m3onPrimaryFixed)
m3onPrimaryFixedVariant: root.layer(root.palette.m3onPrimaryFixedVariant)
m3secondaryFixed: root.layer(root.palette.m3secondaryFixed)
m3secondaryFixedDim: root.layer(root.palette.m3secondaryFixedDim)
m3onSecondaryFixed: root.layer(root.palette.m3onSecondaryFixed)
m3onSecondaryFixedVariant: root.layer(root.palette.m3onSecondaryFixedVariant)
m3tertiaryFixed: root.layer(root.palette.m3tertiaryFixed)
m3tertiaryFixedDim: root.layer(root.palette.m3tertiaryFixedDim)
m3onTertiaryFixed: root.layer(root.palette.m3onTertiaryFixed)
m3onTertiaryFixedVariant: root.layer(root.palette.m3onTertiaryFixedVariant)
component M3TPalette: QtObject {
readonly property color m3primary_paletteKeyColor: root.layer(root.palette.m3primary_paletteKeyColor)
readonly property color m3secondary_paletteKeyColor: root.layer(root.palette.m3secondary_paletteKeyColor)
readonly property color m3tertiary_paletteKeyColor: root.layer(root.palette.m3tertiary_paletteKeyColor)
readonly property color m3neutral_paletteKeyColor: root.layer(root.palette.m3neutral_paletteKeyColor)
readonly property color m3neutral_variant_paletteKeyColor: root.layer(root.palette.m3neutral_variant_paletteKeyColor)
readonly property color m3background: root.layer(root.palette.m3background, 0)
readonly property color m3onBackground: root.layer(root.palette.m3onBackground)
readonly property color m3surface: root.layer(root.palette.m3surface, 0)
readonly property color m3surfaceDim: root.layer(root.palette.m3surfaceDim, 0)
readonly property color m3surfaceBright: root.layer(root.palette.m3surfaceBright, 0)
readonly property color m3surfaceContainerLowest: root.layer(root.palette.m3surfaceContainerLowest)
readonly property color m3surfaceContainerLow: root.layer(root.palette.m3surfaceContainerLow)
readonly property color m3surfaceContainer: root.layer(root.palette.m3surfaceContainer)
readonly property color m3surfaceContainerHigh: root.layer(root.palette.m3surfaceContainerHigh)
readonly property color m3surfaceContainerHighest: root.layer(root.palette.m3surfaceContainerHighest)
readonly property color m3onSurface: root.layer(root.palette.m3onSurface)
readonly property color m3surfaceVariant: root.layer(root.palette.m3surfaceVariant, 0)
readonly property color m3onSurfaceVariant: root.layer(root.palette.m3onSurfaceVariant)
readonly property color m3inverseSurface: root.layer(root.palette.m3inverseSurface, 0)
readonly property color m3inverseOnSurface: root.layer(root.palette.m3inverseOnSurface)
readonly property color m3outline: root.layer(root.palette.m3outline)
readonly property color m3outlineVariant: root.layer(root.palette.m3outlineVariant)
readonly property color m3shadow: root.layer(root.palette.m3shadow)
readonly property color m3scrim: root.layer(root.palette.m3scrim)
readonly property color m3surfaceTint: root.layer(root.palette.m3surfaceTint)
readonly property color m3primary: root.layer(root.palette.m3primary)
readonly property color m3onPrimary: root.layer(root.palette.m3onPrimary)
readonly property color m3primaryContainer: root.layer(root.palette.m3primaryContainer)
readonly property color m3onPrimaryContainer: root.layer(root.palette.m3onPrimaryContainer)
readonly property color m3inversePrimary: root.layer(root.palette.m3inversePrimary)
readonly property color m3secondary: root.layer(root.palette.m3secondary)
readonly property color m3onSecondary: root.layer(root.palette.m3onSecondary)
readonly property color m3secondaryContainer: root.layer(root.palette.m3secondaryContainer)
readonly property color m3onSecondaryContainer: root.layer(root.palette.m3onSecondaryContainer)
readonly property color m3tertiary: root.layer(root.palette.m3tertiary)
readonly property color m3onTertiary: root.layer(root.palette.m3onTertiary)
readonly property color m3tertiaryContainer: root.layer(root.palette.m3tertiaryContainer)
readonly property color m3onTertiaryContainer: root.layer(root.palette.m3onTertiaryContainer)
readonly property color m3error: root.layer(root.palette.m3error)
readonly property color m3onError: root.layer(root.palette.m3onError)
readonly property color m3errorContainer: root.layer(root.palette.m3errorContainer)
readonly property color m3onErrorContainer: root.layer(root.palette.m3onErrorContainer)
readonly property color m3primaryFixed: root.layer(root.palette.m3primaryFixed)
readonly property color m3primaryFixedDim: root.layer(root.palette.m3primaryFixedDim)
readonly property color m3onPrimaryFixed: root.layer(root.palette.m3onPrimaryFixed)
readonly property color m3onPrimaryFixedVariant: root.layer(root.palette.m3onPrimaryFixedVariant)
readonly property color m3secondaryFixed: root.layer(root.palette.m3secondaryFixed)
readonly property color m3secondaryFixedDim: root.layer(root.palette.m3secondaryFixedDim)
readonly property color m3onSecondaryFixed: root.layer(root.palette.m3onSecondaryFixed)
readonly property color m3onSecondaryFixedVariant: root.layer(root.palette.m3onSecondaryFixedVariant)
readonly property color m3tertiaryFixed: root.layer(root.palette.m3tertiaryFixed)
readonly property color m3tertiaryFixedDim: root.layer(root.palette.m3tertiaryFixedDim)
readonly property color m3onTertiaryFixed: root.layer(root.palette.m3onTertiaryFixed)
readonly property color m3onTertiaryFixedVariant: root.layer(root.palette.m3onTertiaryFixedVariant)
}
component M3Palette: QtObject {