[Scummvm-git-logs] scummvm master -> 2977ae546ec2602b486c40ba884b5dfd0d538e3c
tsoliman
tarek at bashasoliman.com
Fri Jun 9 20:19:00 CEST 2017
This automated email contains information about 4 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
255cd0452c ENGINES: Display savestate date as YYYY-MM-DD
231c263f70 GUI: Use dashes in default save description
7de8be411d GUI: Fix savegame thumbnail label layout
2977ae546e GUI: Improve calculation for savegame thumbnail labels
Commit: 255cd0452c1e84b080631c44413b34cb0ee6e172
https://github.com/scummvm/scummvm/commit/255cd0452c1e84b080631c44413b34cb0ee6e172
Author: Tarek Soliman (tsoliman at scummvm.org)
Date: 2017-06-09T13:15:38-05:00
Commit Message:
ENGINES: Display savestate date as YYYY-MM-DD
This avoids confusion in locales that use MM/DD/YYYY vs DD/MM/YYYY
Changed paths:
engines/savestate.cpp
diff --git a/engines/savestate.cpp b/engines/savestate.cpp
index 7366aa6..20a3758 100644
--- a/engines/savestate.cpp
+++ b/engines/savestate.cpp
@@ -43,7 +43,7 @@ void SaveStateDescriptor::setThumbnail(Graphics::Surface *t) {
}
void SaveStateDescriptor::setSaveDate(int year, int month, int day) {
- _saveDate = Common::String::format("%.2d.%.2d.%.4d", day, month, year);
+ _saveDate = Common::String::format("%.4d-%.2d-%.2d", year, month, day);
}
void SaveStateDescriptor::setSaveTime(int hour, int min) {
Commit: 231c263f708779bf6be3a8f38d9e0ff8438bc0e2
https://github.com/scummvm/scummvm/commit/231c263f708779bf6be3a8f38d9e0ff8438bc0e2
Author: Tarek Soliman (tsoliman at scummvm.org)
Date: 2017-06-09T13:16:46-05:00
Commit Message:
GUI: Use dashes in default save description
Closes gh-956
Changed paths:
gui/saveload.cpp
diff --git a/gui/saveload.cpp b/gui/saveload.cpp
index 2ac68dd..ba17dac 100644
--- a/gui/saveload.cpp
+++ b/gui/saveload.cpp
@@ -67,7 +67,7 @@ Common::String SaveLoadChooser::createDefaultSaveDescription(const int slot) con
g_system->getTimeAndDate(curTime);
curTime.tm_year += 1900; // fixup year
curTime.tm_mon++; // fixup month
- return Common::String::format("%04d.%02d.%02d / %02d:%02d:%02d", curTime.tm_year, curTime.tm_mon, curTime.tm_mday, curTime.tm_hour, curTime.tm_min, curTime.tm_sec);
+ return Common::String::format("%04d-%02d-%02d / %02d:%02d:%02d", curTime.tm_year, curTime.tm_mon, curTime.tm_mday, curTime.tm_hour, curTime.tm_min, curTime.tm_sec);
#else
return Common::String::format("Save %d", slot + 1);
#endif
Commit: 7de8be411ddb567f78ca4ceba945afa093258b34
https://github.com/scummvm/scummvm/commit/7de8be411ddb567f78ca4ceba945afa093258b34
Author: Tarek Soliman (tsoliman at scummvm.org)
Date: 2017-06-09T13:17:09-05:00
Commit Message:
GUI: Fix savegame thumbnail label layout
The Save/Load screen has a preview area with labels for date and time.
The bottom label was drawing past the bottom of the rect.
Changed paths:
gui/saveload-dialog.cpp
diff --git a/gui/saveload-dialog.cpp b/gui/saveload-dialog.cpp
index 4bd71d3..f159a12 100644
--- a/gui/saveload-dialog.cpp
+++ b/gui/saveload-dialog.cpp
@@ -475,9 +475,11 @@ void SaveLoadChooserSimple::reflowLayout() {
int textLines = 0;
if (!_saveDateSupport)
- textLines++;
+ textLines += 2;
if (!_playTimeSupport)
textLines++;
+ if (_saveDateSupport || _playTimeSupport)
+ textLines--; // add a line of padding at the bottom
_container->resize(x, y, w, h - (kLineHeight * textLines));
_gfxWidget->resize(thumbX, thumbY, thumbW, thumbH);
Commit: 2977ae546ec2602b486c40ba884b5dfd0d538e3c
https://github.com/scummvm/scummvm/commit/2977ae546ec2602b486c40ba884b5dfd0d538e3c
Author: Tarek Soliman (tsoliman at scummvm.org)
Date: 2017-06-09T13:17:09-05:00
Commit Message:
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
Changed paths:
gui/saveload-dialog.cpp
gui/themes/default.inc
gui/themes/scummclassic.zip
gui/themes/scummclassic/classic_layout.stx
gui/themes/scummmodern.zip
gui/themes/scummmodern/scummmodern_layout.stx
diff --git a/gui/saveload-dialog.cpp b/gui/saveload-dialog.cpp
index f159a12..4bf23b8 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 e68ebc0..23488a8 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 bff0388..acb6d20 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 9d9fe28..2bb07d9 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 983f727..055c82a 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 25a9584..0a1c377 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'>
More information about the Scummvm-git-logs
mailing list