style: expanded help overlay opens top center, under the badge
CI / lint (push) Skipped
CI / test (3.11) (push) Skipped
CI / test (3.12) (push) Skipped
CI / test (3.13) (push) Skipped
CI / test-with-beamline-plugins (pxi_bec) (push) Skipped
CI / test-with-beamline-plugins (pxii_bec) (push) Skipped
CI / test-with-beamline-plugins (pxiii_bec) (push) Skipped

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 <noreply@anthropic.com>
This commit is contained in:
2026-08-17 14:31:56 +02:00
co-authored by Claude Fable 5
parent 7925bf458d
commit f6d520d892
+3 -1
View File
@@ -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))