From a7478a907cf71f2773ad1b2ecb67b1d9f7549eaa Mon Sep 17 00:00:00 2001 From: Simon Renblad Date: Wed, 17 Apr 2024 13:18:38 +0800 Subject: [PATCH] moninj: change to vboxlayout --- artiq/dashboard/moninj.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/artiq/dashboard/moninj.py b/artiq/dashboard/moninj.py index 57a0f0dbe..e9851c308 100644 --- a/artiq/dashboard/moninj.py +++ b/artiq/dashboard/moninj.py @@ -8,7 +8,6 @@ from PyQt5 import QtCore, QtWidgets from artiq.coredevice.comm_moninj import CommMonInj, TTLOverride, TTLProbe from artiq.coredevice.ad9912_reg import AD9912_SER_CONF from artiq.gui.tools import LayoutWidget -from artiq.gui.flowlayout import FlowLayout from artiq.gui.models import DictSyncTreeSepModel @@ -840,15 +839,19 @@ class MonInjDock(QtWidgets.QDockWidget): layout.addWidget(add_channel_btn, 0, 0, colspan=1) scroll_area = QtWidgets.QScrollArea() layout.addWidget(scroll_area, 1, 0, colspan=10) - self.grid = FlowLayout() + self.grid = QtWidgets.QVBoxLayout() + self.spacer = QtWidgets.QSpacerItem(50, 500, QtWidgets.QSizePolicy.Ignored, + QtWidgets.QSizePolicy.Fixed) grid_widget = QtWidgets.QWidget() grid_widget.setLayout(self.grid) scroll_area.setWidgetResizable(True) scroll_area.setWidget(grid_widget) def layout_widgets(self, handlers): + self.grid.removeItem(self.spacer) for handler in handlers: self.grid.addWidget(handler.widget) + self.grid.insertItem(-1, self.spacer) def set_channels(self, handlers): self._channel_model.clear()