From ecc06d9abd89943126b47738d735985e21d9db3e Mon Sep 17 00:00:00 2001 From: leonarski_f Date: Tue, 23 Jun 2026 08:19:47 +0200 Subject: [PATCH] =?UTF-8?q?viewer:=20Phase=200=20redesign=20=E2=80=94=20sl?= =?UTF-8?q?im=20headers,=20navy=20accent,=20icon=20nav?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit First pass of the viewer redesign (see docs/review/VIEWER_REDESIGN.md), no structural change: - TitleLabel: replace the 50px solid #FA7268 section bars with a slim 26px navy-bold header + coral accent rule, removing the "venetian blind" stack while keeping the salmon identity. - Palette: switch the accent (QPalette::Highlight) from teal to navy #1F3A5F. - Image toolbar: replace the unicode arrow glyphs (|<= <= => =>|) with flat media icons (first/prev/next/last) + tooltips, and a play icon on Movie. - Bottom dock: give the per-dataset plot more default height (340 -> 420). Co-Authored-By: Claude Opus 4.8 --- viewer/JFJochViewerWindow.cpp | 5 +++-- viewer/JFJochViewerWindow.h | 2 +- viewer/jfjoch_viewer.cpp | 4 ++-- viewer/toolbar/JFJochViewerToolbarImage.cpp | 18 ++++++++++++++---- viewer/widgets/TitleLabel.cpp | 18 ++++++++++++++---- 5 files changed, 34 insertions(+), 13 deletions(-) diff --git a/viewer/JFJochViewerWindow.cpp b/viewer/JFJochViewerWindow.cpp index d16a629e..acfc4633 100644 --- a/viewer/JFJochViewerWindow.cpp +++ b/viewer/JFJochViewerWindow.cpp @@ -426,8 +426,9 @@ JFJochViewerWindow::JFJochViewerWindow(QWidget *parent, bool dbus, const QString if (lastDatasetInfoDock) { splitDockWidget(lastDatasetInfoDock, processingDock, Qt::Horizontal); resizeDocks({lastDatasetInfoDock, processingDock}, {650, 350}, Qt::Horizontal); - // Give the bottom area enough height so the plots and their labels are fully visible. - resizeDocks({lastDatasetInfoDock, processingDock}, {340, 340}, Qt::Vertical); + // Give the bottom area generous height: the per-dataset plot is a headline feature, so it + // gets real room rather than a thin strip. + resizeDocks({lastDatasetInfoDock, processingDock}, {420, 420}, Qt::Vertical); } menuBar->AddDockEntry(processingDock, "Processing"); diff --git a/viewer/JFJochViewerWindow.h b/viewer/JFJochViewerWindow.h index e42b61cb..cc655dcd 100644 --- a/viewer/JFJochViewerWindow.h +++ b/viewer/JFJochViewerWindow.h @@ -19,7 +19,7 @@ class QDockWidget; class JFJochViewerWindow : public QMainWindow { Q_OBJECT // Theming is done via the application palette in main() (salmon panels, white entry fields, - // teal accent) so it applies consistently to every widget, including dialogs. + // navy accent) so it applies consistently to every widget, including dialogs. public: explicit JFJochViewerWindow(QWidget *parent = nullptr, bool dbus = true, const QString &file = ""); ~JFJochViewerWindow() override; diff --git a/viewer/jfjoch_viewer.cpp b/viewer/jfjoch_viewer.cpp index 6b2cb111..bdaae45b 100644 --- a/viewer/jfjoch_viewer.cpp +++ b/viewer/jfjoch_viewer.cpp @@ -18,7 +18,7 @@ int main(int argc, char *argv[]) { QApplication app(argc, argv); // Theme via the palette (robust across widgets): salmon panels, white entry fields that fall back - // to salmon when disabled, and a teal accent for selections and progress-bar chunks. + // to salmon when disabled, and a navy accent for selections and progress-bar chunks. app.setStyle("Fusion"); QPalette pal = app.palette(); pal.setColor(QPalette::Window, QColor(255, 235, 230)); @@ -26,7 +26,7 @@ int main(int argc, char *argv[]) { pal.setColor(QPalette::AlternateBase, QColor(255, 245, 242)); pal.setColor(QPalette::Button, QColor(255, 235, 230)); pal.setColor(QPalette::Disabled, QPalette::Base, QColor(255, 235, 230)); - pal.setColor(QPalette::Highlight, QColor(0x2a, 0x9d, 0x8f)); + pal.setColor(QPalette::Highlight, QColor(0x1f, 0x3a, 0x5f)); pal.setColor(QPalette::HighlightedText, Qt::white); app.setPalette(pal); // Fusion fills QGroupBox interiors with a flat light colour; make them transparent so they show diff --git a/viewer/toolbar/JFJochViewerToolbarImage.cpp b/viewer/toolbar/JFJochViewerToolbarImage.cpp index b570194e..74244ad6 100644 --- a/viewer/toolbar/JFJochViewerToolbarImage.cpp +++ b/viewer/toolbar/JFJochViewerToolbarImage.cpp @@ -3,6 +3,7 @@ #include "JFJochViewerToolbarImage.h" #include +#include JFJochViewerToolbarImage::JFJochViewerToolbarImage(QWidget *parent) : QToolBar(parent) { image_count_in_dataset = 0; @@ -10,11 +11,15 @@ JFJochViewerToolbarImage::JFJochViewerToolbarImage(QWidget *parent) : QToolBar(p auto title = new QLabel("Image number ", this); addWidget(title); - leftmost_button = new QPushButton("|⇐", this); + leftmost_button = new QPushButton(this); + leftmost_button->setIcon(style()->standardIcon(QStyle::SP_MediaSkipBackward)); + leftmost_button->setToolTip("First image"); leftmost_button->setFixedWidth(32); addWidget(leftmost_button); - left_button = new QPushButton("⇐", this); + left_button = new QPushButton(this); + left_button->setIcon(style()->standardIcon(QStyle::SP_MediaSeekBackward)); + left_button->setToolTip("Previous (by jump)"); left_button->setFixedWidth(32); addWidget(left_button); @@ -30,11 +35,15 @@ JFJochViewerToolbarImage::JFJochViewerToolbarImage(QWidget *parent) : QToolBar(p total_number_label = new QLabel("/0", this); addWidget(total_number_label); - right_button = new QPushButton("⇒", this); + right_button = new QPushButton(this); + right_button->setIcon(style()->standardIcon(QStyle::SP_MediaSeekForward)); + right_button->setToolTip("Next (by jump)"); right_button->setFixedWidth(32); addWidget(right_button); - rightmost_button = new QPushButton("⇒|", this); + rightmost_button = new QPushButton(this); + rightmost_button->setIcon(style()->standardIcon(QStyle::SP_MediaSkipForward)); + rightmost_button->setToolTip("Last image"); rightmost_button->setFixedWidth(32); addWidget(rightmost_button); @@ -57,6 +66,7 @@ JFJochViewerToolbarImage::JFJochViewerToolbarImage(QWidget *parent) : QToolBar(p movie_button = new QPushButton("&Movie"); + movie_button->setIcon(style()->standardIcon(QStyle::SP_MediaPlay)); movie_button->setCheckable(true); movie_button->setChecked(false); movie_button->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_M)); diff --git a/viewer/widgets/TitleLabel.cpp b/viewer/widgets/TitleLabel.cpp index 5cd8dc3d..2f4ded10 100644 --- a/viewer/widgets/TitleLabel.cpp +++ b/viewer/widgets/TitleLabel.cpp @@ -4,8 +4,18 @@ #include "TitleLabel.h" TitleLabel::TitleLabel(QString text, QWidget *parent) : QLabel(parent) { - setText(QString("

%1

").arg(text)); - setStyleSheet("background-color: #FA7268; color: #ffffff;"); - setAlignment(Qt::AlignmentFlag::AlignCenter); - setFixedHeight(50); + // Slim section header: navy bold text with a coral accent rule, in place of a heavy 50px + // full-width salmon bar. Keeps the salmon identity (the rule) while letting panels breathe. + setText(text); + QFont f = font(); + f.setBold(true); + setFont(f); + setStyleSheet("QLabel {" + " color: #1F3A5F;" + " background-color: transparent;" + " border-left: 3px solid #FA7268;" + " border-bottom: 1px solid #FA7268;" + " padding: 3px 6px 3px 8px; }"); + setAlignment(Qt::AlignLeft | Qt::AlignVCenter); + setFixedHeight(26); }