fix(qbz-qt): phase 12 — card rounding, menu anchoring, opaque window, titlebar toggle

Rounding: QML clip is rectangular (radius+clip does NOT round-clip) —
new shared RoundedImage (software Canvas raster clip, GL-independent)
applied at 16 artwork sites incl. true circular artist crops. Menus:
new QbzContextMenu (cursor-anchored / below-trigger, window-clamped)
converted at 7 sites, replicating TrackRow.slint positioning. Window:
main window is OPAQUE in Slint (transparency is miniplayer-only;
rounded corners are KWin's) — dropped the translucent frameless
misread, squared app corners, opaque root. Titlebar: wired the EXISTING
shared ui_prefs use_system_title_bar key (app-menu checkable item,
restart semantics like Slint).

km
This commit is contained in:
vicrodh committed 2026-07-27 21:43:53 -06:00
1 parent da36d86ccc
commit 71d41b927c
24 files changed
+403 -187

No files matched your search

+10 -14
View File
@@ -26,6 +26,10 @@ import com.blitzfc.qbz
Rectangle {
id: root
color: theme.surfaceMain
// Round to the AppShell content-frame bezel (Radius.md): QML clips
// are rectangular, so the frame's own rounding never reaches the
// view — the view's own fill must round instead.
radius: 12
QbzTheme { id: theme }
@@ -406,23 +410,16 @@ Rectangle {
color: theme.surfaceElevated
clip: true
Image {
RoundedImage {
anchors.fill: parent
source: root.artMap[item.artKey] || ""
fillMode: Image.PreserveAspectCrop
asynchronous: true
}
// Artist cards are circular in Slint (ArtistGridCard).
Rectangle {
visible: item.kind === "artist"
anchors.fill: parent
radius: 100
color: "transparent"
border.width: 0
// Artist cards are circular in Slint (ArtistGridCard).
radius: item.kind === "artist" ? 100 : theme.radiusSm
}
// Hover scrim + play overlay (albums + tracks).
Rectangle {
anchors.fill: parent
radius: item.kind === "artist" ? 100 : theme.radiusSm
color: "#000000"
opacity: overlayOn && (item.kind === "album" || item.kind === "track") ? 0.5 : 0.0
Behavior on opacity { NumberAnimation { duration: 150 } }
@@ -550,11 +547,10 @@ Rectangle {
anchors.verticalCenter: parent.verticalCenter
color: theme.surfaceElevated
clip: true
Image {
RoundedImage {
anchors.fill: parent
source: root.artMap[item.artKey] || ""
fillMode: Image.PreserveAspectCrop
asynchronous: true
radius: 4
}
}
Column {