From 0e9721d24b239dc0323de5ff77d179f3a844c809 Mon Sep 17 00:00:00 2001 From: vicrodh <103399283+vicrodh@users.noreply.github.com> Date: Thu, 20 Aug 2026 22:24:11 -0600 Subject: [PATCH] refactor(qt): reorder the Local Library header and label the Open menu MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- crates/qbz-qt/qml/views/local/LocalChrome.qml | 60 ++++++++++++++++--- 1 file changed, 53 insertions(+), 7 deletions(-) diff --git a/crates/qbz-qt/qml/views/local/LocalChrome.qml b/crates/qbz-qt/qml/views/local/LocalChrome.qml index 1710d688a..7b0125445 100644 --- a/crates/qbz-qt/qml/views/local/LocalChrome.qml +++ b/crates/qbz-qt/qml/views/local/LocalChrome.qml @@ -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) + } + } } }