GUI: Improve calculation for savegame thumbnail labels
Instead of shrinking the rect based on how many labels aren't there, expand the rect based on how many labels are there. Closes gh-958
This commit is contained in:
parent
7de8be411d
commit
2977ae546e
6 changed files with 8 additions and 8 deletions
|
@ -474,14 +474,14 @@ void SaveLoadChooserSimple::reflowLayout() {
|
|||
int thumbY = y + kLineHeight;
|
||||
|
||||
int textLines = 0;
|
||||
if (!_saveDateSupport)
|
||||
if (_saveDateSupport)
|
||||
textLines += 2;
|
||||
if (!_playTimeSupport)
|
||||
if (_playTimeSupport)
|
||||
textLines++;
|
||||
if (_saveDateSupport || _playTimeSupport)
|
||||
textLines--; // add a line of padding at the bottom
|
||||
if (textLines > 0)
|
||||
textLines++; // add a line of padding at the bottom
|
||||
|
||||
_container->resize(x, y, w, h - (kLineHeight * textLines));
|
||||
_container->resize(x, y, w, h + (kLineHeight * textLines));
|
||||
_gfxWidget->resize(thumbX, thumbY, thumbW, thumbH);
|
||||
|
||||
int height = thumbY + thumbH + kLineHeight;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue