Skip to content

Commit

Permalink
GUI: Improve calculation for savegame thumbnail labels
Browse files Browse the repository at this point in the history
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
  • Loading branch information
tsoliman committed Jun 9, 2017
1 parent 7de8be4 commit 2977ae5
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions gui/saveload-dialog.cpp
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion gui/themes/default.inc
Expand Up @@ -1829,7 +1829,7 @@ const char *defaultXML1 = "<?xml version = '1.0'?>"
"<widget name='List' />"
"<widget name='Thumbnail' "
"width='180' "
"height='200' "
"height='155' "
"/>"
"</layout>"
"<layout type='horizontal' padding='0,0,0,0'>"
Expand Down
Binary file modified gui/themes/scummclassic.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion gui/themes/scummclassic/classic_layout.stx
Expand Up @@ -1285,7 +1285,7 @@
<widget name = 'List' />
<widget name = 'Thumbnail'
width = '180'
height = '200'
height = '155'
/>
</layout>
<layout type = 'horizontal' padding = '0, 0, 0, 0'>
Expand Down
Binary file modified gui/themes/scummmodern.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion gui/themes/scummmodern/scummmodern_layout.stx
Expand Up @@ -1299,7 +1299,7 @@
<widget name = 'List' />
<widget name = 'Thumbnail'
width = '180'
height = '200'
height = '155'
/>
</layout>
<layout type = 'horizontal' padding = '0, 0, 0, 0'>
Expand Down

0 comments on commit 2977ae5

Please sign in to comment.