aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTarek Soliman2017-06-02 00:50:11 -0500
committerTarek Soliman2017-06-09 13:17:09 -0500
commit2977ae546ec2602b486c40ba884b5dfd0d538e3c (patch)
tree09b81c6376e62570e699f8dc9fab4f9d1a44a2c5
parent7de8be411ddb567f78ca4ceba945afa093258b34 (diff)
downloadscummvm-rg350-2977ae546ec2602b486c40ba884b5dfd0d538e3c.tar.gz
scummvm-rg350-2977ae546ec2602b486c40ba884b5dfd0d538e3c.tar.bz2
scummvm-rg350-2977ae546ec2602b486c40ba884b5dfd0d538e3c.zip
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
-rw-r--r--gui/saveload-dialog.cpp10
-rw-r--r--gui/themes/default.inc2
-rw-r--r--gui/themes/scummclassic.zipbin129631 -> 129631 bytes
-rw-r--r--gui/themes/scummclassic/classic_layout.stx2
-rw-r--r--gui/themes/scummmodern.zipbin1649171 -> 1649171 bytes
-rw-r--r--gui/themes/scummmodern/scummmodern_layout.stx2
6 files changed, 8 insertions, 8 deletions
diff --git a/gui/saveload-dialog.cpp b/gui/saveload-dialog.cpp
index f159a12ff2..4bf23b8974 100644
--- a/gui/saveload-dialog.cpp
+++ b/gui/saveload-dialog.cpp
@@ -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;
diff --git a/gui/themes/default.inc b/gui/themes/default.inc
index e68ebc0530..23488a8cd0 100644
--- a/gui/themes/default.inc
+++ b/gui/themes/default.inc
@@ -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'>"
diff --git a/gui/themes/scummclassic.zip b/gui/themes/scummclassic.zip
index bff0388d3e..acb6d20a99 100644
--- a/gui/themes/scummclassic.zip
+++ b/gui/themes/scummclassic.zip
Binary files differ
diff --git a/gui/themes/scummclassic/classic_layout.stx b/gui/themes/scummclassic/classic_layout.stx
index 9d9fe28a16..2bb07d914c 100644
--- a/gui/themes/scummclassic/classic_layout.stx
+++ b/gui/themes/scummclassic/classic_layout.stx
@@ -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'>
diff --git a/gui/themes/scummmodern.zip b/gui/themes/scummmodern.zip
index 983f727f6a..055c82ad3c 100644
--- a/gui/themes/scummmodern.zip
+++ b/gui/themes/scummmodern.zip
Binary files differ
diff --git a/gui/themes/scummmodern/scummmodern_layout.stx b/gui/themes/scummmodern/scummmodern_layout.stx
index 25a95845aa..0a1c377aea 100644
--- a/gui/themes/scummmodern/scummmodern_layout.stx
+++ b/gui/themes/scummmodern/scummmodern_layout.stx
@@ -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'>