diff --git a/artiq/dashboard/moninj.py b/artiq/dashboard/moninj.py index fd20233dc..db8bb78b7 100644 --- a/artiq/dashboard/moninj.py +++ b/artiq/dashboard/moninj.py @@ -355,21 +355,16 @@ class _DACWidget(QtWidgets.QFrame): self.setFrameShadow(QtWidgets.QFrame.Raised) grid = QtWidgets.QGridLayout() - grid.setContentsMargins(0, 0, 0, 0) - grid.setHorizontalSpacing(0) - grid.setVerticalSpacing(0) + grid.setContentsMargins(2, 2, 2, 2) + grid.setHorizontalSpacing(2) self.setLayout(grid) label = QtWidgets.QLabel("{} ch{}".format(title, channel)) - label.setAlignment(QtCore.Qt.AlignCenter) - grid.addWidget(label, 1, 1) + label.setAlignment(QtCore.Qt.AlignLeft) + grid.addWidget(label, 0, 1) self.value = QtWidgets.QLabel() - self.value.setAlignment(QtCore.Qt.AlignCenter) - grid.addWidget(self.value, 2, 1, 6, 1) - - grid.setRowStretch(1, 1) - grid.setRowStretch(2, 0) - grid.setRowStretch(3, 1) + self.value.setAlignment(QtCore.Qt.AlignRight) + grid.addWidget(self.value, 0, 2, 1, 1) def set_value(self, value): self.value.setText("{:.3f} %"