fix(qt): wrap the split-card title at full size; themed badge on the song card
The cinematic split card's shared shrink-to-fit typeScale is retired: a long title now word-wraps at its nominal size instead of scaling the whole metadata block down, and the album/artist lines elide instead of dictating a reduction. The bottom-right song card's badge also drops the overAmbient chip — that card only mounts over dark surfaces and the dark backdrop read as a bigger badge; the themed look was already right. cc
This commit is contained in:
2 files changed
+23
-59
No files matched your search
@@ -131,7 +131,10 @@ Item {
|
|||||||
id: badge
|
id: badge
|
||||||
x: root.metaW - width
|
x: root.metaW - width
|
||||||
y: titleRow.height + 3 + subRow.height + 3
|
y: titleRow.height + 3 + subRow.height + 3
|
||||||
overAmbient: true
|
// NO overAmbient here (owner, 2026-08-31 round 3): this card only
|
||||||
|
// mounts over dark surfaces (Wave Bed, lyrics, scopes, shader
|
||||||
|
// scenes) and the dark chip read as a bigger badge. The themed look
|
||||||
|
// was already right.
|
||||||
tier: QbzPlayer.npQualityTier
|
tier: QbzPlayer.npQualityTier
|
||||||
detail: QbzPlayer.npQualityDetail
|
detail: QbzPlayer.npQualityDetail
|
||||||
showIcon: true
|
showIcon: true
|
||||||
|
|||||||
@@ -331,52 +331,22 @@ Item {
|
|||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
visible: !root.lyricsMode
|
visible: !root.lyricsMode
|
||||||
|
|
||||||
|
// Fixed nominal faces, clamped by the CARD's height only. The
|
||||||
|
// shared shrink-to-fit typeScale is retired (owner, 2026-08-31
|
||||||
|
// round 3): a long title now WRAPS at full size instead of
|
||||||
|
// scaling the whole block down, and the subordinate lines
|
||||||
|
// elide rather than dictate anyone's size.
|
||||||
readonly property real nominalTitleSize: Math.max(24,
|
readonly property real nominalTitleSize: Math.max(24,
|
||||||
Math.min(48, card.height * 0.105))
|
Math.min(48, card.height * 0.105))
|
||||||
readonly property real nominalMetaSize: Math.max(13,
|
readonly property real nominalMetaSize: Math.max(13,
|
||||||
Math.min(21, card.height * 0.052))
|
Math.min(21, card.height * 0.052))
|
||||||
|
|
||||||
TextMetrics {
|
|
||||||
id: titleMetrics
|
|
||||||
text: QbzPlayer.npTitle
|
|
||||||
font.pixelSize: nowPlayingPane.nominalTitleSize
|
|
||||||
font.weight: Font.Bold
|
|
||||||
}
|
|
||||||
TextMetrics {
|
|
||||||
id: albumMetrics
|
|
||||||
text: QbzPlayer.npAlbum
|
|
||||||
font.pixelSize: nowPlayingPane.nominalMetaSize
|
|
||||||
font.italic: true
|
|
||||||
}
|
|
||||||
TextMetrics {
|
|
||||||
id: artistMetrics
|
|
||||||
text: QbzPlayer.npArtist
|
|
||||||
font.pixelSize: nowPlayingPane.nominalMetaSize
|
|
||||||
}
|
|
||||||
// One shared scale is derived from whichever metadata line is
|
|
||||||
// widest. The title remains the largest face, never elides,
|
|
||||||
// and every subordinate label follows its reduction.
|
|
||||||
readonly property real typeScale: {
|
|
||||||
var scale = 1.0
|
|
||||||
if (titleMetrics.advanceWidth > 0)
|
|
||||||
scale = Math.min(scale,
|
|
||||||
nowPlayingPane.width / titleMetrics.advanceWidth)
|
|
||||||
if (albumMetrics.advanceWidth > 0)
|
|
||||||
scale = Math.min(scale,
|
|
||||||
nowPlayingPane.width / albumMetrics.advanceWidth)
|
|
||||||
if (artistMetrics.advanceWidth > 0)
|
|
||||||
scale = Math.min(scale,
|
|
||||||
nowPlayingPane.width / artistMetrics.advanceWidth)
|
|
||||||
return Math.max(0.05, Math.min(1.0, scale))
|
|
||||||
}
|
|
||||||
|
|
||||||
Column {
|
Column {
|
||||||
id: metadataStack
|
id: metadataStack
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
spacing: Math.max(3,
|
spacing: 7
|
||||||
Math.round(7 * nowPlayingPane.typeScale))
|
|
||||||
|
|
||||||
// "Now Playing" indicator at 1.5x, tinted with the
|
// "Now Playing" indicator at 1.5x, tinted with the
|
||||||
// album-palette accent instead of the theme accent so it
|
// album-palette accent instead of the theme accent so it
|
||||||
@@ -384,16 +354,14 @@ Item {
|
|||||||
Item {
|
Item {
|
||||||
visible: QbzPlayer.npPlaying
|
visible: QbzPlayer.npPlaying
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: visible ? Math.max(18,
|
height: visible ? 21 : 0
|
||||||
Math.round(21 * nowPlayingPane.typeScale)) : 0
|
|
||||||
Row {
|
Row {
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
spacing: Math.max(6,
|
spacing: 12
|
||||||
Math.round(12 * nowPlayingPane.typeScale))
|
|
||||||
EqualizerBars {
|
EqualizerBars {
|
||||||
tint: root.waveColor
|
tint: root.waveColor
|
||||||
barScale: 1.5 * nowPlayingPane.typeScale
|
barScale: 1.5
|
||||||
active: root.visible && QbzImmersive.open
|
active: root.visible && QbzImmersive.open
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
}
|
}
|
||||||
@@ -401,8 +369,7 @@ Item {
|
|||||||
text: QbzSession.tr("Now Playing",
|
text: QbzSession.tr("Now Playing",
|
||||||
QbzSession.trRev)
|
QbzSession.trRev)
|
||||||
color: root.waveColor
|
color: root.waveColor
|
||||||
font.pixelSize: Math.max(1,
|
font.pixelSize: 18
|
||||||
18 * nowPlayingPane.typeScale)
|
|
||||||
font.weight: Font.DemiBold
|
font.weight: Font.DemiBold
|
||||||
font.letterSpacing: 0.5
|
font.letterSpacing: 0.5
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
@@ -410,17 +377,15 @@ Item {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Three metadata lines: title / album / artist.
|
// Three metadata lines: title / album / artist. The title
|
||||||
|
// wraps at its full size instead of shrinking to fit.
|
||||||
Text {
|
Text {
|
||||||
width: parent.width
|
width: parent.width
|
||||||
text: QbzPlayer.npTitle
|
text: QbzPlayer.npTitle
|
||||||
color: "#f5ffffff"
|
color: "#f5ffffff"
|
||||||
font.pixelSize: Math.max(1,
|
font.pixelSize: nowPlayingPane.nominalTitleSize
|
||||||
nowPlayingPane.nominalTitleSize
|
|
||||||
* nowPlayingPane.typeScale)
|
|
||||||
font.weight: Font.Bold
|
font.weight: Font.Bold
|
||||||
wrapMode: Text.NoWrap
|
wrapMode: Text.WordWrap
|
||||||
elide: Text.ElideNone
|
|
||||||
}
|
}
|
||||||
Text {
|
Text {
|
||||||
visible: QbzPlayer.npAlbum !== ""
|
visible: QbzPlayer.npAlbum !== ""
|
||||||
@@ -428,22 +393,18 @@ Item {
|
|||||||
text: QbzPlayer.npAlbum
|
text: QbzPlayer.npAlbum
|
||||||
color: "#8cffffff"
|
color: "#8cffffff"
|
||||||
font.italic: true
|
font.italic: true
|
||||||
font.pixelSize: Math.max(1,
|
font.pixelSize: nowPlayingPane.nominalMetaSize
|
||||||
nowPlayingPane.nominalMetaSize
|
|
||||||
* nowPlayingPane.typeScale)
|
|
||||||
wrapMode: Text.NoWrap
|
wrapMode: Text.NoWrap
|
||||||
elide: Text.ElideNone
|
elide: Text.ElideRight
|
||||||
}
|
}
|
||||||
Text {
|
Text {
|
||||||
visible: QbzPlayer.npArtist !== ""
|
visible: QbzPlayer.npArtist !== ""
|
||||||
width: parent.width
|
width: parent.width
|
||||||
text: QbzPlayer.npArtist
|
text: QbzPlayer.npArtist
|
||||||
color: "#b3ffffff"
|
color: "#b3ffffff"
|
||||||
font.pixelSize: Math.max(1,
|
font.pixelSize: nowPlayingPane.nominalMetaSize
|
||||||
nowPlayingPane.nominalMetaSize
|
|
||||||
* nowPlayingPane.typeScale)
|
|
||||||
wrapMode: Text.NoWrap
|
wrapMode: Text.NoWrap
|
||||||
elide: Text.ElideNone
|
elide: Text.ElideRight
|
||||||
}
|
}
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
@@ -455,7 +416,7 @@ Item {
|
|||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
compact: true
|
compact: true
|
||||||
overAmbient: true
|
overAmbient: true
|
||||||
scaleFactor: 1.5 * nowPlayingPane.typeScale
|
scaleFactor: 1.5
|
||||||
tier: QbzPlayer.npQualityTier
|
tier: QbzPlayer.npQualityTier
|
||||||
detail: QbzPlayer.npQualityDetail
|
detail: QbzPlayer.npQualityDetail
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user