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

svn-id: r25434
This commit is contained in:
Johannes Schickel 2007-02-09 00:02:49 +00:00
parent f8052bb650
commit 810056dcf6
2 changed files with 4 additions and 9 deletions

View File

@ -257,6 +257,7 @@ void ThemeModern::drawDialogBackground(const Common::Rect &r, uint16 hints, Stat
if ((hints & THEME_HINT_SAVE_BACKGROUND) && !(hints & THEME_HINT_FIRST_DRAW) && !_forceRedraw) {
restoreBackground(r2, true);
addDirtyRect(r2);
return;
}
@ -286,11 +287,9 @@ void ThemeModern::drawText(const Common::Rect &r, const Common::String &str, Sta
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 @@ void ThemeModern::drawText(const Common::Rect &r, const Common::String &str, Sta
}
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 @@ void ThemeModern::drawWidgetBackground(const Common::Rect &r, uint16 hints, Widg
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;
}

View File

@ -205,11 +205,6 @@ void AboutDialog::drawDialog() {
// 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++) {