fix(xrayeye): remove self.resize(800, 600) from __init__ -- fights dock manager
CI for csaxs_bec / test (push) Successful in 2m14s
CI for csaxs_bec / test (push) Successful in 2m14s
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 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Lx3KffiFyyDMKT8vvPENUW
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user