Immersive surfaces sit directly on the ambient field, where theme tokens have no contrast guarantee — a light cover washed the split Track Info panel and the quality badges out completely. QualityBadgeFull, TrackInfoBody, InfoMetaCell and InfoCreditCell gain an opt-in overAmbient mode: fixed light text with the restrained native shadow the lyrics surfaces already use, and the badge swaps the theme surface for its own translucent dark scrim covering only the chip. Defaults stay off, so the desktop modal and every themed mount are untouched. The immersive Track Info panel and song card opt in. cc
43 lines
1.3 KiB
QML
43 lines
1.3 KiB
QML
// InfoMetaCell — one metadata cell of the Track Info modal: an 11px semibold
|
|
// muted label (letter-spacing 0.5) over a value supplied as a child. 1:1 with
|
|
// `MetaCell` in crates/qbz-ui/ui/album/TrackInfoModal.slint, which exports it
|
|
// for the immersive split panel to reuse the same way.
|
|
//
|
|
// The value goes in as a plain child — QML appends use-site children to the
|
|
// Column's default `data`, so they land under the label:
|
|
//
|
|
// InfoMetaCell {
|
|
// cellWidth: 180
|
|
// label: QbzSession.tr("Duration", QbzSession.trRev)
|
|
// Text { text: "3:45" }
|
|
// }
|
|
|
|
import QtQuick
|
|
import "../theme"
|
|
|
|
Column {
|
|
id: mc
|
|
property string label: ""
|
|
property int cellWidth: 0
|
|
/// Immersive-panel legibility mode (see TrackInfoBody.qml): fixed light
|
|
/// label + native shadow instead of the theme token.
|
|
property bool overAmbient: false
|
|
|
|
QbzTheme { id: theme }
|
|
|
|
width: cellWidth
|
|
spacing: 6
|
|
|
|
Text {
|
|
width: mc.cellWidth
|
|
text: mc.label
|
|
color: mc.overAmbient ? "#b3ffffff" : theme.textMuted
|
|
style: mc.overAmbient ? Text.Raised : Text.Normal
|
|
styleColor: "#b0000000"
|
|
font.pixelSize: 11
|
|
font.weight: theme.weightSemibold
|
|
font.letterSpacing: 0.5
|
|
elide: Text.ElideRight
|
|
}
|
|
}
|