From 3610309b1e5d83049554afe287129c99389d231d Mon Sep 17 00:00:00 2001 From: Christian Kolset Date: Wed, 3 Jun 2026 10:12:34 -0600 Subject: Fix settings/plugin window bugs; remove example plugin - Add missing QGroupBox import to settings_window (caused silent crash on open) - Remove Controls tab and _controls_tab() method from settings - Clamp child window positions to screen bounds so they don't go off-screen on Windows when main window is maximized - Apply same screen-clamp fix to Motion Capture plugin window - Delete example plugin; disable it in enabled.json Co-Authored-By: Claude Sonnet 4.6 --- plugins/motion_capture/plugin.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'plugins/motion_capture/plugin.py') diff --git a/plugins/motion_capture/plugin.py b/plugins/motion_capture/plugin.py index e5d37c7..1c655c5 100644 --- a/plugins/motion_capture/plugin.py +++ b/plugins/motion_capture/plugin.py @@ -166,9 +166,16 @@ class MotionCapturePlugin(LabPlugin): self._win.set_px_per_mm(state.get("px_per_mm", 10.0)) if checked: - geo = self._ctx.main_window.geometry() if not self._win.isVisible(): - self._win.move(geo.right() + 8, geo.top() + 40) + from PyQt6.QtWidgets import QApplication + mw = self._ctx.main_window + screen = QApplication.screenAt(mw.geometry().center()) or QApplication.primaryScreen() + avail = screen.availableGeometry() + geo = mw.normalGeometry() + self._win.adjustSize() + x = max(avail.left(), min(geo.right() + 8, avail.right() - self._win.width())) + y = max(avail.top(), min(geo.top() + 40, avail.bottom() - self._win.height())) + self._win.move(x, y) self._win.show() self._win.raise_() else: -- cgit v1.2.3