viewer: white-when-active inputs, teal accent, Status column visible
Styling: - Entry widgets (line edits, spin boxes, combos, item views) are salmon (the GUI default) when inactive and turn white while focused/active. - A teal accent (#2a9d8f) for selections and the QProgressBar chunk, against the salmon background. - Move the jobs-table Status column (the progress bar) to column 2 so it stays visible in the narrow dock instead of scrolling off the right edge. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -18,7 +18,31 @@ class QDockWidget;
|
||||
|
||||
class JFJochViewerWindow : public QMainWindow {
|
||||
Q_OBJECT
|
||||
const QString stylesheet = "background-color: rgb(255, 235, 230);";
|
||||
// Salmon (GUI default) everywhere; entry widgets (line edits, spin boxes, combos, tables) turn
|
||||
// white while focused/active. A teal accent (selection + progress chunks) adds some colour.
|
||||
const QString stylesheet = R"(
|
||||
background-color: rgb(255, 235, 230);
|
||||
|
||||
QLineEdit, QPlainTextEdit, QTextEdit, QAbstractSpinBox, QComboBox, QAbstractItemView {
|
||||
background-color: rgb(255, 235, 230);
|
||||
selection-background-color: #2a9d8f;
|
||||
selection-color: white;
|
||||
}
|
||||
QLineEdit:focus, QPlainTextEdit:focus, QTextEdit:focus, QAbstractSpinBox:focus,
|
||||
QComboBox:focus, QAbstractItemView:focus {
|
||||
background-color: white;
|
||||
}
|
||||
QProgressBar {
|
||||
border: 1px solid #d9b3aa;
|
||||
border-radius: 3px;
|
||||
background-color: rgb(255, 235, 230);
|
||||
text-align: center;
|
||||
}
|
||||
QProgressBar::chunk {
|
||||
background-color: #2a9d8f;
|
||||
border-radius: 2px;
|
||||
}
|
||||
)";
|
||||
public:
|
||||
explicit JFJochViewerWindow(QWidget *parent = nullptr, bool dbus = true, const QString &file = "");
|
||||
~JFJochViewerWindow() override;
|
||||
|
||||
@@ -28,7 +28,8 @@
|
||||
#include <thread>
|
||||
|
||||
namespace {
|
||||
enum Column { COL_NAME = 0, COL_STARTED, COL_MODE, COL_IMAGES, COL_STATUS, COL_INDEX, COL_CELL, COL_COUNT };
|
||||
// Status (the progress bar) is column 2 so it stays visible in the narrow dock.
|
||||
enum Column { COL_NAME = 0, COL_STATUS, COL_STARTED, COL_MODE, COL_IMAGES, COL_INDEX, COL_CELL, COL_COUNT };
|
||||
|
||||
int default_threads() {
|
||||
const unsigned hc = std::thread::hardware_concurrency();
|
||||
@@ -58,7 +59,7 @@ JFJochProcessingJobsWindow::JFJochProcessingJobsWindow(JFJochImageReadingWorker
|
||||
|
||||
table_ = new QTableWidget(0, COL_COUNT, this);
|
||||
table_->setMinimumHeight(60); // let the bottom dock shrink freely
|
||||
table_->setHorizontalHeaderLabels({"Name", "Started", "Mode", "Images", "Status", "Index %", "Unit cell"});
|
||||
table_->setHorizontalHeaderLabels({"Name", "Status", "Started", "Mode", "Images", "Index %", "Unit cell"});
|
||||
table_->horizontalHeader()->setStretchLastSection(true);
|
||||
table_->setSelectionBehavior(QAbstractItemView::SelectRows);
|
||||
table_->setSelectionMode(QAbstractItemView::SingleSelection);
|
||||
|
||||
Reference in New Issue
Block a user