v0.31.3: header row moves up beside the seek bar; knolled top row

The Library button, the view's header (search box or playlist name) and
the seek row now share one band under the transport boxes, instead of the
seek row hanging alone with a header strip below it. The now-playing panel
caps at 560px and the gaps between controls share the rest evenly; more
room under the menu bar. Long playlist names shrink up to 2pt, then elide.
This commit is contained in:
2026-09-28 22:43:21 -07:00
parent f280fc5330
commit a9c815ba1a
12 changed files with 423 additions and 276 deletions
+17
View File
@@ -135,6 +135,18 @@ class MainWindow(QMainWindow):
self._content.addWidget(self._playlist_view)
self._content.setCurrentWidget(self._library_view)
# The header row under the transport boxes: the Library button over
# the sidebar, then whichever view is showing's own header (search
# box, playlist name), then the seek row.
self._transport.set_sidebar_header(self._sidebar.header)
self._transport.track_split(self._sidebar, self._content)
self._content.currentChanged.connect(self._mount_view_header)
self._mount_view_header()
# Moving the Library button out of the sidebar put it last in the
# focus chain, and a playlist tree that takes the first focus selects
# its first playlist: the window would open on that, not the library.
self._sidebar.library_button.setFocus()
# Bottom status bar, left to right: version/self-update button, then a
# centered totals readout. Both are non-permanent widgets, so a
# transient showMessage (import/scrobble/error/update text) replaces
@@ -298,6 +310,10 @@ class MainWindow(QMainWindow):
self._version_button.refresh_theme()
self._sidebar.refresh_style()
def _mount_view_header(self, _index=None):
view = self._content.currentWidget()
self._transport.set_view_header(getattr(view, "header", None))
def apply_ui_metrics(self):
metrics = theme.scale_metrics(self._prefs)
for view in (self._library_view, self._playlist_view):
@@ -305,6 +321,7 @@ class MainWindow(QMainWindow):
self._library_view.set_header_height(metrics["header_strip"])
self._playlist_view.set_header_height(metrics["header_strip"])
self._sidebar.apply_metrics(metrics["header_strip"])
self._transport.set_header_height(metrics["header_strip"])
self.statusBar().setMinimumHeight(metrics["status_height"])
def _show_preferences(self):