[Scummvm-cvs-logs] SF.net SVN: scummvm:[39335] scummvm/trunk

tanoku at users.sourceforge.net tanoku at users.sourceforge.net
Wed Mar 11 21:39:33 CET 2009


Revision: 39335
          http://scummvm.svn.sourceforge.net/scummvm/?rev=39335&view=rev
Author:   tanoku
Date:     2009-03-11 20:39:31 +0000 (Wed, 11 Mar 2009)

Log Message:
-----------
Fixed bug #2619802 (Game name overwrites scroll bar).

Modified Paths:
--------------
    scummvm/trunk/graphics/VectorRendererSpec.cpp
    scummvm/trunk/gui/ListWidget.cpp

Modified: scummvm/trunk/graphics/VectorRendererSpec.cpp
===================================================================
--- scummvm/trunk/graphics/VectorRendererSpec.cpp	2009-03-11 20:15:42 UTC (rev 39334)
+++ scummvm/trunk/graphics/VectorRendererSpec.cpp	2009-03-11 20:39:31 UTC (rev 39335)
@@ -454,7 +454,7 @@
 		}
 	}
 
-	font->drawString(_activeSurface, text, area.left, offset, area.width(), _fgColor, alignH, deltax, ellipsis);
+	font->drawString(_activeSurface, text, area.left, offset, area.width() - deltax, _fgColor, alignH, deltax, ellipsis);
 }
 
 /** LINES **/

Modified: scummvm/trunk/gui/ListWidget.cpp
===================================================================
--- scummvm/trunk/gui/ListWidget.cpp	2009-03-11 20:15:42 UTC (rev 39334)
+++ scummvm/trunk/gui/ListWidget.cpp	2009-03-11 20:39:31 UTC (rev 39335)
@@ -387,7 +387,7 @@
 			sprintf(temp, "%2d. ", (pos + _numberingMode));
 			buffer = temp;
 			g_gui.theme()->drawText(Common::Rect(_x, y, _x + r.left + _leftPadding, y + fontHeight - 2),
-									buffer, _state, Graphics::kTextAlignLeft, inverted, _leftPadding);
+									buffer, _state, Graphics::kTextAlignLeft, inverted, _leftPadding, true);
 			pad = 0;
 		}
 
@@ -397,21 +397,13 @@
 			buffer = _editString;
 			adjustOffset();
 			width = _w - r.left - _hlRightPadding - _leftPadding - scrollbarW;
-			g_gui.theme()->drawText(Common::Rect(_x + r.left, y, _x + r.left + width, y + fontHeight-2),
-									buffer, _state, Graphics::kTextAlignLeft, inverted, pad);
+			g_gui.theme()->drawText(Common::Rect(_x + r.left, y, _x + r.left + width, y + fontHeight - 2),
+									buffer, _state, Graphics::kTextAlignLeft, inverted, pad, true);
 		} else {
-			int maxWidth = _textWidth[i];
 			buffer = _list[pos];
-			if (_selectedItem != pos) {
-				width = g_gui.getStringWidth(buffer) + pad;
-				if (width > _w - r.left)
-					width = _w - r.left - _hlRightPadding - scrollbarW;
-			} else
-				width = _w - r.left - _hlRightPadding - scrollbarW;
-			if (width > maxWidth)
-				maxWidth = width;
-			g_gui.theme()->drawText(Common::Rect(_x + r.left, y, _x + r.left + maxWidth, y + fontHeight-2),
-									buffer, _state, Graphics::kTextAlignLeft, inverted, pad);
+			width = _w - r.left - scrollbarW;
+			g_gui.theme()->drawText(Common::Rect(_x + r.left, y, _x + r.left + width, y + fontHeight - 2),
+									buffer, _state, Graphics::kTextAlignLeft, inverted, pad, true);			
 		}
 
 		_textWidth[i] = width;


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list