diff --git a/viewer/JFJochViewerWindow.cpp b/viewer/JFJochViewerWindow.cpp index 041e3fa0..2a496cec 100644 --- a/viewer/JFJochViewerWindow.cpp +++ b/viewer/JFJochViewerWindow.cpp @@ -501,6 +501,10 @@ JFJochViewerWindow::JFJochViewerWindow(QWidget *parent, bool dbus, const QString settingsScroll->setWidgetResizable(true); settingsScroll->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); settingsScroll->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded); + // Constrain the width like the inspector, so it neither stretches ugly when widened nor + // refuses to fold back narrow. + settingsScroll->setMinimumWidth(330); + settingsScroll->setMaximumWidth(480); settingsDock = new QDockWidget("Settings", this); settingsDock->setObjectName("settingsDock"); settingsDock->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea); diff --git a/viewer/charts/JFJochDatasetInfoChartView.cpp b/viewer/charts/JFJochDatasetInfoChartView.cpp index 46486046..1e65b1b8 100644 --- a/viewer/charts/JFJochDatasetInfoChartView.cpp +++ b/viewer/charts/JFJochDatasetInfoChartView.cpp @@ -16,7 +16,7 @@ JFJochDatasetInfoChartView::JFJochDatasetInfoChartView(QWidget *parent) // Reclaim Qt Charts' outer layout padding and trim the inner margins so the axis labels keep // their room even when the dock is short (otherwise they are the first thing Qt drops). chart()->layout()->setContentsMargins(0, 0, 0, 0); - chart()->setMargins(QMargins(2, 2, 6, 2)); + chart()->setMargins(QMargins(2, 10, 8, 2)); // top room so the highest Y label is not clipped chart()->setBackgroundRoundness(0); setRenderHint(QPainter::Antialiasing); // setRubberBand(QChartView::RubberBand::RectangleRubberBand); diff --git a/viewer/charts/JFJochSimpleChartView.cpp b/viewer/charts/JFJochSimpleChartView.cpp index 35b582fa..e5f7524f 100644 --- a/viewer/charts/JFJochSimpleChartView.cpp +++ b/viewer/charts/JFJochSimpleChartView.cpp @@ -14,7 +14,7 @@ JFJochSimpleChartView::JFJochSimpleChartView(QWidget *parent) : QChartView(new QChart(), parent) { chart()->legend()->hide(); chart()->layout()->setContentsMargins(0, 0, 0, 0); // reclaim padding for the plot + labels - chart()->setMargins(QMargins(2, 2, 6, 2)); + chart()->setMargins(QMargins(2, 10, 8, 2)); // top room so the highest Y label is not clipped setMinimumHeight(140); // soft floor: enough for the axis labels to stay readable setRenderHint(QPainter::Antialiasing); setMouseTracking(true);