From fd01806b2fd56ff604252951d691bacf320dfaa1 Mon Sep 17 00:00:00 2001 From: x01dc Date: Thu, 17 Sep 2026 17:03:37 +0200 Subject: [PATCH] fix(xrayeye): remove self.resize(800, 600) from __init__ -- fights dock manager Root cause isolated via a live A/B test (Mirko): the "camera image cut/ collapsed until the window is manually moved" symptom is specific to OMNY_XRayEye -- flomnigui_show_cameras()'s Image/z_ConsoleButtonsWidget docks never show it, even swapped in and out of the *same* persistent window repeatedly (ruling out window-freshness/QtAds-first-dock theories tried and reverted earlier this session). Further isolated to screen size: reproduces reliably on a screen too small for the assumed geometry, not on a larger one. OMNY_XRayEye.__init__() was the only widget in this GUI calling self.resize(800, 600) on itself. This widget is normally embedded as a dock (gui_tools.py's flomnigui_show_xeyealign()), where the dock manager (Qt Advanced Docking System) owns its geometry -- an explicit self-resize call fights that, and on an undersized screen corrupts the dock's layout until a manual move/resize forces Qt to reflow within actual available space. The standalone `python x_ray_eye.py` test harness at the bottom of this file already does its own win.resize(1000, 800) after construction regardless, so this call was never actually needed even there -- pure dead weight that only caused harm once embedded. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_01Lx3KffiFyyDMKT8vvPENUW --- .../bec_widgets/widgets/xray_eye/x_ray_eye.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/csaxs_bec/bec_widgets/widgets/xray_eye/x_ray_eye.py b/csaxs_bec/bec_widgets/widgets/xray_eye/x_ray_eye.py index e170f304..f11a4a54 100644 --- a/csaxs_bec/bec_widgets/widgets/xray_eye/x_ray_eye.py +++ b/csaxs_bec/bec_widgets/widgets/xray_eye/x_ray_eye.py @@ -329,7 +329,20 @@ class OMNY_XRayEye(BECWidget, QWidget): ) self.connect_motors() - self.resize(800, 600) + # No self.resize() here: this widget is normally embedded as a dock + # (see gui_tools.py's flomnigui_show_xeyealign()), where the dock + # manager (Qt Advanced Docking System) owns its geometry -- an + # explicit self-resize call fights that, and on a screen too small + # for the assumed geometry (gui_tools.py's hardcoded 2560px-wide + # assumption) corrupts the dock's layout until the operator manually + # moves/resizes the window (forcing Qt to reflow within the actual + # available space) -- confirmed live: reproduces reliably on a + # smaller screen, not on a large one, and only for this widget (the + # only one in this GUI with a self-resize call), never for the + # camera/console docks shown via flomnigui_show_cameras(). The + # standalone `python x_ray_eye.py` harness below already does its + # own win.resize(1000, 800) after construction regardless, so this + # call was never actually needed even for that use case. QTimer.singleShot(0, self._init_queue_status) QTimer.singleShot(0, self._init_gui_trigger) QTimer.singleShot(0, self._init_pixel_clock_options)