diff --git a/src/nqrduck_spectrometer/resources/spectrometer_widget.ui b/src/nqrduck_spectrometer/resources/spectrometer_widget.ui index c1c2cd8..b4212a3 100644 --- a/src/nqrduck_spectrometer/resources/spectrometer_widget.ui +++ b/src/nqrduck_spectrometer/resources/spectrometer_widget.ui @@ -10,33 +10,47 @@ 1080 + + + 0 + 0 + + Form - - - - 860 - 0 - 1061 - 1081 - - - - - - - - - 10 - 0 - 831 - 1081 - - - - - + + + + + + 0 + 0 + + + + true + + + + + + + + + + 0 + 0 + + + + true + + + + + + diff --git a/src/nqrduck_spectrometer/view.py b/src/nqrduck_spectrometer/view.py index 4714cfa..5f22154 100644 --- a/src/nqrduck_spectrometer/view.py +++ b/src/nqrduck_spectrometer/view.py @@ -24,6 +24,14 @@ class SpectrometerView(ModuleView): self.blank = QWidget() + self._ui_form.stackedWidgetSettings.setStyleSheet( + "QStackedWidget { background-color: #fafafa; border: 2px solid #000; }" + ) + + self._ui_form.stackedWidgetPulseProgrammer.setStyleSheet( + "QStackedWidget { background-color: #fafaaa; border: 2px solid #000; }" + ) + def on_active_spectrometer_changed(self, module): """This method is called when the active spectrometer is changed. It changes the active view in the stacked widget to the one that was just activated. diff --git a/src/nqrduck_spectrometer/widget.py b/src/nqrduck_spectrometer/widget.py index 47264d6..d83efed 100644 --- a/src/nqrduck_spectrometer/widget.py +++ b/src/nqrduck_spectrometer/widget.py @@ -13,24 +13,43 @@ class Ui_Form(object): def setupUi(self, Form): Form.setObjectName("Form") Form.resize(1920, 1080) - self.stackedWidgetPulseProgrammer = QtWidgets.QStackedWidget(parent=Form) - self.stackedWidgetPulseProgrammer.setGeometry(QtCore.QRect(860, 0, 1061, 1081)) - self.stackedWidgetPulseProgrammer.setObjectName("stackedWidgetPulseProgrammer") + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Minimum) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(Form.sizePolicy().hasHeightForWidth()) + Form.setSizePolicy(sizePolicy) + self.horizontalLayout = QtWidgets.QHBoxLayout(Form) + self.horizontalLayout.setObjectName("horizontalLayout") + self.stackedWidgetSettings = QtWidgets.QStackedWidget(parent=Form) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Minimum) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.stackedWidgetSettings.sizePolicy().hasHeightForWidth()) + self.stackedWidgetSettings.setSizePolicy(sizePolicy) + self.stackedWidgetSettings.setAutoFillBackground(True) + self.stackedWidgetSettings.setObjectName("stackedWidgetSettings") self.page_3 = QtWidgets.QWidget() self.page_3.setObjectName("page_3") - self.stackedWidgetPulseProgrammer.addWidget(self.page_3) + self.stackedWidgetSettings.addWidget(self.page_3) self.page_4 = QtWidgets.QWidget() self.page_4.setObjectName("page_4") - self.stackedWidgetPulseProgrammer.addWidget(self.page_4) - self.stackedWidgetSettings = QtWidgets.QStackedWidget(parent=Form) - self.stackedWidgetSettings.setGeometry(QtCore.QRect(10, 0, 831, 1081)) - self.stackedWidgetSettings.setObjectName("stackedWidgetSettings") + self.stackedWidgetSettings.addWidget(self.page_4) + self.horizontalLayout.addWidget(self.stackedWidgetSettings) + self.stackedWidgetPulseProgrammer = QtWidgets.QStackedWidget(parent=Form) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Minimum) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.stackedWidgetPulseProgrammer.sizePolicy().hasHeightForWidth()) + self.stackedWidgetPulseProgrammer.setSizePolicy(sizePolicy) + self.stackedWidgetPulseProgrammer.setAutoFillBackground(True) + self.stackedWidgetPulseProgrammer.setObjectName("stackedWidgetPulseProgrammer") self.page = QtWidgets.QWidget() self.page.setObjectName("page") - self.stackedWidgetSettings.addWidget(self.page) + self.stackedWidgetPulseProgrammer.addWidget(self.page) self.page_2 = QtWidgets.QWidget() self.page_2.setObjectName("page_2") - self.stackedWidgetSettings.addWidget(self.page_2) + self.stackedWidgetPulseProgrammer.addWidget(self.page_2) + self.horizontalLayout.addWidget(self.stackedWidgetPulseProgrammer) self.retranslateUi(Form) QtCore.QMetaObject.connectSlotsByName(Form)