Skip to content

Commit 7c189d2

Browse files
committed
Use make_two_field_row for Output row
Replace the manual QWidget/QHBoxLayout construction for the "Output" settings row with the reusable make_two_field_row helper. This simplifies and standardizes the layout while preserving the same widgets (cam_preserve_mono_checkbox and detected_output_format_label) and applies key_width=60 and gap=40 before adding the row to dlg.settings_form.
1 parent a4345b1 commit 7c189d2

1 file changed

Lines changed: 4 additions & 10 deletions

File tree

dlclivegui/gui/camera_config/ui_blocks.py

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -303,16 +303,10 @@ def build_settings_group(dlg: CameraConfigDialog) -> QGroupBox:
303303
"Backend-reported output frame format emitted to the app, for example Mono8 or BGR8."
304304
)
305305

306-
output_widget = QWidget()
307-
output_layout = QHBoxLayout(output_widget)
308-
output_layout.setContentsMargins(0, 0, 0, 0)
309-
output_layout.setSpacing(8)
310-
output_layout.addWidget(dlg.cam_preserve_mono_checkbox)
311-
output_layout.addStretch(1)
312-
output_layout.addWidget(QLabel("Detected output:"))
313-
output_layout.addWidget(dlg.detected_output_format_label)
314-
315-
dlg.settings_form.addRow("Output:", output_widget)
306+
output_row = make_two_field_row(
307+
None, dlg.cam_preserve_mono_checkbox, "Detected:", dlg.detected_output_format_label, key_width=60, gap=40
308+
)
309+
dlg.settings_form.addRow("Output:", output_row)
316310

317311
# --- FPS + Rotation grouped ---
318312
dlg.cam_fps = QDoubleSpinBox()

0 commit comments

Comments
 (0)