diff options
Diffstat (limited to 'ui/strip_chart.py')
| -rw-r--r-- | ui/strip_chart.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/ui/strip_chart.py b/ui/strip_chart.py index 523102d..d855038 100644 --- a/ui/strip_chart.py +++ b/ui/strip_chart.py @@ -95,12 +95,14 @@ class StripChartWidget(QWidget): n = len(cfg.panes) # Determine row/col for each pane - if cfg.layout_mode == "sidebyside": + if cfg.layout_mode == "free": + positions = [(spec.row or 0, spec.col or 0) for spec in cfg.panes] + elif cfg.layout_mode == "sidebyside": positions = [(0, c) for c in range(n)] elif cfg.layout_mode == "grid": cols = max(1, cfg.grid_cols) positions = [(i // cols, i % cols) for i in range(n)] - else: # stacked + else: # stacked (legacy default) positions = [(r, 0) for r in range(n)] ref_plot = None @@ -112,7 +114,7 @@ class StripChartWidget(QWidget): plot.getAxis("left").setStyle(tickFont=mf) plot.getAxis("bottom").setStyle(tickFont=mf) - # Hide bottom axis labels for all but bottom row in stacked + # Hide bottom axis labels for non-bottom panes in stacked legacy mode if cfg.layout_mode == "stacked" and idx < n - 1: plot.getAxis("bottom").setStyle(showValues=False) plot.getAxis("bottom").setHeight(0) @@ -133,10 +135,9 @@ class StripChartWidget(QWidget): else: plot.enableAutoRange(axis="y") - # Set column stretch (relative weight) + # Apply weight to row and column stretch self._gw.ci.layout.setColumnStretchFactor(col, spec.weight) - if cfg.layout_mode == "stacked": - self._gw.ci.layout.setRowStretchFactor(row, spec.weight) + self._gw.ci.layout.setRowStretchFactor(row, spec.weight) for tr in spec.traces: if not tr.visible: continue |
