From a6df6da1d567b961199139ac586036e43ea62e8f Mon Sep 17 00:00:00 2001 From: jupfi Date: Mon, 21 Aug 2023 11:49:58 +0200 Subject: [PATCH] Fixed calibration window view for wayland. --- src/nqrduck_autotm/view.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/nqrduck_autotm/view.py b/src/nqrduck_autotm/view.py index 8aa6707..df9d9a7 100644 --- a/src/nqrduck_autotm/view.py +++ b/src/nqrduck_autotm/view.py @@ -143,7 +143,7 @@ class AutoTMView(ModuleView): It opens the calibration window. """ logger.debug("Calibration button clicked") - self.calibration_window = self.CalibrationWindow(self.module) + self.calibration_window = self.CalibrationWindow(self.module, self) self.calibration_window.show() @pyqtSlot(list) @@ -367,11 +367,11 @@ class AutoTMView(ModuleView): matching_voltage = str(self.module.model.LUT.data[frequency][0]) self.module.controller.set_voltages(tuning_voltage, matching_voltage) - class CalibrationWindow(QWidget): + class CalibrationWindow(QDialog): def __init__(self, module, parent=None): - super().__init__() - self.module = module + super().__init__(parent) self.setParent(parent) + self.module = module self.setWindowTitle("Calibration") # Add vertical main layout @@ -390,6 +390,7 @@ class AutoTMView(ModuleView): frequency_layout.addWidget(stop_edit) unit_label = QLabel("MHz") frequency_layout.addWidget(unit_label) + frequency_layout.addStretch() # Add horizontal layout for the calibration type type_layout = QHBoxLayout()