[Scummvm-cvs-logs] SF.net SVN: scummvm: [20839] scummvm/trunk/gui/ListWidget.cpp

eriktorbjorn at users.sourceforge.net eriktorbjorn at users.sourceforge.net
Fri Feb 24 11:21:06 CET 2006


Revision: 20839
Author:   eriktorbjorn
Date:     2006-02-24 11:19:55 -0800 (Fri, 24 Feb 2006)
ViewCVS:  http://svn.sourceforge.net/scummvm?rev=20839&view=rev

Log Message:
-----------
Fix redraw glitches when typing very long - enough to be truncated - strings.
It seems the only purpose of 'deltax' in this function was to introduce such
redrawing glitches. Weird...

Modified Paths:
--------------
    scummvm/trunk/gui/ListWidget.cpp
Modified: scummvm/trunk/gui/ListWidget.cpp
===================================================================
--- scummvm/trunk/gui/ListWidget.cpp	2006-02-23 22:38:16 UTC (rev 20838)
+++ scummvm/trunk/gui/ListWidget.cpp	2006-02-24 19:19:55 UTC (rev 20839)
@@ -307,7 +307,6 @@
 void ListWidget::drawWidget(bool hilite) {
 	int i, pos, len = _list.size();
 	Common::String buffer;
-	int deltax;
 
 	// Draw a thin frame around the list.
 	g_gui.theme()->drawWidgetBackground(Common::Rect(_x, _y, _x+_w, _y+_h), _hints, Theme::kWidgetBackgroundBorder);
@@ -341,13 +340,11 @@
 		if (_selectedItem == pos && _editMode) {
 			buffer = _editString;
 			adjustOffset();
-			deltax = -_editScrollOffset;
-			width = _w - r.left + deltax - 2;
-			g_gui.theme()->drawText(Common::Rect(_x + r.left - deltax, y, _x + r.left - deltax + width, y + fontHeight - 1), buffer, Theme::kStateEnabled, Theme::kTextAlignLeft, inverted);
+			width = _w - r.left - 2;
+			g_gui.theme()->drawText(Common::Rect(_x + r.left, y, _x + r.left + width, y + fontHeight - 1), buffer, Theme::kStateEnabled, Theme::kTextAlignLeft, inverted);
 		} else {
 			int maxWidth = _textWidth[i];
 			buffer = _list[pos];
-			deltax = 0;
 			if (_selectedItem != pos) {
 				width = g_gui.getStringWidth(buffer);
 				if (width > _w - r.left - 2)







More information about the Scummvm-git-logs mailing list