viewer: Phase 0 redesign — slim headers, navy accent, icon nav

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 <noreply@anthropic.com>
This commit is contained in:
2026-06-23 16:26:15 +02:00
co-authored by Claude Opus 4.8
parent 68f3394f48
commit ecc06d9abd
5 changed files with 34 additions and 13 deletions
+3 -2
View File
@@ -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");
+1 -1
View File
@@ -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;
+2 -2
View File
@@ -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
+14 -4
View File
@@ -3,6 +3,7 @@
#include "JFJochViewerToolbarImage.h"
#include <QTimer>
#include <QStyle>
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("<b>Image number</b> ", 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));
+14 -4
View File
@@ -4,8 +4,18 @@
#include "TitleLabel.h"
TitleLabel::TitleLabel(QString text, QWidget *parent) : QLabel(parent) {
setText(QString("<h3>%1</h3>").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);
}