diff --git a/src/aare/gui/widgets/camera_image.py b/src/aare/gui/widgets/camera_image.py index 88c1b5d8..cb3cde8f 100644 --- a/src/aare/gui/widgets/camera_image.py +++ b/src/aare/gui/widgets/camera_image.py @@ -1089,7 +1089,9 @@ class SampleCameraImageLabel(QGraphicsView): # ponytail: painted circle, not a real QWidget button — the overlay it # toggles is painter-drawn too, and a widget would need layout juggling. diameter = 22 - rect = QRectF(18, self.viewport().height() - diameter - 18, diameter, diameter) + # Center top, not a corner: corners drift oddly on scale-to-fit, + # the top middle stays put and stays out of the sample's way. + rect = QRectF((self.viewport().width() - diameter) / 2, 18, diameter, diameter) painter.save() painter.resetTransform() @@ -1166,15 +1168,15 @@ class SampleCameraImageLabel(QGraphicsView): painter.drawText(QPointF(bg_rect.left() + padding, y + fm.ascent()), entry) y += line_height - # Trailing link to the full F1 dialog; underlined so it reads as clickable. + # Trailing link to the full F1 dialog; underlined so it reads as + # clickable, right-aligned like a dialog's action button. link_font = QFont(font) link_font.setUnderline(True) painter.setFont(link_font) painter.setPen(QPen(qcolor(LEGEND_TEXT), 1)) - painter.drawText(QPointF(bg_rect.left() + padding, y + fm.ascent()), more_text) - self._help_more_rect = QRectF( - bg_rect.left() + padding, y, fm.horizontalAdvance(more_text), line_height - ) + more_x = bg_rect.right() - padding - fm.horizontalAdvance(more_text) + painter.drawText(QPointF(more_x, y + fm.ascent()), more_text) + self._help_more_rect = QRectF(more_x, y, fm.horizontalAdvance(more_text), line_height) painter.restore()