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:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user