From e75beff8835a77d21b74c939504233efd329c3b2 Mon Sep 17 00:00:00 2001 From: Marcel Date: Fri, 3 Aug 2018 11:16:56 +0200 Subject: [PATCH] [minor] cosmetics on dataPlot bottom layout --- pylot/core/util/widgets.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/pylot/core/util/widgets.py b/pylot/core/util/widgets.py index 44466701..e1e21104 100644 --- a/pylot/core/util/widgets.py +++ b/pylot/core/util/widgets.py @@ -646,8 +646,17 @@ class WaveformWidgetPG(QtGui.QWidget): self.label_layout.addWidget(self.status_label) for label in self.perm_labels: self.label_layout.addWidget(label) - self.label_layout.addWidget(self.syn_checkbox) - self.label_layout.addWidget(self.qcombo_processed) + mid_widget = QWidget() + right_widget = QWidget() + # use widgets as placeholder, so that child widgets keep position when others are hidden + mid_layout = QHBoxLayout() + right_layout = QHBoxLayout() + mid_layout.addWidget(self.syn_checkbox) + right_layout.addWidget(self.qcombo_processed) + mid_widget.setLayout(mid_layout) + right_widget.setLayout(right_layout) + self.label_layout.addWidget(mid_widget) + self.label_layout.addWidget(right_widget) self.syn_checkbox.setLayoutDirection(Qt.RightToLeft) self.label_layout.setStretch(0, 4) self.label_layout.setStretch(1, 0)