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 <noreply@anthropic.com>
This commit is contained in:
2026-08-17 15:34:58 +02:00
committed by duan_j
co-authored by Claude Fable 5
parent 4a728baf79
commit 3053aaae93
+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))