From 2977ae546ec2602b486c40ba884b5dfd0d538e3c Mon Sep 17 00:00:00 2001 From: Tarek Soliman Date: Fri, 2 Jun 2017 00:50:11 -0500 Subject: 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 --- gui/saveload-dialog.cpp | 10 +++++----- gui/themes/default.inc | 2 +- gui/themes/scummclassic.zip | Bin 129631 -> 129631 bytes gui/themes/scummclassic/classic_layout.stx | 2 +- gui/themes/scummmodern.zip | Bin 1649171 -> 1649171 bytes gui/themes/scummmodern/scummmodern_layout.stx | 2 +- 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 = "" "" "" "" "" diff --git a/gui/themes/scummclassic.zip b/gui/themes/scummclassic.zip index bff0388d3e..acb6d20a99 100644 Binary files a/gui/themes/scummclassic.zip and b/gui/themes/scummclassic.zip 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 @@ diff --git a/gui/themes/scummmodern.zip b/gui/themes/scummmodern.zip index 983f727f6a..055c82ad3c 100644 Binary files a/gui/themes/scummmodern.zip and b/gui/themes/scummmodern.zip 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 @@ -- cgit v1.2.3