[Scummvm-git-logs] scummvm master -> a56383e699f2cbb10e5eb9b15c5cbc371d33aac8

bgK bastien.bouclet at gmail.com
Thu Jan 30 06:35:23 UTC 2020


This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
f7a934b687 GUI: Use a default size for dialogs when the overlayed dialog has not been sized
a56383e699 TESTBED: Use a dedicated dialog layout for the configuration dialog


Commit: f7a934b6873898313c904cb1258ff93dba6e7509
    https://github.com/scummvm/scummvm/commit/f7a934b6873898313c904cb1258ff93dba6e7509
Author: Bastien Bouclet (bastien.bouclet at gmail.com)
Date: 2020-01-30T07:34:27+01:00

Commit Message:
GUI: Use a default size for dialogs when the overlayed dialog has not been sized

Some dialogs overlay the launcher's game list. However, the launcher is
not always shown and as such is not always layed out. Laying out the
dependent dialogs would fail. This problem was indroduced with the
dynamic layout system. Previously the dialogs were layed out eagerly on
theme initialization. Which is no longer possible as dialogs now need to
be initialized to be layed out.

Changed paths:
    gui/ThemeLayout.cpp


diff --git a/gui/ThemeLayout.cpp b/gui/ThemeLayout.cpp
index fa432bd..4a825d1 100644
--- a/gui/ThemeLayout.cpp
+++ b/gui/ThemeLayout.cpp
@@ -232,6 +232,14 @@ void ThemeLayoutMain::reflowLayout(Widget *widgetChain) {
 		if (!g_gui.xmlEval()->getWidgetData(_overlays, _x, _y, (uint16 &) _w, (uint16 &) _h)) {
 			warning("Unable to retrieve overlayed dialog position %s", _overlays.c_str());
 		}
+
+		if (_w == -1 || _h == -1) {
+			warning("The overlayed dialog %s has not been sized, using a default size for %s", _overlays.c_str(), _name.c_str());
+			_x = g_system->getOverlayWidth()      / 10;
+			_y = g_system->getOverlayHeight()     / 10;
+			_w = g_system->getOverlayWidth()  * 8 / 10;
+			_h = g_system->getOverlayHeight() * 8 / 10;
+		}
 	}
 
 	if (_x >= 0) _x += _inset;


Commit: a56383e699f2cbb10e5eb9b15c5cbc371d33aac8
    https://github.com/scummvm/scummvm/commit/a56383e699f2cbb10e5eb9b15c5cbc371d33aac8
Author: Bastien Bouclet (bastien.bouclet at gmail.com)
Date: 2020-01-30T07:34:27+01:00

Commit Message:
TESTBED: Use a dedicated dialog layout for the configuration dialog

The testbed configuration dialog was previously re-using the browser
dialog. That dialog is defined to overlay the game list from the launcher
screen. However, while in the testbed engine the dimensions of
the layout of the launcher dialog may have been lost, causing the
configuration dialog to fail to layout.

Changed paths:
    engines/testbed/config.cpp
    gui/ThemeEngine.h
    gui/themes/default.inc
    gui/themes/scummclassic.zip
    gui/themes/scummclassic/THEMERC
    gui/themes/scummclassic/classic_layout.stx
    gui/themes/scummclassic/classic_layout_lowres.stx
    gui/themes/scummmodern.zip
    gui/themes/scummmodern/THEMERC
    gui/themes/scummmodern/scummmodern_layout.stx
    gui/themes/scummmodern/scummmodern_layout_lowres.stx
    gui/themes/scummremastered.zip
    gui/themes/scummremastered/THEMERC
    gui/themes/scummremastered/remastered_layout.stx
    gui/themes/scummremastered/remastered_layout_lowres.stx


