[Scummvm-cvs-logs] CVS: scummvm/gui ListWidget.cpp,1.62,1.63
Torbjörn Andersson
eriktorbjorn at users.sourceforge.net
Sun Jan 29 05:15:05 CET 2006
Update of /cvsroot/scummvm/scummvm/gui
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21249
Modified Files:
ListWidget.cpp
Log Message:
Limit the maximum line width.
Index: ListWidget.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/ListWidget.cpp,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -d -r1.62 -r1.63
--- ListWidget.cpp 28 Jan 2006 18:21:46 -0000 1.62
+++ ListWidget.cpp 29 Jan 2006 13:14:04 -0000 1.63
@@ -347,9 +347,11 @@
int maxWidth = _textWidth[i];
buffer = _list[pos];
deltax = 0;
- if (_selectedItem != pos)
+ if (_selectedItem != pos) {
width = g_gui.getStringWidth(buffer);
- else
+ if (width > _w - r.left - 2)
+ width = _w - r.left - 2;
+ } else
width = _w - r.left - 2;
if (width > maxWidth)
maxWidth = width;
More information about the Scummvm-git-logs
mailing list