Skip to content

Truly independent web browser

UI/Qt: Lay out the screenshot selection buttons by their whole rect

Jelle Raaijmakers444d1d0ab8fb
diff --git a/UI/Qt/ScreenshotSelectionOverlay.cpp b/UI/Qt/ScreenshotSelectionOverlay.cpp
index bc77b1b3739..4c338b6f771 100644
--- a/UI/Qt/ScreenshotSelectionOverlay.cpp
+++ b/UI/Qt/ScreenshotSelectionOverlay.cpp
@@ -93,6 +93,11 @@ ScreenshotSelectionOverlay::ScreenshotSelectionOverlay(QImage frame, QWidget* pa
m_buttons = { whole_frame_button, skip_button, cancel_button };
+ // The macOS style lays out a button by the bezel it would draw, which sits higher in the button than this style
+ // sheet's border does. Laying the buttons out by their whole rect keeps them centered in the card.
+ for (auto* button : m_buttons)
+ button->setAttribute(Qt::WA_LayoutUsesWidgetRect);
+
m_instructions = instructions;
update_chrome_style();