diff options
author | Alexander Tkachev | 2016-06-22 17:27:32 +0600 |
---|---|---|
committer | Eugene Sandulenko | 2016-07-03 12:17:26 +0200 |
commit | 425d963bd3c927e529efdfed817960dec8de4552 (patch) | |
tree | b8fbab0b0c31609170e3a25ef1a8d7739e5ce2c3 /gui | |
parent | b946ef8598b96631057beffddbf35b627fa25b8d (diff) | |
download | scummvm-rg350-425d963bd3c927e529efdfed817960dec8de4552.tar.gz scummvm-rg350-425d963bd3c927e529efdfed817960dec8de4552.tar.bz2 scummvm-rg350-425d963bd3c927e529efdfed817960dec8de4552.zip |
GUI: Fix ThemeItemTextData's dirty rectangle
Diffstat (limited to 'gui')
-rw-r--r-- | gui/ThemeEngine.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/gui/ThemeEngine.cpp b/gui/ThemeEngine.cpp index 037940dfd4..a38e565f6c 100644 --- a/gui/ThemeEngine.cpp +++ b/gui/ThemeEngine.cpp @@ -276,15 +276,19 @@ void ThemeItemDrawDataClip::drawSelf(bool draw, bool restore) { } void ThemeItemTextData::drawSelf(bool draw, bool restore) { + Common::Rect dirty = _textDrawableArea; + if (dirty.isEmpty()) dirty = _area; + else dirty.clip(_area); + if (_restoreBg || restore) - _engine->restoreBackground(_area); + _engine->restoreBackground(dirty); if (draw) { _engine->renderer()->setFgColor(_color->r, _color->g, _color->b); _engine->renderer()->drawString(_data->_fontPtr, _text, _area, _alignH, _alignV, _deltax, _ellipsis, _textDrawableArea); } - _engine->addDirtyRect(_area); + _engine->addDirtyRect(dirty); } void ThemeItemBitmap::drawSelf(bool draw, bool restore) { @@ -1414,12 +1418,12 @@ void ThemeEngine::drawTextClip(const Common::Rect &r, const Common::Rect &clippi switch (inverted) { case kTextInversion: - queueDD(kDDTextSelectionBackground, r); + queueDDClip(kDDTextSelectionBackground, r, clippingArea); restore = false; break; case kTextInversionFocus: - queueDD(kDDTextSelectionFocusBackground, r); + queueDDClip(kDDTextSelectionFocusBackground, r, clippingArea); restore = false; break; |