aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Bouclet2019-12-28 15:21:51 +0100
committerBastien Bouclet2020-01-03 19:01:14 +0100
commit452d22e6505b1f8e203eedbc59ac5284c8ac967f (patch)
treeacea0f548467c04a07721754ac1b6c1d4892b9dc
parent1403f9ffa235ddbdbee10efa04cc4081c0cfcd7c (diff)
downloadscummvm-rg350-452d22e6505b1f8e203eedbc59ac5284c8ac967f.tar.gz
scummvm-rg350-452d22e6505b1f8e203eedbc59ac5284c8ac967f.tar.bz2
scummvm-rg350-452d22e6505b1f8e203eedbc59ac5284c8ac967f.zip
GUI: Fix label drawing on top of PopUpWidget in updates dialog
Fixes #11271.
-rw-r--r--gui/updates-dialog.cpp6
1 files changed, 3 insertions, 3 deletions
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<Common::String> lines, lines2, lines3;
+ Common::Array<Common::String> 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));