feat(a11y): tokenize muted quality-badge text/tints to theme tokens

Replace the fixed mid-grey #b0b0b0 / #999999 on the CD/MP3/lossless
marks, the tier label, the detail line, and the SongCard LED labels
with Theme.text-muted (and text-secondary for the primary tier label).
A fixed grey vanished on light/HC backgrounds; tying it to the theme
keeps the badge legible everywhere. The Hi-Res brand mark is a
non-tinted Image and is left untouched (stays branded).

cc
This commit is contained in:
vicrodh committed 2026-06-20 15:49:51 -06:00
1 parent c5aec4e1ac
commit 247ee2556f
3 files changed
+16 -12

No files matched your search

@@ -44,8 +44,10 @@ export component QualityBadge inherits Rectangle {
height: 16px;
source: @image-url("../assets/cd.svg");
image-fit: contain;
// Tinted light, matching the Tauri CD badge.
tint: #b0b0b0;
// Muted-tier mark — themed so it stays legible on light/HC themes
// (a fixed mid-grey vanished on light backgrounds). Hi-Res keeps
// its brand colors (it is a non-tinted Image above).
tint: Theme.text-muted;
}
}
if root.tier == "mp3": Rectangle {
@@ -62,7 +64,7 @@ export component QualityBadge inherits Rectangle {
height: 16px;
source: @image-url("../assets/mp3.svg");
image-fit: contain;
tint: #b0b0b0;
tint: Theme.text-muted;
}
}
// Un-hydrated lossless: the bit-depth/rate isn't known yet, but the
@@ -79,7 +81,7 @@ export component QualityBadge inherits Rectangle {
x: Math.round((parent.width - self.width) / 2 / 1px) * 1px;
y: Math.round((parent.height - self.height) / 2 / 1px) * 1px;
text: root.detail;
color: #b0b0b0;
color: Theme.text-muted;
font-size: 9px;
font-weight: Typography.medium;
}
@@ -51,7 +51,8 @@ export component QualityBadgeFull inherits Rectangle {
alignment: root.bare ? center : start;
// Format icon. The Hi-Res brand mark keeps its own colors; the
// CD / MP3 marks render in muted grey.
// CD / MP3 marks render in the themed muted tier (legible on
// light/HC themes, unlike the old fixed mid-grey).
if root.show-icon: VerticalLayout {
alignment: center;
if root.tier == "hires": Image {
@@ -64,13 +65,13 @@ export component QualityBadgeFull inherits Rectangle {
source: @image-url("../assets/cd.svg");
width: (root.compact ? 13px : 16px) * root.scale-factor;
height: (root.compact ? 13px : 16px) * root.scale-factor;
tint: #b0b0b0;
tint: Theme.text-muted;
}
if root.tier == "mp3": QbzIcon {
source: @image-url("../assets/mp3.svg");
width: (root.compact ? 13px : 16px) * root.scale-factor;
height: (root.compact ? 13px : 16px) * root.scale-factor;
tint: #b0b0b0;
tint: Theme.text-muted;
}
// Un-hydrated lossless (filetype known, bit-depth/rate not yet):
// reuse the neutral disc mark; the detail line carries "FLAC".
@@ -78,7 +79,7 @@ export component QualityBadgeFull inherits Rectangle {
source: @image-url("../assets/cd.svg");
width: (root.compact ? 13px : 16px) * root.scale-factor;
height: (root.compact ? 13px : 16px) * root.scale-factor;
tint: #b0b0b0;
tint: Theme.text-muted;
}
}
@@ -87,7 +88,7 @@ export component QualityBadgeFull inherits Rectangle {
spacing: 1px;
Text {
text: root.tier-label;
color: #b0b0b0;
color: Theme.text-secondary;
font-size: (root.compact ? 7px : 8px) * root.scale-factor;
font-weight: 100;
letter-spacing: 0.5px;
@@ -95,7 +96,7 @@ export component QualityBadgeFull inherits Rectangle {
}
Text {
text: root.detail;
color: #999999;
color: Theme.text-muted;
font-size: (root.compact ? 8px : 9px) * root.scale-factor;
font-weight: 100;
horizontal-alignment: root.bare ? center : left;