Skip to content

Commit e480b28

Browse files
authored
Merge pull request #47 from DeepLabCut/cy/ux-tweaks
Final UI tweaks
2 parents 262d558 + c29e8ca commit e480b28

File tree

6 files changed

+852
-147
lines changed

6 files changed

+852
-147
lines changed

dlclivegui/gui/camera_config/camera_config_dialog.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,7 @@ def _on_active_camera_selected(self, row: int) -> None:
586586
LOGGER.debug("[Selection] Suppressed currentRowChanged event at index %d.", row)
587587
return
588588
prev_row = self._current_edit_index
589-
LOGGER.info(
589+
LOGGER.debug(
590590
"[Select] row=%s prev=%s preview_state=%s",
591591
row,
592592
prev_row,
@@ -878,7 +878,7 @@ def _apply_camera_settings(self) -> bool:
878878
self._working_settings.cameras[row] = new_model
879879
self._update_active_list_item(row, new_model)
880880

881-
LOGGER.info(
881+
LOGGER.debug(
882882
"[Apply] backend=%s idx=%s changes=%s",
883883
getattr(new_model, "backend", None),
884884
getattr(new_model, "index", None),
@@ -903,7 +903,7 @@ def _apply_camera_settings(self) -> bool:
903903
if should_consider_restart:
904904
restart = self._should_restart_preview(old_settings, new_model)
905905

906-
LOGGER.info(
906+
LOGGER.debug(
907907
"[Apply] preview_state=%s restart=%s backend=%s idx=%s",
908908
self._preview.state,
909909
restart,
@@ -1237,7 +1237,7 @@ def _begin_preview_load(self, cam: CameraSettings, *, reason: str) -> None:
12371237
- Creates and wires loader
12381238
- Sets requested_cam
12391239
"""
1240-
LOGGER.info("[Preview] begin load reason=%s backend=%s idx=%s", reason, cam.backend, cam.index)
1240+
LOGGER.debug("[Preview] begin load reason=%s backend=%s idx=%s", reason, cam.backend, cam.index)
12411241

12421242
# If already loading, just coalesce restart/intention
12431243
if self._preview.state == PreviewState.LOADING:
@@ -1292,7 +1292,7 @@ def _start_preview(self) -> None:
12921292
return
12931293

12941294
self._current_edit_index = row
1295-
LOGGER.info(
1295+
LOGGER.debug(
12961296
"[Preview] resolved start row=%s active_row=%s",
12971297
self._current_edit_index,
12981298
self.active_cameras_list.currentRow(),
@@ -1313,7 +1313,7 @@ def _stop_preview(self) -> None:
13131313

13141314
def _stop_preview_internal(self, *, reason: str) -> None:
13151315
"""Tear down loader/backend/timer. Safe to call from anywhere."""
1316-
LOGGER.info("[Preview] stop reason=%s state=%s", reason, self._preview.state)
1316+
LOGGER.debug("[Preview] stop reason=%s state=%s", reason, self._preview.state)
13171317

13181318
self._preview.state = PreviewState.STOPPING
13191319

dlclivegui/gui/camera_config/ui_blocks.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
from ...cameras import CameraFactory
3232
from ..misc.drag_spinbox import ScrubSpinBox
3333
from ..misc.eliding_label import ElidingPathLabel
34-
from ..misc.layouts import _make_two_field_row
34+
from ..misc.layouts import make_two_field_row
3535

3636
if TYPE_CHECKING:
3737
from camera_config_dialog import CameraConfigDialog
@@ -250,7 +250,7 @@ def build_settings_group(dlg: CameraConfigDialog) -> QGroupBox:
250250
dlg.cam_index_label = QLabel("0")
251251

252252
dlg.cam_backend_label = QLabel("opencv")
253-
id_backend_row = _make_two_field_row(
253+
id_backend_row = make_two_field_row(
254254
"Index:",
255255
dlg.cam_index_label,
256256
"Backend:",
@@ -267,7 +267,7 @@ def build_settings_group(dlg: CameraConfigDialog) -> QGroupBox:
267267
dlg.detected_fps_label = QLabel("—")
268268
dlg.detected_fps_label.setTextInteractionFlags(Qt.TextSelectableByMouse)
269269

270-
detected_row = _make_two_field_row(
270+
detected_row = make_two_field_row(
271271
"Detected resolution:",
272272
dlg.detected_resolution_label,
273273
"Detected FPS:",
@@ -288,7 +288,7 @@ def build_settings_group(dlg: CameraConfigDialog) -> QGroupBox:
288288
dlg.cam_height.setValue(0)
289289
dlg.cam_height.setSpecialValueText("Auto")
290290

291-
res_row = _make_two_field_row("W", dlg.cam_width, "H", dlg.cam_height, key_width=30)
291+
res_row = make_two_field_row("W", dlg.cam_width, "H", dlg.cam_height, key_width=30)
292292
dlg.settings_form.addRow("Resolution:", res_row)
293293

294294
# --- FPS + Rotation grouped ---
@@ -305,7 +305,7 @@ def build_settings_group(dlg: CameraConfigDialog) -> QGroupBox:
305305
dlg.cam_rotation.addItem("180°", 180)
306306
dlg.cam_rotation.addItem("270°", 270)
307307

308-
fps_rot_row = _make_two_field_row("FPS", dlg.cam_fps, "Rot", dlg.cam_rotation, key_width=30)
308+
fps_rot_row = make_two_field_row("FPS", dlg.cam_fps, "Rot", dlg.cam_rotation, key_width=30)
309309
dlg.settings_form.addRow("Capture:", fps_rot_row)
310310

311311
# --- Exposure + Gain grouped ---
@@ -321,7 +321,7 @@ def build_settings_group(dlg: CameraConfigDialog) -> QGroupBox:
321321
dlg.cam_gain.setSpecialValueText("Auto")
322322
dlg.cam_gain.setDecimals(2)
323323

324-
exp_gain_row = _make_two_field_row("Exp", dlg.cam_exposure, "Gain", dlg.cam_gain, key_width=30)
324+
exp_gain_row = make_two_field_row("Exp", dlg.cam_exposure, "Gain", dlg.cam_gain, key_width=30)
325325
dlg.settings_form.addRow("Analog:", exp_gain_row)
326326

327327
# --- Crop row ---

0 commit comments

Comments
 (0)