[Scummvm-git-logs] scummvm branch-2-7 -> ab39b8f47de7bc77d6ab8dc454133f8bfa7e14c7
sev-
noreply at scummvm.org
Sun Mar 19 23:21:11 UTC 2023
This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
43bafcb31b GUI: Add a resolution property for layouts
ac624a7637 GUI: Allow comparing the width with the height in resolution checks
ab39b8f47d GUI: Add a portrait version of the launcher
Commit: 43bafcb31b00fb3191d367f9cccc28922f686217
https://github.com/scummvm/scummvm/commit/43bafcb31b00fb3191d367f9cccc28922f686217
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2023-03-20T00:19:56+01:00
Commit Message:
GUI: Add a resolution property for layouts
Changed paths:
gui/ThemeParser.cpp
gui/ThemeParser.h
diff --git a/gui/ThemeParser.cpp b/gui/ThemeParser.cpp
index 2a47f08db8a..d42c88fed0e 100644
--- a/gui/ThemeParser.cpp
+++ b/gui/ThemeParser.cpp
@@ -813,6 +813,11 @@ bool ThemeParser::parserCallback_import(ParserNode *node) {
}
bool ThemeParser::parserCallback_layout(ParserNode *node) {
+ if (resolutionCheck(node->values["resolution"]) == false) {
+ node->ignore = true;
+ return true;
+ }
+
int spacing = -1;
if (node->values.contains("spacing")) {
diff --git a/gui/ThemeParser.h b/gui/ThemeParser.h
index a117966d94e..661154dd801 100644
--- a/gui/ThemeParser.h
+++ b/gui/ThemeParser.h
@@ -204,6 +204,7 @@ protected:
XML_PROP(align, false)
XML_PROP(padding, false)
XML_PROP(spacing, false)
+ XML_PROP(resolution, false)
XML_KEY(import)
XML_PROP(layout, true)
Commit: ac624a7637b26b33c952bd99945b7a889e114676
https://github.com/scummvm/scummvm/commit/ac624a7637b26b33c952bd99945b7a889e114676
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2023-03-20T00:20:05+01:00
Commit Message:
GUI: Allow comparing the width with the height in resolution checks
Changed paths:
gui/ThemeParser.cpp
diff --git a/gui/ThemeParser.cpp b/gui/ThemeParser.cpp
index d42c88fed0e..99cef0efc2c 100644
--- a/gui/ThemeParser.cpp
+++ b/gui/ThemeParser.cpp
@@ -1091,6 +1091,10 @@ bool ThemeParser::resolutionCheck(const Common::String &resolution) {
// theme by default
token = 375;
#endif
+ } else if (cur[offset] == 'x') {
+ token = _baseWidth;
+ } else if (cur[offset] == 'y') {
+ token = _baseHeight;
} else {
token = atoi(cur.c_str() + offset);
}
Commit: ab39b8f47de7bc77d6ab8dc454133f8bfa7e14c7
https://github.com/scummvm/scummvm/commit/ab39b8f47de7bc77d6ab8dc454133f8bfa7e14c7
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2023-03-20T00:20:13+01:00
Commit Message:
GUI: Add a portrait version of the launcher
Changed paths:
gui/themes/common/highres_layout.stx
diff --git a/gui/themes/common/highres_layout.stx b/gui/themes/common/highres_layout.stx
index f516b89d5e9..688b8b2da73 100644
--- a/gui/themes/common/highres_layout.stx
+++ b/gui/themes/common/highres_layout.stx
@@ -150,7 +150,7 @@
/>
</globals>
- <dialog name = 'Launcher' overlays = 'screen'>
+ <dialog name = 'Launcher' overlays = 'screen' resolution = 'y<=x'>
<layout type = 'vertical' align = 'center' padding = '23, 23, 8, 40'>
<widget name = 'Logo'
width = '287'
@@ -238,6 +238,90 @@
</layout>
</dialog>
+ <dialog name = 'Launcher' overlays = 'screen' resolution = 'y>x'>
+ <layout type = 'vertical' align = 'center' padding = '23, 23, 8, 92'>
+ <widget name = 'Logo'
+ width = '287'
+ height = '80'
+ rtl = 'no'
+ />
+ <layout type = 'horizontal' spacing = '5' padding = '10, 0, 0, 0'>
+ <widget name = 'SearchPic'
+ width = '16'
+ height = '17'
+ rtl = 'no'
+ />
+ <widget name = 'Search'
+ width = '120'
+ height = 'Globals.Line.Height'
+ />
+ <widget name = 'SearchClearButton'
+ height = 'Globals.Line.Height'
+ width = 'Globals.Line.Height'
+ />
+ <space size = '5' />
+ <widget name = 'GroupPic'
+ width = '17'
+ height = '17'
+ rtl = 'no'
+ />
+ <widget name = 'laGroupPopup'
+ width = '100'
+ type = 'PopUp'
+ />
+ <space />
+ <widget name = 'Version'
+ width = '310'
+ height = 'Globals.Line.Height'
+ textalign = 'center'
+ />
+ <space />
+ </layout>
+ <layout type = 'horizontal' padding = '0, 0, 2, 0' spacing = '2'>
+ <widget name = 'GameList'/>
+ </layout>
+ <layout type = 'horizontal' padding = '0, 0, 2, 0' spacing = '2'>
+ <widget name = 'LoadGameButton'
+ height = 'Globals.Button.Height'
+ />
+ <widget name = 'AddGameButton'
+ height = 'Globals.Button.Height'
+ />
+ <widget name = 'EditGameButton'
+ height = 'Globals.Button.Height'
+ />
+ <widget name = 'RemoveGameButton'
+ height = 'Globals.Button.Height'
+ />
+ </layout>
+ <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '2'>
+ <widget name = 'QuitButton'
+ height = 'Globals.Button.Height'
+ />
+ <widget name = 'AboutButton'
+ height = 'Globals.Button.Height'
+ />
+ <widget name = 'OptionsButton'
+ height = 'Globals.Button.Height'
+ />
+ <widget name = 'StartButton'
+ height = 'Globals.Button.Height'
+ />
+ </layout>
+ <layout type = 'horizontal' padding = '0, 0, 6, 0' spacing = '2'>
+ <widget name = 'ListSwitch'
+ height = 'Globals.Button.Height'
+ width = 'Globals.Button.Height'
+ />
+ <widget name = 'GridSwitch'
+ height = 'Globals.Button.Height'
+ width = 'Globals.Button.Height'
+ />
+ <space />
+ </layout>
+ </layout>
+ </dialog>
+
<dialog name = 'LauncherGrid' overlays = 'screen'>
<layout type = 'vertical' align = 'center' padding = '23, 23, 8, 40'>
<widget name = 'Logo'
More information about the Scummvm-git-logs
mailing list