viewer: chart top margin + settings dock width bounds
- The chart top margin was too tight (2 px), so the highest Y-axis label overlapped the top edge; give it 10 px of room (both chart views). - The settings dock had no width constraints (unlike the inspector), so it stretched ugly when widened and would not fold back narrowly. Cap it to 330–480 px like the inspector. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user