Fixed calibration window view for wayland.

This commit is contained in:
jupfi 2023-08-21 11:49:58 +02:00
parent b0ddbae9c5
commit a6df6da1d5

View file

@ -143,7 +143,7 @@ class AutoTMView(ModuleView):
It opens the calibration window. It opens the calibration window.
""" """
logger.debug("Calibration button clicked") logger.debug("Calibration button clicked")
self.calibration_window = self.CalibrationWindow(self.module) self.calibration_window = self.CalibrationWindow(self.module, self)
self.calibration_window.show() self.calibration_window.show()
@pyqtSlot(list) @pyqtSlot(list)
@ -367,11 +367,11 @@ class AutoTMView(ModuleView):
matching_voltage = str(self.module.model.LUT.data[frequency][0]) matching_voltage = str(self.module.model.LUT.data[frequency][0])
self.module.controller.set_voltages(tuning_voltage, matching_voltage) self.module.controller.set_voltages(tuning_voltage, matching_voltage)
class CalibrationWindow(QWidget): class CalibrationWindow(QDialog):
def __init__(self, module, parent=None): def __init__(self, module, parent=None):
super().__init__() super().__init__(parent)
self.module = module
self.setParent(parent) self.setParent(parent)
self.module = module
self.setWindowTitle("Calibration") self.setWindowTitle("Calibration")
# Add vertical main layout # Add vertical main layout
@ -390,6 +390,7 @@ class AutoTMView(ModuleView):
frequency_layout.addWidget(stop_edit) frequency_layout.addWidget(stop_edit)
unit_label = QLabel("MHz") unit_label = QLabel("MHz")
frequency_layout.addWidget(unit_label) frequency_layout.addWidget(unit_label)
frequency_layout.addStretch()
# Add horizontal layout for the calibration type # Add horizontal layout for the calibration type
type_layout = QHBoxLayout() type_layout = QHBoxLayout()