aboutsummaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
authorTorbjörn Andersson2010-10-10 10:11:33 +0000
committerTorbjörn Andersson2010-10-10 10:11:33 +0000
commitbcf3b352853a268afba25a0bdfccefd27191f5c6 (patch)
treea08a9cdab96a60f8dbd61ec5558a4a574ef438d7 /gui
parent550d340959d897a161d078111e7ec269d3c57797 (diff)
downloadscummvm-rg350-bcf3b352853a268afba25a0bdfccefd27191f5c6.tar.gz
scummvm-rg350-bcf3b352853a268afba25a0bdfccefd27191f5c6.tar.bz2
scummvm-rg350-bcf3b352853a268afba25a0bdfccefd27191f5c6.zip
GUI: Clean up my previous commit.
svn-id: r53112
Diffstat (limited to 'gui')
-rw-r--r--gui/message.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/gui/message.cpp b/gui/message.cpp
index 198a34eb0d..6f5d7d9e77 100644
--- a/gui/message.cpp
+++ b/gui/message.cpp
@@ -58,10 +58,7 @@ MessageDialog::MessageDialog(const Common::String &message, const char *defaultB
int maxlineWidth = g_gui.getFont().wordWrapText(message, screenW - 2 * 20, lines);
// Calculate the desired dialog size (maxing out at 300*180 for now)
- if (maxlineWidth > buttonWidth)
- _w = maxlineWidth + 20;
- else
- _w = buttonWidth + 20;
+ _w = MAX(maxlineWidth, buttonWidth) + 20;
lineCount = lines.size();
_h = 16;