diff --git a/src/aare/gui/panels/beamline_recovery_panel.py b/src/aare/gui/panels/beamline_recovery_panel.py index 17933205..882f021f 100644 --- a/src/aare/gui/panels/beamline_recovery_panel.py +++ b/src/aare/gui/panels/beamline_recovery_panel.py @@ -40,7 +40,6 @@ class RecoveryPanel(QWidget): " background: #fff3cd;" " color: #7a4b00;" " border: 1px solid #f0c36d;" - " border-radius: 8px;" " padding: 10px;" " font-weight: 600;" "}" @@ -57,7 +56,6 @@ class RecoveryPanel(QWidget): " background: #fdeaea;" " color: #8b1e1e;" " border: 1px solid #e6a8a8;" - " border-radius: 8px;" " padding: 10px;" " font-weight: 600;" "}" @@ -71,7 +69,6 @@ class RecoveryPanel(QWidget): " background: #eef6ff;" " color: #12406a;" " border: 1px solid #a8c7e6;" - " border-radius: 8px;" " padding: 10px;" " font-weight: 600;" "}" @@ -83,7 +80,6 @@ class RecoveryPanel(QWidget): "QPushButton {" " background: #fff7db;" " border: 1px solid #e7cb73;" - " border-radius: 8px;" " padding: 10px;" " font-weight: 600;" "}" @@ -96,7 +92,6 @@ class RecoveryPanel(QWidget): "QPushButton {" " background: #fff7db;" " border: 1px solid #e7cb73;" - " border-radius: 8px;" " padding: 10px;" " font-weight: 600;" "}" @@ -110,7 +105,6 @@ class RecoveryPanel(QWidget): " background: #fdeaea;" " color: #8b1e1e;" " border: 1px solid #e6a8a8;" - " border-radius: 8px;" " padding: 10px;" " font-weight: 700;" "}" @@ -124,7 +118,6 @@ class RecoveryPanel(QWidget): " background: #fdeaea;" " color: #8b1e1e;" " border: 1px solid #e6a8a8;" - " border-radius: 8px;" " padding: 10px;" " font-weight: 700;" "}" @@ -138,7 +131,6 @@ class RecoveryPanel(QWidget): " background: #eef6ff;" " color: #12406a;" " border: 1px solid #a8c7e6;" - " border-radius: 8px;" " padding: 10px;" " font-weight: 600;" "}" diff --git a/src/aare/gui/panels/local_contact_panel.py b/src/aare/gui/panels/local_contact_panel.py index 7b6630c4..409e76f0 100644 --- a/src/aare/gui/panels/local_contact_panel.py +++ b/src/aare/gui/panels/local_contact_panel.py @@ -31,7 +31,6 @@ from aare.gui.panels.beamline_recovery_panel import RecoveryPanel from aare.gui.threads.daq_worker import DAQWorker from aare.gui.widgets.local_contact_status_widget import LocalContactStatusWidget from aare.gui.widgets.text_list_dialog import TextListDialog -from aare.gui.widgets.title_label import TitleLabel logger = setup_logger(LOGGER_NAME) @@ -65,9 +64,12 @@ class LocalContactPanel(QFrame): self._bec_macros_dialog: TextListDialog | None = None self._bec_devices_dialog: TextListDialog | None = None self._local_contact_config_payload: dict = {} - self._mount_to_center_sleep_s = QDoubleSpinBox(self) - self._line_scan_loop_face_y_padding_fraction_each_side = QDoubleSpinBox(self) - self._line_scan_loop_all_y_padding_fraction_each_side = QDoubleSpinBox(self) + # Recreated with proper parents in _build_config_tab; parentless here + # so no orphan widget floats over the panel (the old parent=self + # copies painted themselves over the top-left corner). + self._mount_to_center_sleep_s = QDoubleSpinBox() + self._line_scan_loop_face_y_padding_fraction_each_side = QDoubleSpinBox() + self._line_scan_loop_all_y_padding_fraction_each_side = QDoubleSpinBox() self.setFrameShape(QFrame.Shape.StyledPanel) self.setFrameShadow(QFrame.Shadow.Raised) @@ -76,7 +78,6 @@ class LocalContactPanel(QFrame): QGroupBox { background-color: white; border: 1px solid #c7d4e5; - border-radius: 5px; margin-top: 15px; padding-top: 15px; font-weight: 700; @@ -96,8 +97,7 @@ class LocalContactPanel(QFrame): layout.setContentsMargins(8, 8, 8, 8) layout.setSpacing(8) - layout.addWidget(TitleLabel("Local Contact", parent=self)) - + # No TitleLabel banner: the dialog window title already says it. self._info_label = QLabel( "Staff tools for beamline recovery and local-contact operations.", self ) @@ -107,12 +107,7 @@ class LocalContactPanel(QFrame): self._transfer_error_frame = QFrame(self) self._transfer_error_frame.setVisible(False) self._transfer_error_frame.setStyleSheet( - "QFrame {" - " background: #fdeaea;" - " color: #8b1e1e;" - " border: 1px solid #e6a8a8;" - " border-radius: 8px;" - "}" + "QFrame { background: #fdeaea; color: #8b1e1e; border: 1px solid #e6a8a8;}" ) transfer_error_layout = QVBoxLayout(self._transfer_error_frame) transfer_error_layout.setContentsMargins(10, 10, 10, 10) diff --git a/src/aare/gui/widgets/local_contact_status_widget.py b/src/aare/gui/widgets/local_contact_status_widget.py index 328e9157..4d8d45fc 100644 --- a/src/aare/gui/widgets/local_contact_status_widget.py +++ b/src/aare/gui/widgets/local_contact_status_widget.py @@ -83,7 +83,6 @@ class LocalContactStatusWidget(QFrame): QFrame#localContactStatusCard { background: #f8fbff; border: 1px solid #c7d4e5; - border-radius: 10px; } """ ) @@ -103,7 +102,8 @@ class LocalContactStatusWidget(QFrame): self._grid = QGridLayout() self._grid.setContentsMargins(0, 0, 0, 0) self._grid.setHorizontalSpacing(14) - self._grid.setVerticalSpacing(5) + # Tight rows; the badge keeps 2px vertical padding so text never clips. + self._grid.setVerticalSpacing(2) layout.addLayout(self._grid) self._rebuild_rows() @@ -139,6 +139,10 @@ class LocalContactStatusWidget(QFrame): self._row_widgets[key] = (title, value) self._grid.addWidget(title, row, 0, alignment=Qt.AlignmentFlag.AlignTop) self._grid.addWidget(value, row, 1) + # Word-wrapped value labels report a near-zero minimum height, so + # cramped tabs (e.g. Hardware) could compress rows until the text + # clipped; guarantee one full text line + badge padding per row. + self._grid.setRowMinimumHeight(row, self.fontMetrics().height() + 6) def _badge(self, text: str, *, tone: str = "neutral") -> str: palette = { @@ -151,7 +155,7 @@ class LocalContactStatusWidget(QFrame): background, foreground = palette.get(tone, palette["neutral"]) return ( f"{text}" + f"padding:2px 6px;'>{text}" ) def _format_bool(