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 thumbY = y + kLineHeight;
|
||||||
|
|
||||||
int textLines = 0;
|
int textLines = 0;
|
||||||
if (!_saveDateSupport)
|
if (_saveDateSupport)
|
||||||
textLines += 2;
|
textLines += 2;
|
||||||
if (!_playTimeSupport)
|
if (_playTimeSupport)
|
||||||
textLines++;
|
textLines++;
|
||||||
if (_saveDateSupport || _playTimeSupport)
|
if (textLines > 0)
|
||||||
textLines--; // add a line of padding at the bottom
|
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);
|
_gfxWidget->resize(thumbX, thumbY, thumbW, thumbH);
|
||||||
|
|
||||||
int height = thumbY + thumbH + kLineHeight;
|
int height = thumbY + thumbH + kLineHeight;
|
||||||
|
|
|
@ -1829,7 +1829,7 @@ const char *defaultXML1 = "<?xml version = '1.0'?>"
|
||||||
"<widget name='List' />"
|
"<widget name='List' />"
|
||||||
"<widget name='Thumbnail' "
|
"<widget name='Thumbnail' "
|
||||||
"width='180' "
|
"width='180' "
|
||||||
"height='200' "
|
"height='155' "
|
||||||
"/>"
|
"/>"
|
||||||
"</layout>"
|
"</layout>"
|
||||||
"<layout type='horizontal' padding='0,0,0,0'>"
|
"<layout type='horizontal' padding='0,0,0,0'>"
|
||||||
|
|
Binary file not shown.
|
@ -1285,7 +1285,7 @@
|
||||||
<widget name = 'List' />
|
<widget name = 'List' />
|
||||||
<widget name = 'Thumbnail'
|
<widget name = 'Thumbnail'
|
||||||
width = '180'
|
width = '180'
|
||||||
height = '200'
|
height = '155'
|
||||||
/>
|
/>
|
||||||
</layout>
|
</layout>
|
||||||
<layout type = 'horizontal' padding = '0, 0, 0, 0'>
|
<layout type = 'horizontal' padding = '0, 0, 0, 0'>
|
||||||
|
|
Binary file not shown.
|
@ -1299,7 +1299,7 @@
|
||||||
<widget name = 'List' />
|
<widget name = 'List' />
|
||||||
<widget name = 'Thumbnail'
|
<widget name = 'Thumbnail'
|
||||||
width = '180'
|
width = '180'
|
||||||
height = '200'
|
height = '155'
|
||||||
/>
|
/>
|
||||||
</layout>
|
</layout>
|
||||||
<layout type = 'horizontal' padding = '0, 0, 0, 0'>
|
<layout type = 'horizontal' padding = '0, 0, 0, 0'>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue