GUI: Center-align titles

This commit is contained in:
av-dx 2021-07-02 12:58:32 +05:30 committed by Eugene Sandulenko
parent 7d1c3af603
commit 1fd21c7c7d

View File

@ -120,9 +120,9 @@ void GridItemWidget::drawWidget() {
if (_grid->_isTitlesVisible) {
int breakPoint = breakText(_activeEntry->title, thumbWidth);
g_gui.theme()->drawText(Common::Rect(_x, _y + thumbHeight, _x + thumbWidth, _y + thumbHeight + kLineHeight),
_activeEntry->title.substr(0, breakPoint), GUI::ThemeEngine::kStateEnabled ,Graphics::kTextAlignLeft);
_activeEntry->title.substr(0, breakPoint), GUI::ThemeEngine::kStateEnabled ,Graphics::kTextAlignCenter);
g_gui.theme()->drawText(Common::Rect(_x, _y + thumbHeight + kLineHeight, _x + thumbWidth, _y + thumbHeight + 2 * kLineHeight),
_activeEntry->title.substr(breakPoint + 1), GUI::ThemeEngine::kStateEnabled ,Graphics::kTextAlignLeft);
_activeEntry->title.substr(breakPoint + 1), GUI::ThemeEngine::kStateEnabled ,Graphics::kTextAlignCenter);
}
}