aboutsummaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
authorTorbjörn Andersson2006-02-24 19:19:55 +0000
committerTorbjörn Andersson2006-02-24 19:19:55 +0000
commit6cf5d85e8e33263007f6f7a1b54f8410b8e8e8e6 (patch)
tree2f3b609f8f7bdd1402246b4cb9e54038de194528 /gui
parent36180ed017d8af4ae0173a9ebfabdb9c3bdc5e80 (diff)
downloadscummvm-rg350-6cf5d85e8e33263007f6f7a1b54f8410b8e8e8e6.tar.gz
scummvm-rg350-6cf5d85e8e33263007f6f7a1b54f8410b8e8e8e6.tar.bz2
scummvm-rg350-6cf5d85e8e33263007f6f7a1b54f8410b8e8e8e6.zip
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... svn-id: r20839
Diffstat (limited to 'gui')
-rw-r--r--gui/ListWidget.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/gui/ListWidget.cpp b/gui/ListWidget.cpp
index 8b92b6f21a..271577866f 100644
--- a/gui/ListWidget.cpp
+++ b/gui/ListWidget.cpp
@@ -307,7 +307,6 @@ void ListWidget::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) {
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 @@ void ListWidget::drawWidget(bool hilite) {
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)