refactor(qt): reorder the Local Library header and label the Open menu

Owner's layout: the two maintenance glyphs sit together and the action that
produces new content reads last —

    Local Library  (settings) (resync)  [folder] Open v

Open also stops being a bare glyph. A folder icon on its own reads as "browse
folders" when there is a tab literally called Folders two rows below, and this
control is the one door for every medium the pane can hold: a folder now, a CD
and a SACD image next. It is a 30px / radius-6 chip with icon, label and
chevron — the same small toolbar-control contract this header's selects use.

cc
This commit is contained in:
vicrodh committed 2026-08-20 22:24:11 -06:00
1 parent 9666ef129e
commit 0e9721d24b
1 file changed
+53 -7
+53 -7
View File
@@ -56,14 +56,10 @@ Item {
anchors.verticalCenter: parent.verticalCenter
onClicked: QbzShell.navigateTo("settings")
}
// ---- Open ▾ ----------------------------------------------
QbzNavButton {
id: openBtn
name: "folder-open"
anchors.verticalCenter: parent.verticalCenter
onClicked: openMenu.openBelowLeft(openBtn)
}
// ---- Refresh ▾ -------------------------------------------
// Before Open, per the owner's layout: the two maintenance glyphs
// (settings, resync) sit together, and the ACTION that produces
// new content reads last and carries a label.
Item {
width: 28
height: 28
@@ -86,6 +82,56 @@ Item {
size: 15
}
}
// ---- [icon] Open ▾ ---------------------------------------
// A LABELLED chip, not a bare glyph: this is the one door for
// every medium, and a folder icon alone reads as "browse folders"
// next to a tab literally called Folders. 30px / radius 6 is the
// small toolbar-control contract this header's own selects use.
Rectangle {
id: openBtn
anchors.verticalCenter: parent.verticalCenter
width: openRow.width + 20
height: 30
radius: 6
color: openArea.containsMouse || openMenu.opened
? theme.surfaceHover
: (theme.ambientOn ? theme.surfaceElevatedA50 : theme.surfaceElevated)
Row {
id: openRow
anchors.centerIn: parent
spacing: 6
QbzIcon {
name: "folder-open"
width: 15
height: 15
anchors.verticalCenter: parent.verticalCenter
tintName: openArea.containsMouse ? "textPrimary" : "secondary"
}
Text {
anchors.verticalCenter: parent.verticalCenter
text: QbzSession.tr("Open", QbzSession.trRev)
color: openArea.containsMouse ? theme.textPrimary : theme.textSecondary
font.pixelSize: 13
}
QbzIcon {
name: "chevron-down"
width: 13
height: 13
anchors.verticalCenter: parent.verticalCenter
tintName: openArea.containsMouse ? "textPrimary" : "secondary"
}
}
MouseArea {
id: openArea
anchors.fill: parent
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onClicked: openMenu.openBelowLeft(openBtn)
}
}
}
}