[Scummvm-git-logs] scummvm master -> 452d22e6505b1f8e203eedbc59ac5284c8ac967f

bgK bastien.bouclet at gmail.com
Fri Jan 3 18:02:26 UTC 2020


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
452d22e650 GUI: Fix label drawing on top of PopUpWidget in updates dialog


Commit: 452d22e6505b1f8e203eedbc59ac5284c8ac967f
    https://github.com/scummvm/scummvm/commit/452d22e6505b1f8e203eedbc59ac5284c8ac967f
Author: Bastien Bouclet (bastien.bouclet at gmail.com)
Date: 2020-01-03T19:01:14+01:00

Commit Message:
GUI: Fix label drawing on top of PopUpWidget in updates dialog

Fixes #11271.

Changed paths:
    gui/updates-dialog.cpp


diff --git a/gui/updates-dialog.cpp b/gui/updates-dialog.cpp
index 0f933bf..d2f79cc 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));
 




More information about the Scummvm-git-logs mailing list