diff options
Diffstat (limited to 'gui')
-rw-r--r-- | gui/ThemeModern.cpp | 8 | ||||
-rw-r--r-- | gui/about.cpp | 5 |
2 files changed, 4 insertions, 9 deletions
diff --git a/gui/ThemeModern.cpp b/gui/ThemeModern.cpp index cfe3a963a8..9b7df9ed59 100644 --- a/gui/ThemeModern.cpp +++ b/gui/ThemeModern.cpp @@ -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; } diff --git a/gui/about.cpp b/gui/about.cpp index 4271ca272b..0e4d1d5a90 100644 --- a/gui/about.cpp +++ b/gui/about.cpp @@ -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++) { |