diff --git a/engines/testbed/config.cpp b/engines/testbed/config.cpp
index efc0d30..4831eb8 100644
--- a/engines/testbed/config.cpp
+++ b/engines/testbed/config.cpp
@@ -30,10 +30,12 @@
 
 namespace Testbed {
 
-TestbedOptionsDialog::TestbedOptionsDialog(Common::Array<Testsuite *> &tsList, TestbedConfigManager *tsConfMan) : GUI::Dialog("Browser"), _testbedConfMan(tsConfMan) {
+TestbedOptionsDialog::TestbedOptionsDialog(Common::Array<Testsuite *> &tsList, TestbedConfigManager *tsConfMan) :
+		GUI::Dialog("TestbedOptions"),
+		_testbedConfMan(tsConfMan) {
 
-	new GUI::StaticTextWidget(this, "Browser.Headline", "Select Testsuites to Execute");
-	new GUI::StaticTextWidget(this, "Browser.Path", "Use Doubleclick to select/deselect");
+	new GUI::StaticTextWidget(this, "TestbedOptions.Headline", "Select Testsuites to Execute");
+	new GUI::StaticTextWidget(this, "TestbedOptions.Info", "Use Doubleclick to select/deselect");
 
 	// Construct a String Array
 	Common::Array<Testsuite *>::const_iterator iter;
@@ -53,7 +55,7 @@ TestbedOptionsDialog::TestbedOptionsDialog(Common::Array<Testsuite *> &tsList, T
 		}
 	}
 
-	_testListDisplay = new TestbedListWidget(this, "Browser.List", _testSuiteArray);
+	_testListDisplay = new TestbedListWidget(this, "TestbedOptions.List", _testSuiteArray);
 	_testListDisplay->setNumberingMode(GUI::kListNumberingOff);
 	_testListDisplay->setList(_testSuiteDescArray, &_colors);
 
@@ -61,12 +63,12 @@ TestbedOptionsDialog::TestbedOptionsDialog(Common::Array<Testsuite *> &tsList, T
 	_testListDisplay->setEditable(false);
 
 	if (selected > (tsList.size() - selected)) {
-		_selectButton = new GUI::ButtonWidget(this, "Browser.Up", "Deselect All", 0, kTestbedDeselectAll, 0);
+		_selectButton = new GUI::ButtonWidget(this, "TestbedOptions.SelectAll", "Deselect All", 0, kTestbedDeselectAll, 0);
 	} else {
-		_selectButton = new GUI::ButtonWidget(this, "Browser.Up", "Select All", 0, kTestbedSelectAll, 0);
+		_selectButton = new GUI::ButtonWidget(this, "TestbedOptions.SelectAll", "Select All", 0, kTestbedSelectAll, 0);
 	}
-	new GUI::ButtonWidget(this, "Browser.Cancel", "Run tests", 0, GUI::kCloseCmd);
-	new GUI::ButtonWidget(this, "Browser.Choose", "Exit Testbed", 0, kTestbedQuitCmd);
+	new GUI::ButtonWidget(this, "TestbedOptions.RunTests", "Run tests", 0, GUI::kCloseCmd);
+	new GUI::ButtonWidget(this, "TestbedOptions.Quit", "Exit Testbed", 0, kTestbedQuitCmd);
 }
 
 TestbedOptionsDialog::~TestbedOptionsDialog() {}
diff --git a/gui/ThemeEngine.h b/gui/ThemeEngine.h
index 8a218fd..b550e45 100644
--- a/gui/ThemeEngine.h
+++ b/gui/ThemeEngine.h
@@ -37,7 +37,7 @@
 #include "graphics/pixelformat.h"
 
 
-#define SCUMMVM_THEME_VERSION_STR "SCUMMVM_STX0.8.32"
+#define SCUMMVM_THEME_VERSION_STR "SCUMMVM_STX0.8.33"
 
 class OSystem;
 
diff --git a/gui/themes/default.inc b/gui/themes/default.inc
index b04cc78..c49293f 100644
--- a/gui/themes/default.inc
+++ b/gui/themes/default.inc
@@ -2660,6 +2660,34 @@ const char *defaultXML1 = "<?xml version = '1.0'?>"
 "</layout>"
 "</layout>"
 "</dialog>"
+"<dialog name='TestbedOptions' overlays='screen_center'>"
+"<layout type='vertical' padding='8,8,8,8'>"
+"<widget name='Headline' "
+"height='Globals.Line.Height' "
+"width='400' "
+"/>"
+"<widget name='Info' "
+"height='Globals.Line.Height' "
+"/>"
+"<widget name='List' "
+"height='200' "
+"/>"
+"<layout type='vertical' padding='0,0,16,0'>"
+"<layout type='horizontal' padding='0,0,0,0'>"
+"<widget name='SelectAll' "
+"type='Button' "
+"/>"
+"<space/>"
+"<widget name='RunTests' "
+"type='Button' "
+"/>"
+"<widget name='Quit' "
+"type='Button' "
+"/>"
+"</layout>"
+"</layout>"
+"</layout>"
+"</dialog>"
 "</layout_info>"
 ;
  const char *defaultXML4 = "<layout_info resolution='y<400'>"
@@ -4377,6 +4405,32 @@ const char *defaultXML1 = "<?xml version = '1.0'?>"
 "</layout>"
 "</layout>"
 "</dialog>"
+"<dialog name='TestbedOptions' overlays='screen' inset='8' shading='dim'>"
+"<layout type='vertical' padding='8,8,8,8'>"
+"<widget name='Headline' "
+"height='Globals.Line.Height' "
+"/>"
+"<widget name='Info' "
+"height='Globals.Line.Height' "
+"/>"
+"<widget name='List' "
+"/>"
+"<layout type='vertical' padding='0,0,8,0'>"
+"<layout type='horizontal' padding='0,0,0,0'>"
+"<widget name='SelectAll' "
+"type='Button' "
+"/>"
+"<space/>"
+"<widget name='RunTests' "
+"type='Button' "
+"/>"
+"<widget name='Quit' "
+"type='Button' "
+"/>"
+"</layout>"
+"</layout>"
+"</layout>"
+"</dialog>"
 "</layout_info>"
 ;
 const char *defaultXML[] = { defaultXML1, defaultXML2, defaultXML3, defaultXML4 };
diff --git a/gui/themes/scummclassic.zip b/gui/themes/scummclassic.zip
index a445617..93f8484 100644
Binary files a/gui/themes/scummclassic.zip and b/gui/themes/scummclassic.zip differ
diff --git a/gui/themes/scummclassic/THEMERC b/gui/themes/scummclassic/THEMERC
index b1548e4..8f6f4fe 100644
--- a/gui/themes/scummclassic/THEMERC
+++ b/gui/themes/scummclassic/THEMERC
@@ -1 +1 @@
-[SCUMMVM_STX0.8.32:ScummVM Classic Theme:No Author]
+[SCUMMVM_STX0.8.33:ScummVM Classic Theme:No Author]
diff --git a/gui/themes/scummclassic/classic_layout.stx b/gui/themes/scummclassic/classic_layout.stx
index 3b58fb0..cca15cc 100644
--- a/gui/themes/scummclassic/classic_layout.stx
+++ b/gui/themes/scummclassic/classic_layout.stx
@@ -1833,4 +1833,34 @@
 			</layout>
 		</layout>
 	</dialog>
+
+	<dialog name = 'TestbedOptions' overlays = 'screen_center'>
+		<layout type = 'vertical' padding = '8, 8, 8, 8'>
+			<widget name = 'Headline'
+					height = 'Globals.Line.Height'
+					width = '400'
+			/>
+			<widget name = 'Info'
+					height = 'Globals.Line.Height'
+			/>
+			<widget name = 'List'
+					height = '200'
+					/>
+			<layout type = 'vertical' padding = '0, 0, 16, 0'>
+				<layout type = 'horizontal' padding = '0, 0, 0, 0'>
+					<widget name = 'SelectAll'
+							type = 'Button'
+					/>
+					<space/>
+					<widget name = 'RunTests'
+							type = 'Button'
+					/>
+					<widget name = 'Quit'
+							type = 'Button'
+					/>
+				</layout>
+			</layout>
+		</layout>
+	</dialog>
+
 </layout_info>
diff --git a/gui/themes/scummclassic/classic_layout_lowres.stx b/gui/themes/scummclassic/classic_layout_lowres.stx
index 74ef157..86a7776 100644
--- a/gui/themes/scummclassic/classic_layout_lowres.stx
+++ b/gui/themes/scummclassic/classic_layout_lowres.stx
@@ -1802,4 +1802,32 @@
 			</layout>
 		</layout>
 	</dialog>
+
+	<dialog name = 'TestbedOptions' overlays = 'screen' inset = '8' shading = 'dim'>
+		<layout type = 'vertical' padding = '8, 8, 8, 8'>
+			<widget name = 'Headline'
+					height = 'Globals.Line.Height'
+			/>
+			<widget name = 'Info'
+					height = 'Globals.Line.Height'
+			/>
+			<widget name = 'List'
+					/>
+			<layout type = 'vertical' padding = '0, 0, 8, 0'>
+				<layout type = 'horizontal' padding = '0, 0, 0, 0'>
+					<widget name = 'SelectAll'
+							type = 'Button'
+					/>
+					<space/>
+					<widget name = 'RunTests'
+							type = 'Button'
+					/>
+					<widget name = 'Quit'
+							type = 'Button'
+					/>
+				</layout>
+			</layout>
+		</layout>
+	</dialog>
+
 </layout_info>
diff --git a/gui/themes/scummmodern.zip b/gui/themes/scummmodern.zip
index ac7d903..b003e85 100644
Binary files a/gui/themes/scummmodern.zip and b/gui/themes/scummmodern.zip differ
diff --git a/gui/themes/scummmodern/THEMERC b/gui/themes/scummmodern/THEMERC
index f599ce7..d040620 100644
--- a/gui/themes/scummmodern/THEMERC
+++ b/gui/themes/scummmodern/THEMERC
@@ -1 +1 @@
-[SCUMMVM_STX0.8.32:ScummVM Modern Theme:No Author]
+[SCUMMVM_STX0.8.33:ScummVM Modern Theme:No Author]
diff --git a/gui/themes/scummmodern/scummmodern_layout.stx b/gui/themes/scummmodern/scummmodern_layout.stx
index f4011a4..7d1016c 100644
--- a/gui/themes/scummmodern/scummmodern_layout.stx
+++ b/gui/themes/scummmodern/scummmodern_layout.stx
@@ -1849,4 +1849,33 @@
 		</layout>
 	</dialog>
 
+	<dialog name = 'TestbedOptions' overlays = 'screen_center'>
+		<layout type = 'vertical' padding = '8, 8, 8, 8'>
+			<widget name = 'Headline'
+					height = 'Globals.Line.Height'
+					width = '400'
+			/>
+			<widget name = 'Info'
+					height = 'Globals.Line.Height'
+			/>
+			<widget name = 'List'
+					height = '200'
+					/>
+			<layout type = 'vertical' padding = '0, 0, 16, 0'>
+				<layout type = 'horizontal' padding = '0, 0, 0, 0'>
+					<widget name = 'SelectAll'
+							type = 'Button'
+					/>
+					<space/>
+					<widget name = 'RunTests'
+							type = 'Button'
+					/>
+					<widget name = 'Quit'
+							type = 'Button'
+					/>
+				</layout>
+			</layout>
+		</layout>
+	</dialog>
+
 </layout_info>
diff --git a/gui/themes/scummmodern/scummmodern_layout_lowres.stx b/gui/themes/scummmodern/scummmodern_layout_lowres.stx
index b0c2b8d..8a058b4 100644
--- a/gui/themes/scummmodern/scummmodern_layout_lowres.stx
+++ b/gui/themes/scummmodern/scummmodern_layout_lowres.stx
@@ -1822,4 +1822,32 @@
 			</layout>
 		</layout>
 	</dialog>
+
+	<dialog name = 'TestbedOptions' overlays = 'screen' inset = '8' shading = 'dim'>
+		<layout type = 'vertical' padding = '8, 8, 8, 8'>
+			<widget name = 'Headline'
+					height = 'Globals.Line.Height'
+			/>
+			<widget name = 'Info'
+					height = 'Globals.Line.Height'
+			/>
+			<widget name = 'List'
+					/>
+			<layout type = 'vertical' padding = '0, 0, 8, 0'>
+				<layout type = 'horizontal' padding = '0, 0, 0, 0'>
+					<widget name = 'SelectAll'
+							type = 'Button'
+					/>
+					<space/>
+					<widget name = 'RunTests'
+							type = 'Button'
+					/>
+					<widget name = 'Quit'
+							type = 'Button'
+					/>
+				</layout>
+			</layout>
+		</layout>
+	</dialog>
+
 </layout_info>
diff --git a/gui/themes/scummremastered.zip b/gui/themes/scummremastered.zip
index 0347860..6f04cb4 100644
Binary files a/gui/themes/scummremastered.zip and b/gui/themes/scummremastered.zip differ
diff --git a/gui/themes/scummremastered/THEMERC b/gui/themes/scummremastered/THEMERC
index 356de74..dbb779f 100644
--- a/gui/themes/scummremastered/THEMERC
+++ b/gui/themes/scummremastered/THEMERC
@@ -1 +1 @@
-[SCUMMVM_STX0.8.32:ScummVM Modern Theme Remastered:No Author]
+[SCUMMVM_STX0.8.33:ScummVM Modern Theme Remastered:No Author]
diff --git a/gui/themes/scummremastered/remastered_layout.stx b/gui/themes/scummremastered/remastered_layout.stx
index 11e1bdb..009ba13 100644
--- a/gui/themes/scummremastered/remastered_layout.stx
+++ b/gui/themes/scummremastered/remastered_layout.stx
@@ -1849,4 +1849,33 @@
 		</layout>
 	</dialog>
 
+	<dialog name = 'TestbedOptions' overlays = 'screen_center'>
+		<layout type = 'vertical' padding = '8, 8, 8, 8'>
+			<widget name = 'Headline'
+					height = 'Globals.Line.Height'
+					width = '400'
+			/>
+			<widget name = 'Info'
+					height = 'Globals.Line.Height'
+			/>
+			<widget name = 'List'
+					height = '200'
+					/>
+			<layout type = 'vertical' padding = '0, 0, 16, 0'>
+				<layout type = 'horizontal' padding = '0, 0, 0, 0'>
+					<widget name = 'SelectAll'
+							type = 'Button'
+					/>
+					<space/>
+					<widget name = 'RunTests'
+							type = 'Button'
+					/>
+					<widget name = 'Quit'
+							type = 'Button'
+					/>
+				</layout>
+			</layout>
+		</layout>
+	</dialog>
+
 </layout_info>
diff --git a/gui/themes/scummremastered/remastered_layout_lowres.stx b/gui/themes/scummremastered/remastered_layout_lowres.stx
index e7963f5..220ad64 100644
--- a/gui/themes/scummremastered/remastered_layout_lowres.stx
+++ b/gui/themes/scummremastered/remastered_layout_lowres.stx
@@ -1822,4 +1822,32 @@
 			</layout>
 		</layout>
 	</dialog>
+
+	<dialog name = 'TestbedOptions' overlays = 'screen' inset = '8' shading = 'dim'>
+		<layout type = 'vertical' padding = '8, 8, 8, 8'>
+			<widget name = 'Headline'
+					height = 'Globals.Line.Height'
+			/>
+			<widget name = 'Info'
+					height = 'Globals.Line.Height'
+			/>
+			<widget name = 'List'
+					/>
+			<layout type = 'vertical' padding = '0, 0, 8, 0'>
+				<layout type = 'horizontal' padding = '0, 0, 0, 0'>
+					<widget name = 'SelectAll'
+							type = 'Button'
+					/>
+					<space/>
+					<widget name = 'RunTests'
+							type = 'Button'
+					/>
+					<widget name = 'Quit'
+							type = 'Button'
+					/>
+				</layout>
+			</layout>
+		</layout>
+	</dialog>
+
 </layout_info>




More information about the Scummvm-git-logs mailing list