[Scummvm-cvs-logs] SF.net SVN: scummvm:[39988] scummvm/branches/branch-0-13-0
tanoku at users.sourceforge.net
tanoku at users.sourceforge.net
Sat Apr 18 20:14:07 CEST 2009
Revision: 39988
http://scummvm.svn.sourceforge.net/scummvm/?rev=39988&view=rev
Author: tanoku
Date: 2009-04-18 18:14:02 +0000 (Sat, 18 Apr 2009)
Log Message:
-----------
Backported several GUI fixes: r39335, r39703, r39706
Modified Paths:
--------------
scummvm/branches/branch-0-13-0/graphics/VectorRendererSpec.cpp
scummvm/branches/branch-0-13-0/gui/GuiManager.cpp
scummvm/branches/branch-0-13-0/gui/ListWidget.cpp
scummvm/branches/branch-0-13-0/gui/themebrowser.cpp
Modified: scummvm/branches/branch-0-13-0/graphics/VectorRendererSpec.cpp
===================================================================
--- scummvm/branches/branch-0-13-0/graphics/VectorRendererSpec.cpp 2009-04-18 14:33:35 UTC (rev 39987)
+++ scummvm/branches/branch-0-13-0/graphics/VectorRendererSpec.cpp 2009-04-18 18:14:02 UTC (rev 39988)
@@ -473,7 +473,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/branches/branch-0-13-0/gui/GuiManager.cpp
===================================================================
--- scummvm/branches/branch-0-13-0/gui/GuiManager.cpp 2009-04-18 14:33:35 UTC (rev 39987)
+++ scummvm/branches/branch-0-13-0/gui/GuiManager.cpp 2009-04-18 18:14:02 UTC (rev 39988)
@@ -127,6 +127,10 @@
redraw();
_system->updateScreen();
+ Common::Event event;
+ event.type = Common::EVENT_SCREEN_CHANGED;
+ _system->getEventManager()->pushEvent(event);
+
return true;
}
Modified: scummvm/branches/branch-0-13-0/gui/ListWidget.cpp
===================================================================
--- scummvm/branches/branch-0-13-0/gui/ListWidget.cpp 2009-04-18 14:33:35 UTC (rev 39987)
+++ scummvm/branches/branch-0-13-0/gui/ListWidget.cpp 2009-04-18 18:14:02 UTC (rev 39988)
@@ -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;
Modified: scummvm/branches/branch-0-13-0/gui/themebrowser.cpp
===================================================================
--- scummvm/branches/branch-0-13-0/gui/themebrowser.cpp 2009-04-18 14:33:35 UTC (rev 39987)
+++ scummvm/branches/branch-0-13-0/gui/themebrowser.cpp 2009-04-18 18:14:02 UTC (rev 39988)
@@ -97,12 +97,20 @@
ThemeEngine::listUsableThemes(_themes);
+ const Common::String currentThemeId = g_gui.theme()->getThemeId();
+ int currentThemeIndex = 0, index = 0;
+
Common::StringList list;
- for (ThemeDescList::const_iterator i = _themes.begin(); i != _themes.end(); ++i)
+ for (ThemeDescList::const_iterator i = _themes.begin(); i != _themes.end(); ++i, ++index) {
list.push_back(i->name);
+ if (i->id == currentThemeId)
+ currentThemeIndex = index;
+ }
+
_fileList->setList(list);
_fileList->scrollTo(0);
+ _fileList->setSelected(currentThemeIndex);
// Finally, redraw
draw();
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