feat(qbz-qt): phase 14 — app-wide ambient background (modo Cider)
Port of the spec's palette derivation (16x16 downscale, coverage- weighted 24-bin hue histogram, genuine secondary cluster or deeper same-hue, +180 accent, B/W defaults) driven by the now-playing artwork on track change. QPainter AmbientField with the WGSL scene's exact four blob orbits, dim scrim, 30fps cap paused when inactive; chrome surfaces translucent per the AppShell alpha tokens (content frame surface-main @ 0.22 frosted). Same shared app_background pref (owner has it 'ambient'), app-menu toggle applying live, QBZ_BG_* env knobs. 4 new unit tests (14/14 total). km
This commit is contained in:
19 files changed
+599
-13
No files matched your search
@@ -19,7 +19,11 @@ import com.blitzfc.qbz
|
||||
|
||||
Rectangle {
|
||||
id: root
|
||||
color: theme.surfaceCard
|
||||
// surface-card @ 0.5 while the ambient background is active (phase 14,
|
||||
// HeaderBar.slint's with-alpha(app-background-surface-alpha)).
|
||||
color: ambientOn ? theme.surfaceCardA50 : theme.surfaceCard
|
||||
readonly property bool ambientOn: QbzBridge.ambientMode > 0 && QbzBridge.npHasTrack
|
||||
|
||||
|
||||
// The host ApplicationWindow (custom chrome); null in previews.
|
||||
property var hostWindow: null
|
||||
@@ -540,6 +544,15 @@ Rectangle {
|
||||
}
|
||||
}
|
||||
|
||||
AppMenuItem {
|
||||
name: "layout-grid"
|
||||
label: QbzBridge.tr("Ambient background")
|
||||
checkedItem: QbzBridge.ambientMode > 0
|
||||
onClicked: {
|
||||
QbzBridge.toggleAmbientBackground()
|
||||
// Applies LIVE (pure QML layering); the check flips now.
|
||||
}
|
||||
}
|
||||
AppMenuItem {
|
||||
name: "layout-grid"
|
||||
label: QbzBridge.tr("Use system title bar")
|
||||
|
||||
Reference in new issue
Block a user