From 452d22e6505b1f8e203eedbc59ac5284c8ac967f Mon Sep 17 00:00:00 2001 From: Bastien Bouclet Date: Sat, 28 Dec 2019 15:21:51 +0100 Subject: GUI: Fix label drawing on top of PopUpWidget in updates dialog Fixes #11271. --- gui/updates-dialog.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gui') diff --git a/gui/updates-dialog.cpp b/gui/updates-dialog.cpp index 0f933bf7ce..d2f79cc56f 100644 --- a/gui/updates-dialog.cpp +++ b/gui/updates-dialog.cpp @@ -56,7 +56,7 @@ UpdatesDialog::UpdatesDialog() : Dialog(30, 20, 260, 124) { // down the string into lines, and taking the maximum of their widths. // Using this, and accounting for the space the button(s) need, we can set // the real size of the dialog - Common::Array lines, lines2, lines3; + Common::Array lines, lines2; int maxlineWidth = g_gui.getFont().wordWrapText(message, screenW - 2 * 20, lines); int maxlineWidth2 = g_gui.getFont().wordWrapText(message2, screenW - 2 * 20, lines2); @@ -85,9 +85,9 @@ UpdatesDialog::UpdatesDialog() : Dialog(30, 20, 260, 124) { const char *updMessage = _("Update check:"); - int updatelineWidth = g_gui.getFont().wordWrapText(updMessage, screenW - 2 * 20, lines3) + 5; + int updatelineWidth = g_gui.getFont().getStringWidth(updMessage) + 5; - new StaticTextWidget(this, 10, y, maxlineWidth, kLineHeight, lines3[0], Graphics::kTextAlignLeft); + new StaticTextWidget(this, 10, y, updatelineWidth, kLineHeight, updMessage, Graphics::kTextAlignLeft); _updatesPopUp = new PopUpWidget(this, 10 + updatelineWidth, y, _w - 20 - updatelineWidth, g_gui.xmlEval()->getVar("Globals.PopUp.Height", kLineHeight)); -- cgit v1.2.3