fix(qbz-qt): local context menus, collapsing search fields, toolbar density
Four things the owner hit in Local Library. The context menu did nothing there — local rows and cards now mount the shared menu the rest of the app uses, with the action set Slint gives local and Plex items. Anything with no seam in this port (add-to-playlist, add-to-mixtape, the tag editor, local favourites) is hidden or visibly disabled rather than a row that silently does nothing. The per-view search fields did not open and collapse the way the header's does. That behaviour moved into the shared QbzLineEdit, so the Local toolbar, the queue and the tree rail all get it from one place instead of four copies. The queue's field also escaped its 300px column; it is width-bound now. Filter, sorting and grouping become icon-only buttons with an explanatory tooltip, which is what the owner asked for and what the crowding called for. Found on the way, and affecting Qobuz cards too: the album card's ⋯ menu had no "Play later" at all, and its "Add to queue" row dispatched play-later — the row lied about what it did. Both fixed, with Slint's icon set for the three. cc
This commit is contained in:
15 files changed
+784
-219
No files matched your search
@@ -631,6 +631,7 @@ Rectangle {
|
||||
font.pixelSize: 11
|
||||
}
|
||||
Row {
|
||||
id: footerRow
|
||||
width: parent.width
|
||||
leftPadding: theme.spacingMd
|
||||
rightPadding: theme.spacingMd
|
||||
@@ -638,8 +639,14 @@ Rectangle {
|
||||
bottomPadding: 10
|
||||
spacing: theme.spacingXs
|
||||
|
||||
// The row's usable width — `parent.width` here is the PANEL
|
||||
// width, padding included; using it raw is what pushed the
|
||||
// search field out of the 300px column.
|
||||
readonly property int contentWidth:
|
||||
width - leftPadding - rightPadding
|
||||
|
||||
// Action 1 — Clear queue (wired).
|
||||
QbzIconButton { btnSize: 30
|
||||
QbzIconButton { btnSize: 30
|
||||
name: "trash-list"
|
||||
onClicked: QbzQueue.queueClear()
|
||||
}
|
||||
@@ -651,42 +658,24 @@ Rectangle {
|
||||
// Action 4 — sleep timer (INERT engine — POC-NOTE).
|
||||
QbzIconButton { btnSize: 30; name: "clock" }
|
||||
|
||||
// Inline queue search field (wired).
|
||||
Rectangle {
|
||||
width: parent.width - 4 * 30 - 4 * theme.spacingXs
|
||||
height: 30
|
||||
radius: theme.radiusSm
|
||||
color: theme.surfaceElevated
|
||||
Row {
|
||||
anchors.fill: parent
|
||||
anchors.leftMargin: 9
|
||||
anchors.rightMargin: 7
|
||||
spacing: 6
|
||||
QbzIcon {
|
||||
name: "search"
|
||||
width: 13
|
||||
height: 13
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
tintName: "muted"
|
||||
}
|
||||
TextInput {
|
||||
width: parent.width - 20
|
||||
height: parent.height
|
||||
color: theme.textPrimary
|
||||
font.pixelSize: 12
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
clip: true
|
||||
onTextEdited: QbzQueue.queueSetSearch(text)
|
||||
Text {
|
||||
visible: parent.text === ""
|
||||
anchors.fill: parent
|
||||
text: QbzSession.tr("Search queue", QbzSession.trRev)
|
||||
color: theme.textMuted
|
||||
font.pixelSize: 12
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
}
|
||||
}
|
||||
}
|
||||
// Filler so the collapsed magnifier sits at the right edge;
|
||||
// the field opens LEFT across it (5 gaps of spacingXs).
|
||||
Item {
|
||||
width: Math.max(0, footerRow.contentWidth - 4 * 30 - 30
|
||||
- 5 * theme.spacingXs)
|
||||
height: 1
|
||||
}
|
||||
// Inline queue search (wired) — the shared expandable control.
|
||||
QbzLineEdit {
|
||||
searchMode: true
|
||||
expandable: true
|
||||
sm: true
|
||||
// Bound to the PANEL, never wider: it opens leftward over
|
||||
// the four action buttons, exactly like the Slint
|
||||
// ExpandableSearch does over its neighbours.
|
||||
openWidth: Math.max(90, footerRow.contentWidth)
|
||||
placeholder: QbzSession.tr("Search queue", QbzSession.trRev)
|
||||
onEdited: function (v) { QbzQueue.queueSetSearch(v) }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user