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))