diff options
| author | Vicent Marti | 2009-03-11 20:39:31 +0000 | 
|---|---|---|
| committer | Vicent Marti | 2009-03-11 20:39:31 +0000 | 
| commit | 9e54b1c9634e2e1350957d5e641fe2ed7ab33fd2 (patch) | |
| tree | 40e267b5e75f54aaa52d647d2f2bfefb2209b69d | |
| parent | eca41c0d11fd0ff1d0e11a2099bf63bcaa921f29 (diff) | |
| download | scummvm-rg350-9e54b1c9634e2e1350957d5e641fe2ed7ab33fd2.tar.gz scummvm-rg350-9e54b1c9634e2e1350957d5e641fe2ed7ab33fd2.tar.bz2 scummvm-rg350-9e54b1c9634e2e1350957d5e641fe2ed7ab33fd2.zip | |
Fixed bug #2619802 (Game name overwrites scroll bar).
svn-id: r39335
| -rw-r--r-- | graphics/VectorRendererSpec.cpp | 2 | ||||
| -rw-r--r-- | gui/ListWidget.cpp | 20 | 
2 files changed, 7 insertions, 15 deletions
| diff --git a/graphics/VectorRendererSpec.cpp b/graphics/VectorRendererSpec.cpp index 8f4f0017ee..f243006228 100644 --- a/graphics/VectorRendererSpec.cpp +++ b/graphics/VectorRendererSpec.cpp @@ -454,7 +454,7 @@ drawString(const Graphics::Font *font, const Common::String &text, const Common:  		}  	} -	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 **/ diff --git a/gui/ListWidget.cpp b/gui/ListWidget.cpp index 86838d9832..4df3ec9bdc 100644 --- a/gui/ListWidget.cpp +++ b/gui/ListWidget.cpp @@ -387,7 +387,7 @@ void ListWidget::drawWidget() {  			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 @@ void ListWidget::drawWidget() {  			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; | 
