GUI: RTL: Fix lists being overdrawn when tooltip focused

This commit is contained in:
aryanrawlani28
2020-06-22 00:03:02 +02:00
committed by Eugene Sandulenko
parent cef4f20eec
commit aa802df7aa
+8 -2
View File
@@ -572,15 +572,21 @@ void ListWidget::drawWidget() {
color = _listColors[_listIndex[pos]];
}
Common::Rect r1(_x + r.left, y, _x + r.right, y + fontHeight - 2);
if (g_gui.useRTL() && _numberingMode == kListNumberingOff && _scrollBar->isVisible()) {
r1.translate(_scrollBarWidth, 0);
}
if (_selectedItem == pos && _editMode) {
buffer = _editString;
color = _editColor;
adjustOffset();
g_gui.theme()->drawText(Common::Rect(_x + r.left, y, _x + r.right, y + fontHeight - 2), buffer, _state,
g_gui.theme()->drawText(r1, buffer, _state,
alignment, inverted, pad, true, ThemeEngine::kFontStyleBold, color);
} else {
buffer = _list[pos];
g_gui.theme()->drawText(Common::Rect(_x + r.left, y, _x + r.right, y + fontHeight - 2), buffer, _state,
g_gui.theme()->drawText(r1, buffer, _state,
alignment, inverted, pad, true, ThemeEngine::kFontStyleBold, color);
}
}