From 51b6301c5cf2513023092186a9ce18ab3c421d9e Mon Sep 17 00:00:00 2001 From: Miguel Horta Date: Fri, 12 Apr 2024 00:04:24 +0100 Subject: [PATCH] fix: Properly center buttons in build_confirmation_gui --- src/build_confirmation_gui.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/build_confirmation_gui.cpp b/src/build_confirmation_gui.cpp index a047170926..3e2227e45f 100644 --- a/src/build_confirmation_gui.cpp +++ b/src/build_confirmation_gui.cpp @@ -208,11 +208,11 @@ struct BuildConfirmationWindow : Window { DrawFrameRect(x, y, x + w, y + h, COLOUR_GREY, FR_BORDERONLY); Dimension d = GetStringBoundingBox(str); DrawFrameRect(x + w / 2 - d.width / 2 - 1, - CenterBounds(y, h, d.height) - 2, + y + h / 2 - d.height / 2 - 2, x + w / 2 + d.width / 2 + 1, - CenterBounds(y, h, d.height) + d.height, + y + h / 2 - d.height / 2 + d.height, COLOUR_GREY, FR_NONE); - DrawString(x, x + w, CenterBounds(y, h, d.height), str, TC_FROMSTRING, SA_HOR_CENTER); + DrawString(x, x + w, y + h / 2 - d.height / 2 - 2, str, TC_FROMSTRING, SA_HOR_CENTER); } };