Minor polish

This commit is contained in:
nutty
2026-07-03 00:49:22 +10:00
parent 15e5f91f01
commit 3ac06ed9c3
8 changed files with 33 additions and 31 deletions
+8 -8
View File
@@ -56,8 +56,10 @@ switch (themeVariant) {
async function ChangeTrack(mediaProps, accentColorPalette) {
// Fade in the overlay (shows the new text)
trackLabel.style.opacity = "0";
artistLabel.style.opacity = "0";
if (trackLabel.innerText != (swapArtistTrack ? mediaProps.Artist : mediaProps.Title))
trackLabel.style.opacity = "0";
if (artistLabel.innerText != (swapArtistTrack ? mediaProps.Title : mediaProps.Artist))
artistLabel.style.opacity = "0";
backgroundLayer.style.opacity = "0";
albumArtLayer.style.opacity = "0";
@@ -90,9 +92,8 @@ async function ChangeTrack(mediaProps, accentColorPalette) {
backgroundLayer.style.backgroundImage = `url('${newArtUrl}')`;
albumArtLayer.style.backgroundImage = `url('${newArtUrl}')`;
// Apply a tint: Use 30% opacity of the accent color + a dark overlay for contrast
// 'rgba(0,0,0,0.6)' ensures the text stays readable
// backgroundLayer.style.backgroundColor = accentColorPalette.LightVibrant + "80"; // 80 is 50% opacity in hex
// Apply a tint
backgroundLayer.style.backgroundColor = accentColorPalette.DarkMuted + "80"; // 80 is 50% opacity in hex
trackLabel.style.opacity = "";
artistLabel.style.opacity = "";
@@ -104,9 +105,8 @@ async function ChangeTrack(mediaProps, accentColorPalette) {
backgroundTransitionLayer.style.backgroundImage = `url('${newArtUrl}')`;
albumArtTransition.style.backgroundImage = `url('${newArtUrl}')`;
// Apply a tint: Use 30% opacity of the accent color + a dark overlay for contrast
// 'rgba(0,0,0,0.6)' ensures the text stays readable
// backgroundTransitionLayer.style.backgroundColor = accentColorPalette.LightVibrant + "80"; // 80 is 50% opacity in hex
// Apply a tint
backgroundTransitionLayer.style.backgroundColor = accentColorPalette.DarkMuted + "80"; // 80 is 50% opacity in hex
SetVisibility(true); // Show the overlay for a few seconds if autoHide is enabled
}, 250);