feat: spotify-style toolbar layout

Three-column layout matching spotify-qt:
- Left: album art thumbnail + track title/artist (stacked, 2 lines)
- Center: prev/play/next controls above elapsed / progress / total
- Right: volume button, shuffle, queue toggle, search toggle

Controls and toggles use QToolButton directly instead of QAction so the
layout is driven by HBoxLayout + VBoxLayout with equal stretch on left
and right, keeping the player controls perfectly centred at all widths.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
joren
2026-03-24 10:16:59 +01:00
parent 373fc2b43c
commit 647054dab2
2 changed files with 147 additions and 80 deletions

View File

@@ -9,7 +9,6 @@
#include <QToolBar>
#include <QToolButton>
#include <QLabel>
#include <QAction>
#include <QNetworkAccessManager>
#include <QNetworkReply>
#include <QJsonObject>
@@ -50,18 +49,23 @@ private:
QobuzBackend *m_backend = nullptr;
PlayQueue *m_queue = nullptr;
QLabel *m_artLabel = nullptr;
QLabel *m_trackLabel = nullptr;
ClickableSlider *m_progress = nullptr;
QLabel *m_timeLabel = nullptr;
VolumeButton *m_volume = nullptr;
// Left
QLabel *m_artLabel = nullptr;
QLabel *m_trackLabel = nullptr;
QAction *m_previous = nullptr;
QAction *m_playPause = nullptr;
QAction *m_next = nullptr;
QAction *m_shuffle = nullptr;
QAction *m_queueBtn = nullptr;
QAction *m_search = nullptr;
// Center
QToolButton *m_prevBtn = nullptr;
QToolButton *m_playBtn = nullptr;
QToolButton *m_nextBtn = nullptr;
ClickableSlider *m_progress = nullptr;
QLabel *m_elapsedLabel = nullptr;
QLabel *m_totalLabel = nullptr;
// Right
VolumeButton *m_volume = nullptr;
QToolButton *m_shuffleBtn = nullptr;
QToolButton *m_queueBtn = nullptr;
QToolButton *m_searchBtn = nullptr;
QNetworkAccessManager *m_nam = nullptr;
QString m_currentArtUrl;