[Scummvm-cvs-logs] CVS: scummvm/gui ThemeNew.cpp,1.11,1.12 about.cpp,1.46,1.47
Johannes Schickel
lordhoto at users.sourceforge.net
Sun Jan 29 08:13:59 CET 2006
Update of /cvsroot/scummvm/scummvm/gui
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12084
Modified Files:
ThemeNew.cpp about.cpp
Log Message:
Ok this should fix now all problems with drawing bugs of texts.
Index: ThemeNew.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/ThemeNew.cpp,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- ThemeNew.cpp 29 Jan 2006 15:07:03 -0000 1.11
+++ ThemeNew.cpp 29 Jan 2006 16:12:58 -0000 1.12
@@ -300,11 +300,10 @@
void ThemeNew::drawText(const Common::Rect &r, const Common::String &str, kState state, kTextAlign align, bool inverted, int deltax, bool useEllipsis) {
if (!_initOk)
return;
- // FIXME:since the 'height' of the font seems not to be correct we just add 4 to it right now
- // that should fix redraw bugs with the about dialog
- Common::Rect r2(r.left, r.top, r.right, r.top+_font->getFontHeight()+4);
+ Common::Rect r2(r.left, r.top, r.right, r.top+_font->getFontHeight());
restoreBackground(r2);
+ r2.bottom += 4;
if (inverted) {
_screen.fillRect(r, _colors[kTextInvertedBackground]);
Index: about.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/about.cpp,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -d -r1.46 -r1.47
--- about.cpp 27 Jan 2006 15:43:23 -0000 1.46
+++ about.cpp 29 Jan 2006 16:12:59 -0000 1.47
@@ -249,7 +249,7 @@
while (*str && *str == ' ')
str++;
- g_gui.theme()->drawText(Common::Rect(_x + xOff, y, _x + _w - xOff, y + g_gui.theme()->getFontHeight() + 4), str, state, align, false, 0, false);
+ g_gui.theme()->drawText(Common::Rect(_x + xOff, y, _x + _w - xOff, y + g_gui.theme()->getFontHeight()), str, state, align, false, 0, false);
y += _lineHeight;
}
g_gui.theme()->resetDrawArea();
More information about the Scummvm-git-logs
mailing list