[Scummvm-cvs-logs] SF.net SVN: scummvm: [25434] scummvm/trunk/gui

lordhoto at users.sourceforge.net lordhoto at users.sourceforge.net
Fri Feb 9 01:02:50 CET 2007


Revision: 25434
          http://scummvm.svn.sourceforge.net/scummvm/?rev=25434&view=rev
Author:   lordhoto
Date:     2007-02-08 16:02:49 -0800 (Thu, 08 Feb 2007)

Log Message:
-----------
Fix for bug #1650993 ("GUI: About dialog scroller").

Modified Paths:
--------------
    scummvm/trunk/gui/ThemeModern.cpp
    scummvm/trunk/gui/about.cpp

Modified: scummvm/trunk/gui/ThemeModern.cpp
===================================================================
--- scummvm/trunk/gui/ThemeModern.cpp	2007-02-08 23:37:17 UTC (rev 25433)
+++ scummvm/trunk/gui/ThemeModern.cpp	2007-02-09 00:02:49 UTC (rev 25434)
@@ -257,6 +257,7 @@
 
 	if ((hints & THEME_HINT_SAVE_BACKGROUND) && !(hints & THEME_HINT_FIRST_DRAW) && !_forceRedraw) {
 		restoreBackground(r2, true);
+		addDirtyRect(r2);
 		return;
 	}
 
@@ -286,11 +287,9 @@
 	if (!_initOk)
 		return;
 
-	Common::Rect r2(r.left, r.top, r.right, r.top+getFontHeight(font));
 	uint32 color;
 
-	restoreBackground(r2);
-	r2.bottom += 4;
+	restoreBackground(r);
 
 	if (inverted) {
 		_screen.fillRect(r, _colors[kTextInvertedBackground]);
@@ -300,7 +299,7 @@
 	}
 
 	getFont(font)->drawString(&_screen, str, r.left, r.top, r.width(), color, convertAligment(align), deltax, useEllipsis);
-	addDirtyRect(r2);
+	addDirtyRect(r);
 }
 
 void ThemeModern::drawChar(const Common::Rect &r, byte ch, const Graphics::Font *font, State state) {
@@ -370,6 +369,7 @@
 
 	if ((hints & THEME_HINT_SAVE_BACKGROUND) && !(hints & THEME_HINT_FIRST_DRAW) && !_forceRedraw) {
 		restoreBackground((hints & THEME_HINT_USE_SHADOW) ? r2 : r);
+		addDirtyRect((hints & THEME_HINT_USE_SHADOW) ? r2 : r);
 		return;
 	}
 

Modified: scummvm/trunk/gui/about.cpp
===================================================================
--- scummvm/trunk/gui/about.cpp	2007-02-08 23:37:17 UTC (rev 25433)
+++ scummvm/trunk/gui/about.cpp	2007-02-09 00:02:49 UTC (rev 25434)
@@ -205,11 +205,6 @@
 	//       in the right way. Should be even faster...
 	const int firstLine = _scrollPos / _lineHeight;
 	const int lastLine = MIN((_scrollPos + _h) / _lineHeight + 1, (uint32)_lines.size());
-	// FIXME: There's some confusion here about the meaning of 'yOff'.
-	//        The setDrawArea call above makes it possible to render text
-	//        vertically from _y to _y+_h, while the line below assumes text
-	//        is drawn from _y+yOff down. This causes leftover pixels
-	//        the top while scrolling.
 	int y = _y + yOff - (_scrollPos % _lineHeight);
 
 	for (int line = firstLine; line < lastLine; line++) {


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