feat(qt): derive immersive accents from the album palette
New theme/AmbientAccent helper: reads ambientPrimary (the album's own dominant hue) and lifts its lightness into a legible band. The shell's ambientAccent is the +180-degree complement, which is how a deep-blue cover ended up with orange chrome; accents now stay in the album palette. ImmersiveTrackMeta tints its Now Playing indicator with it instead of the theme accent (no contrast guarantee over ambient), opts its badge into overAmbient and shadows its text rows for light covers. cc
This commit is contained in:
3 files changed
+59
-4
No files matched your search
@@ -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",
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
Reference in new issue
Block a user