fix(qbz-qt): unresolvable QML imports, focus-based freezing, and dock render cost
Three views instantiated components the phase-23 directory move had left unimportable: PlaylistView and SearchView use TrackRow (now in rows/) and SectionRail uses AlbumCard (now in cards/). QML resolves lazily, so these survived cargo check, the test suite and the offscreen smoke — they only failed when the user opened a playlist. Adds a repo-wide audit of every instantiated component against the importing file's visible directories; the three above were all of them. The ambient field and the new dock band froze on lost focus. That is wrong on any tiling or mosaic desktop, where windows stay fully visible while unfocused — the field would stop while the user is looking at it. Both now gate on the window not being minimized or hidden, which is the real "nobody can see this". Freezing on not-visible stays. Dock band render cost, in descending order of impact: the drain publishes only the stream the active mode consumes (Bars mode was marshalling a 512-float waveform QList 30 times a second for nothing); each mode marshals its QList into JS once per tick instead of once per delegate; one shared Gradient replaces 28 per-delegate instances; and the per-bar Behaviors are gone since qbz-audio already smooths and clamps the amplitudes upstream. 18/18 tests; offscreen smoke clean; component-resolution audit clean. cc
This commit is contained in:
7 files changed
+95
-40
No files matched your search
@@ -15,10 +15,16 @@
|
||||
// - No audio breathe (the POC has no FFT tap; level_smooth = 0 → the
|
||||
// shader's breathe is a constant 1.0 there anyway) and no grain dither.
|
||||
// - Rendered with QPainter (renderTarget Image) so it works on the
|
||||
// software/offscreen path too; 30fps cap + paused when the window is
|
||||
// inactive (the spec's cost controls §6).
|
||||
// software/offscreen path too; 30fps cap + paused when the window is not
|
||||
// being shown (the spec's cost controls §6).
|
||||
//
|
||||
// GATING RULE (owner, 2026-07-28): freeze on NOT VISIBLE, never on lost
|
||||
// focus. A tiling/mosaic desktop keeps windows visible and unfocused all the
|
||||
// time — pausing on focus loss would stop the field while the user is
|
||||
// looking straight at it. Minimized/hidden is the real "nobody can see it".
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Window
|
||||
import com.blitzfc.qbz
|
||||
|
||||
Canvas {
|
||||
@@ -31,6 +37,13 @@ Canvas {
|
||||
// Set false by the host to freeze the clock (inactive / hidden).
|
||||
property bool running: true
|
||||
|
||||
// True unless the window is minimized or hidden — see the GATING RULE at
|
||||
// the top. Focus is deliberately NOT part of this.
|
||||
readonly property bool windowShowing: root.Window.window
|
||||
? (root.Window.window.visibility !== Window.Minimized
|
||||
&& root.Window.window.visibility !== Window.Hidden)
|
||||
: true
|
||||
|
||||
renderTarget: Canvas.Image
|
||||
renderStrategy: Canvas.Cooperative
|
||||
|
||||
@@ -40,7 +53,7 @@ Canvas {
|
||||
Timer {
|
||||
interval: 33
|
||||
repeat: true
|
||||
running: root.running && root.visible && root.Window.active
|
||||
running: root.running && root.visible && root.windowShowing
|
||||
onTriggered: {
|
||||
root.t += interval / 1000.0 * 0.75
|
||||
root.requestPaint()
|
||||
|
||||
Reference in new issue
Block a user