GUI: RTL: Fix small issues

- Remove unused variable in tab.cpp
- Remove wrong check for alignment in popups. For rtl, set align to right.
This commit is contained in:
aryanrawlani28 2020-06-21 23:28:08 +05:30 committed by Eugene Sandulenko
parent 86c11597b8
commit e3db189f0b
2 changed files with 1 additions and 8 deletions

View file

@ -405,12 +405,7 @@ void PopUpDialog::drawMenuEntry(int entry, bool hilite) {
r2.left = g_system->getOverlayWidth() - r2.left - w + g_gui.getOverlayOffset();
r2.right = r2.left + w;
if (_boss->getFlags() == 305) {
alignment = Graphics::kTextAlignCenter; // GUI FIXME: This is not a good way to say that I am a DropDownButtonWidget
} else {
alignment = Graphics::kTextAlignRight;
}
alignment = Graphics::kTextAlignRight;
pad = _rightPadding;
}

View file

@ -386,11 +386,9 @@ void TabWidget::reflowLayout() {
void TabWidget::drawWidget() {
Common::Array<Common::String> tabs;
Common::Array<int> widths;
int totalWidth = 0;
for (int i = _firstVisibleTab; i <= _lastVisibleTab; ++i) {
tabs.push_back(_tabs[i].title);
widths.push_back(_tabs[i]._tabWidth);
totalWidth += _tabs[i]._tabWidth;
}
g_gui.theme()->drawDialogBackground(