From e9725e393e8c1075b322256101599687b0ede23c Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Tue, 4 Feb 2014 19:24:41 +0100 Subject: [PATCH] paintButtons: fix alternative button text size --- src/gui/widget/buttons.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gui/widget/buttons.cpp b/src/gui/widget/buttons.cpp index 0143c6d76..0d52a4406 100644 --- a/src/gui/widget/buttons.cpp +++ b/src/gui/widget/buttons.cpp @@ -139,7 +139,10 @@ int paintButtons( const int &x, if (content[i].locale) { buttontext[i] = g_Locale->getText(content[i].locale); //text width - fwidth[i] = font->getRenderWidth(buttontext[i], true); + if (alt_buttontext != NULL && i == buttontext_id) + fwidth[i] = font->getRenderWidth(alt_buttontext, true); //...with an alternate buttontext + else + fwidth[i] = font->getRenderWidth(buttontext[i], true); w_text += fwidth[i]; count_labels++; } else {