summaryrefslogtreecommitdiff
path: root/plugins/motion_capture
diff options
context:
space:
mode:
authorChristian Kolset <christian.kolset@gmail.com>2026-06-03 10:12:34 -0600
committerChristian Kolset <christian.kolset@gmail.com>2026-06-03 10:12:34 -0600
commit3610309b1e5d83049554afe287129c99389d231d (patch)
treedcf2f554aff081381d6ff60074546a1a54732c96 /plugins/motion_capture
parent0a8d42501c1bf168bd852537bb3cd18490fac7ee (diff)
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 <noreply@anthropic.com>
Diffstat (limited to 'plugins/motion_capture')
-rw-r--r--plugins/motion_capture/plugin.py11
1 files changed, 9 insertions, 2 deletions
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: