fix(qt): put the local albums scrollbar and A-Z strip on the real edge

LocalAlbumsTab pads its content 32px on the right, and both the scrollbar and
the jump strip lived inside that padding — so the bar sat 32px from the
window edge (52 with the strip up) while LibraryView.qml:1281 puts the same
control at 4, or 34 to clear its strip. Side by side the local grid's bar
reads as floating away from the edge.

The collection now takes two measurements, both from the WINDOW's right edge:
`scrollBarInset` (where the bar should land) and `hostRightInset` (how far
the component's own edge already is from it). The bar's margin is their
difference, which goes negative and overhangs — safe, because the component
root is a plain Item; the `clip: true` in that file is on the ListView, a
sibling. Both default to 0, so LocalArtistsTab and LocalFoldersTab, which
have not opted in, are untouched.

The A-Z strip moves out to 12 from the window edge, matching
LibraryView.qml:1269.

cc
This commit is contained in:
vicrodh committed 2026-08-18 18:41:28 -06:00
1 parent c0fe8a80d3
commit ed081cac6b
2 files changed
+21

No files matched your search

@@ -113,6 +113,9 @@ Item {
id: collection
anchors.fill: parent
anchors.rightMargin: root.view.albumsGroup === "alpha" ? 20 : 0
// 32 of tab padding, plus the 20 above when the strip is up.
hostRightInset: 32 + (root.view.albumsGroup === "alpha" ? 20 : 0)
scrollBarInset: root.view.albumsGroup === "alpha" ? 34 : 4
view: root.view
surface: "albums"
rows: root.view.albumsVisible
@@ -131,6 +134,9 @@ Item {
visible: root.view.albumsGroup === "alpha"
&& collection.alphaJumps.length > 0
anchors.right: parent.right
// Out past the tab's 32 padding to 12 from the window edge,
// which is where LibraryView.qml:1269 puts the same strip.
anchors.rightMargin: -20
anchors.top: parent.top
anchors.bottom: parent.bottom
jumps: collection.alphaJumps