diff --git a/crates/qbz-qt/build.rs b/crates/qbz-qt/build.rs index f18ebce6a..1938f7c4c 100644 --- a/crates/qbz-qt/build.rs +++ b/crates/qbz-qt/build.rs @@ -727,6 +727,7 @@ fn main() { "qml/immersive/TrackInfoPanel.qml", "qml/immersive/VolumeBar.qml", "qml/immersive/WaveBedPanel.qml", + "qml/theme/AmbientAccent.qml", "qml/theme/QbzIcon.qml", "qml/theme/QbzKineticScroll.qml", "qml/theme/QbzScrollBar.qml", diff --git a/crates/qbz-qt/qml/immersive/ImmersiveTrackMeta.qml b/crates/qbz-qt/qml/immersive/ImmersiveTrackMeta.qml index 929a1b57d..88b97513f 100644 --- a/crates/qbz-qt/qml/immersive/ImmersiveTrackMeta.qml +++ b/crates/qbz-qt/qml/immersive/ImmersiveTrackMeta.qml @@ -27,8 +27,18 @@ Column { QbzTheme { id: theme } - /// Equalizer tint + "Now Playing" label follow the active theme. - property color equalizerTint: theme.accent + /// Equalizer tint + "Now Playing" label follow the album palette, not + /// the theme accent: the theme color has no contrast guarantee over the + /// ambient backdrop (2026-08-31 visual cleanup — homologated with the + /// cinematic split card's waveform/seek accent). + AmbientAccent { id: ambientAccent } + property color equalizerTint: ambientAccent.value + + /// The block sits directly on the ambient/blurred-cover field, which can + /// be near-white for light covers — every text row carries the same + /// restrained native shadow the lyrics surfaces use, so the fixed light + /// colors stay legible over ANY artwork. + readonly property color _shadow: "#b0000000" spacing: 6 @@ -57,6 +67,8 @@ Column { font.pixelSize: 12 font.weight: Font.DemiBold font.letterSpacing: 0.5 + style: Text.Raised + styleColor: root._shadow anchors.verticalCenter: parent.verticalCenter } } @@ -69,6 +81,8 @@ Column { color: "#ffffff" font.pixelSize: 28 font.weight: Font.Bold + style: Text.Raised + styleColor: root._shadow horizontalAlignment: Text.AlignHCenter elide: Text.ElideRight } @@ -77,8 +91,10 @@ Column { Text { width: parent.width text: QbzPlayer.npArtist - color: "#b3ffffff" + color: "#d9ffffff" font.pixelSize: 18 + style: Text.Raised + styleColor: root._shadow horizontalAlignment: Text.AlignHCenter elide: Text.ElideRight } @@ -88,9 +104,11 @@ Column { visible: QbzPlayer.npAlbum !== "" width: parent.width text: QbzPlayer.npAlbum - color: "#80ffffff" + color: "#bfffffff" font.pixelSize: 14 font.italic: true + style: Text.Raised + styleColor: root._shadow horizontalAlignment: Text.AlignHCenter elide: Text.ElideRight } @@ -106,6 +124,7 @@ Column { id: badge anchors.horizontalCenter: parent.horizontalCenter anchors.bottom: parent.bottom + overAmbient: true tier: QbzPlayer.npQualityTier detail: QbzPlayer.npQualityDetail } diff --git a/crates/qbz-qt/qml/theme/AmbientAccent.qml b/crates/qbz-qt/qml/theme/AmbientAccent.qml new file mode 100644 index 000000000..73483fa0d --- /dev/null +++ b/crates/qbz-qt/qml/theme/AmbientAccent.qml @@ -0,0 +1,35 @@ +// AmbientAccent — the album-palette accent LIFTED for legibility over the +// ambient/immersive backdrop (2026-08-31 immersive visual cleanup). +// +// Why this exists: `QbzShell.ambientAccent` is the +180° COMPLEMENT of the +// album's dominant hue (ambient_qt.rs lyrics_accent_color), and the +// ReactiveSplitPanel used to derive yet another complement locally — which is +// how a deep-blue cover ended up with an ORANGE waveform and seek bar. The +// owner's rule: chrome accents must come from the album's OWN palette, with +// enough contrast to survive the ambient wash. +// +// So this reads `ambientPrimary` (the dominant album hue itself, S 0.85 +// L 0.58 for chromatic covers) and lifts its lightness into a band that reads +// over both the dark immersive glass and a colorful ambient field, keeping +// the hue. Achromatic covers (hslHue == -1) degrade to a plain light grey +// instead of inventing a hue. +// +// Usage (instantiate like QbzTheme, read `.value`): +// AmbientAccent { id: ambientAccent } +// color: ambientAccent.value + +import QtQuick +import com.blitzfc.qbz + +QtObject { + id: root + + readonly property color source: QbzShell.ambientPrimary + + readonly property color value: root.source.hslSaturation < 0.05 + ? Qt.rgba(1.0, 1.0, 1.0, 0.92) + : Qt.hsla(Math.max(0.0, root.source.hslHue), + Math.min(0.85, Math.max(0.45, root.source.hslSaturation)), + Math.min(0.80, Math.max(0.66, root.source.hslLightness)), + 1.0) +}