Files
qbz/crates/qbz-qt/qml/shell/OrbitBanner.qml
T
vicrodh fed0816e9b fix(qt): ambient mode reaches every chrome control
Under the ambient field some controls still painted the opaque theme
token while their neighbours used the half-alpha one: the album track
filter and its select toggle, the Library tab strip's host, the Local
Library icon selects, the header's active nav items and open playlists
button, the queue sidebar's now-playing card and artwork placeholders,
the Listen list's floating actions, and the shared SettingsButton,
IconTextButton, multi-select bar, text area, load-more pill, tree row
selection, sidebar count chips, Purchases tab strip, play-history filter
box and Orbit banner. Each now takes the ambient-aware fill the header
search and QbzTabBar already use (theme.ambientOn ? …A50 : …).

Tooltips, popups and modals stay opaque on purpose: they are read over
content, not chrome.

cc
2026-09-14 00:39:47 -06:00

37 lines
1.4 KiB
QML

// Persistent context identity. No dismiss button or mutable visibility state.
// A lost connection keeps the selected host visible; only ending remote
// control may remove the banner. Host verification does not activate it.
import QtQuick
import com.blitzfc.qbz
import "../theme"
Rectangle {
id: root
property bool remoteActive: false
property bool connectionLost: false
property string hostName: ""
visible: remoteActive
height: remoteActive ? Math.max(38, label.implicitHeight + 16) : 0
color: (theme.ambientOn ? theme.surfaceElevatedA50 : theme.surfaceElevated)
border.width: 1
border.color: theme.accent
Accessible.role: Accessible.StaticText
Accessible.name: label.text
QbzTheme { id: theme }
Text {
id: label
objectName: "orbitContextLabel"
anchors.left: parent.left
anchors.right: parent.right
anchors.margins: 16
anchors.verticalCenter: parent.verticalCenter
text: "Orbit · " + QbzSession.tr("Controlling {}", QbzSession.trRev).replace("{}", root.hostName)
+ (root.connectionLost ? " · " + QbzSession.tr("Connection lost. Remote controls are unavailable.", QbzSession.trRev) : "")
textFormat: Text.PlainText
wrapMode: Text.WordWrap
color: theme.textPrimary
font.pixelSize: theme.fontBody
font.weight: theme.weightSemibold
}
}