From 3053aaae9386bc108b429b036dab0b359a9446f1 Mon Sep 17 00:00:00 2001 From: Dawn Date: Mon, 17 Aug 2026 14:31:56 +0200 Subject: [PATCH] style: expanded help overlay opens top center, under the badge The '?' badge moved to the top middle but the cheat sheet still opened bottom-left, sending the mouse across the view to close it. The overlay now drops in where the badge was. Co-Authored-By: Claude Fable 5 --- src/aare/gui/widgets/camera_image.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/aare/gui/widgets/camera_image.py b/src/aare/gui/widgets/camera_image.py index cb3cde8f..e828e842 100644 --- a/src/aare/gui/widgets/camera_image.py +++ b/src/aare/gui/widgets/camera_image.py @@ -1150,7 +1150,9 @@ class SampleCameraImageLabel(QGraphicsView): + padding * 2 ) - bg_rect = QRectF(18, max(18, self.viewport().height() - height - 18), width, height) + # Top center, where the collapsed "?" badge sits — expanding must not + # send the mouse to the other end of the view to close it again. + bg_rect = QRectF((self.viewport().width() - width) / 2, 18, width, height) self._help_hit_rect = bg_rect # click anywhere on the box to close painter.setPen(QPen(qcolor(LEGEND_TEXT, 60), 1)) painter.setBrush(qcolor(LEGEND_BG, 190))