fix(qbz-qt): live output LEDs, closer stamp, and a volume lock on ALSA direct

The LEDs only changed when the user navigated. They were published from the
settings snapshot, so they refreshed when that document republished rather
than when playback started — which is exactly when the backend and mode are
decided, a moment after "now playing" in the log. They publish on the stream
edge now, without polling and without republishing settings.

The stamp itself was close but not 1:1, so it went back against
shell/AudioStamp.slint, primitives/QualityBadgeFull.slint and shell/SongCard.slint
line by line; the divergences in sizes, weights, spacing and the inactive LED
colour are corrected.

Volume is locked while the bit-perfect ALSA direct path is engaged. Software
volume there is meaningless and applying it would not be bit-perfect, so the
control now reads as inert rather than silently doing nothing. Slint has the
same gap and no lock to copy, so this is new: the condition comes from the
output state already published, and no audio behaviour changed — only the UI
reflects it.

cc
This commit is contained in:
vicrodh committed 2026-07-28 16:22:48 -06:00
1 parent 4690c842b0
commit c8a5b03aee
8 files changed
+239 -54

No files matched your search

+36 -11
View File
@@ -156,6 +156,14 @@ Item {
hoverEnabled: true
}
// The bubble is 1:1 with the global shell/TooltipOverlay.slint the
// Slint stamp feeds: 11px/medium TEXT-PRIMARY (not secondary) on
// surface-elevated, radius 4 (not radiusSm=8), NO border, 5px/9px
// padding (not 6px), default line height (Slint sets none), and a
// downward caret. Centred on the control (TooltipOverlay clamps to
// the window and keeps the caret on the anchor); the BUBBLE bottom
// sits 9px above the anchor top (TooltipOverlay.slint:26) with the
// caret poking 5px below it, hence y = -height - 4.
ToolTip {
id: qualityTip
visible: qualityHover.containsMouse && root.qualityTooltip !== ""
@@ -163,24 +171,41 @@ Item {
delay: 0
timeout: -1
padding: 0
x: qualityRow.width - width
y: -height - 6
x: Math.round((qualityRow.width - width) / 2)
y: -height - 4
contentItem: Text {
text: qualityTip.text
color: theme.textSecondary
color: theme.textPrimary
font.pixelSize: 11
font.weight: theme.weightMedium
lineHeight: 1.25
leftPadding: 9
rightPadding: 9
topPadding: 6
bottomPadding: 6
topPadding: 5
// 5px bubble padding + the 5px caret zone below it.
bottomPadding: 10
}
background: Rectangle {
color: theme.surfaceElevated
radius: theme.radiusSm
border.width: 1
border.color: theme.borderSubtle
background: Item {
Rectangle {
anchors.fill: parent
anchors.bottomMargin: 5
color: theme.surfaceElevated
radius: 4
}
// Caret (TooltipOverlay.slint:56 draws a 10x6 Path). A
// 7.07px square rotated 45 deg is a 10px-wide diamond;
// centred on the bubble's bottom edge its lower half IS
// the caret. QtQuick.Shapes is not imported anywhere in
// this port, and shader effects are dead on the software
// path, so a rotated Rectangle is the way to draw it.
Rectangle {
width: 7.07
height: 7.07
rotation: 45
antialiasing: true
color: theme.surfaceElevated
x: Math.round((parent.width - width) / 2)
y: parent.height - 5 - height / 2
}
}
}
}