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

bluegr bluegr at gmail.com
Sat Feb 20 11:17:15 UTC 2021


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

Summary:
f9f7d0eb10 GUI: Generate ExtraGuiOptions dynamically in a scrollable container (#2783)


Commit: f9f7d0eb10a2a6f0909f6ea9e23bc0ac9df9c941
    https://github.com/scummvm/scummvm/commit/f9f7d0eb10a2a6f0909f6ea9e23bc0ac9df9c941
Author: Matthew Jimenez (48367439+OMGPizzaGuy at users.noreply.github.com)
Date: 2021-02-20T13:17:11+02:00

Commit Message:
GUI: Generate ExtraGuiOptions dynamically in a scrollable container (#2783)

This allows for the removal of hardcoded extra GUI options from the
theme files, and lifts restrictions related to the maximum number
of allowed ExtraGuiOptions

Changed paths:
    engines/dialogs.cpp
    engines/dialogs.h
    gui/ThemeEngine.h
    gui/themes/default.inc
    gui/themes/residualvm.zip
    gui/themes/residualvm/THEMERC
    gui/themes/residualvm/residualvm_layout.stx
    gui/themes/residualvm/residualvm_layout_lowres.stx
    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
    gui/widget.cpp


diff --git a/engines/dialogs.cpp b/engines/dialogs.cpp
index 349aa0161f..9059849d52 100644
--- a/engines/dialogs.cpp
+++ b/engines/dialogs.cpp
@@ -407,21 +407,13 @@ void ConfigDialog::handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32
 #endif
 
 ExtraGuiOptionsWidget::ExtraGuiOptionsWidget(GuiObject *containerBoss, const Common::String &name, const Common::String &domain, const ExtraGuiOptions &options) :
-		OptionsContainerWidget(containerBoss, name, dialogLayout(domain), false, domain),
+		OptionsContainerWidget(containerBoss, name, dialogLayout(domain), true, domain),
 		_options(options) {
 
-	// Note: up to 7 engine options can currently fit on screen (the most that
-	// can fit in a 320x200 screen with the classic theme).
-	// TODO: Increase this number by including the checkboxes inside a scroll
-	// widget. The appropriate number of checkboxes will need to be added to
-	// the theme files.
-
-	uint i = 1;
-	ExtraGuiOptions::const_iterator iter;
-	for (iter = _options.begin(); iter != _options.end(); ++iter, ++i) {
-		Common::String id = Common::String::format("%d", i);
+	for (uint i = 0; i < _options.size(); i++) {
+		Common::String id = Common::String::format("%d", i + 1);
 		_checkboxes.push_back(new CheckboxWidget(widgetsBoss(),
-			_dialogLayout + ".customOption" + id + "Checkbox", _(iter->label), _(iter->tooltip)));
+			_dialogLayout + ".customOption" + id + "Checkbox", _(_options[i].label), _(_options[i].tooltip)));
 	}
 }
 
@@ -438,7 +430,7 @@ Common::String ExtraGuiOptionsWidget::dialogLayout(const Common::String &domain)
 
 void ExtraGuiOptionsWidget::load() {
 	// Set the state of engine-specific checkboxes
-	for (uint j = 0; j < _options.size(); ++j) {
+	for (uint j = 0; j < _options.size() && j < _checkboxes.size(); ++j) {
 		// The default values for engine-specific checkboxes are not set when
 		// ScummVM starts, as this would require us to load and poll all of the
 		// engine plugins on startup. Thus, we set the state of each custom
@@ -454,11 +446,23 @@ void ExtraGuiOptionsWidget::load() {
 
 bool ExtraGuiOptionsWidget::save() {
 	// Set the state of engine-specific checkboxes
-	for (uint i = 0; i < _options.size(); i++) {
+	for (uint i = 0; i < _options.size() && i < _checkboxes.size(); i++) {
 		ConfMan.setBool(_options[i].configOption, _checkboxes[i]->getState(), _domain);
 	}
 
 	return true;
 }
 
+void ExtraGuiOptionsWidget::defineLayout(ThemeEval& layouts, const Common::String& layoutName, const Common::String& overlayedLayout) const {
+	layouts.addDialog(layoutName, overlayedLayout);
+	layouts.addLayout(GUI::ThemeLayout::kLayoutVertical).addPadding(8, 8, 8, 8);
+
+	for (uint i = 0; i < _options.size(); i++) {
+		Common::String id = Common::String::format("%d", i + 1);
+		layouts.addWidget("customOption" + id + "Checkbox", "Checkbox");
+	}
+
+	layouts.closeLayout().closeDialog();
+}
+
 } // End of namespace GUI
diff --git a/engines/dialogs.h b/engines/dialogs.h
index def91ba891..7ce5ec5a4a 100644
--- a/engines/dialogs.h
+++ b/engines/dialogs.h
@@ -110,6 +110,9 @@ public:
 	void load() override;
 	bool save() override;
 
+protected:
+	void defineLayout(ThemeEval& layouts, const Common::String& layoutName, const Common::String& overlayedLayout) const override;
+
 private:
 	typedef Common::Array<CheckboxWidget *> CheckboxWidgetList;
 
diff --git a/gui/ThemeEngine.h b/gui/ThemeEngine.h
index 0267fd016f..1baacb9192 100644
--- a/gui/ThemeEngine.h
+++ b/gui/ThemeEngine.h
@@ -38,7 +38,7 @@
 #include "graphics/pixelformat.h"
 
 
-#define SCUMMVM_THEME_VERSION_STR "SCUMMVM_STX0.8.41"
+#define SCUMMVM_THEME_VERSION_STR "SCUMMVM_STX0.8.42"
 
 class OSystem;
 
diff --git a/gui/themes/default.inc b/gui/themes/default.inc
index 69763d466c..f1d9c2805c 100644
--- a/gui/themes/default.inc
+++ b/gui/themes/default.inc
@@ -2524,31 +2524,6 @@ const char *defaultXML1 = "<?xml version = '1.0'?>"
 "<widget name='Container'/>"
 "</layout>"
 "</dialog>"
-"<dialog name='GameOptions_Engine_Container' overlays='GameOptions_Engine.Container'>"
-"<layout type='vertical' padding='16,16,16,16'>"
-"<widget name='customOption1Checkbox' "
-"type='Checkbox' "
-"/>"
-"<widget name='customOption2Checkbox' "
-"type='Checkbox' "
-"/>"
-"<widget name='customOption3Checkbox' "
-"type='Checkbox' "
-"/>"
-"<widget name='customOption4Checkbox' "
-"type='Checkbox' "
-"/>"
-"<widget name='customOption5Checkbox' "
-"type='Checkbox' "
-"/>"
-"<widget name='customOption6Checkbox' "
-"type='Checkbox' "
-"/>"
-"<widget name='customOption7Checkbox' "
-"type='Checkbox' "
-"/>"
-"</layout>"
-"</dialog>"
 "<dialog name='GlobalMenu' overlays='screen_center'>"
 "<layout type='vertical' padding='16,16,16,16' align='center'>"
 "<widget name='Title' "
@@ -2620,11 +2595,6 @@ const char *defaultXML1 = "<?xml version = '1.0'?>"
 "<widget name='Container'/>"
 "</layout>"
 "</dialog>"
-"<dialog name='GlobalConfig_Engine_Container' overlays='Dialog.GlobalConfig_Engine.Container'>"
-"<layout type='vertical' padding='16,16,16,16'>"
-"<import layout='Dialog.GameOptions_Engine_Container' />"
-"</layout>"
-"</dialog>"
 "<dialog name='GlobalConfig_Audio' overlays='Dialog.GlobalConfig.TabWidget'>"
 "<layout type='vertical' padding='8,8,8,8' spacing='8'>"
 "<layout type='horizontal' padding='0,0,0,0'>"
@@ -4410,31 +4380,6 @@ const char *defaultXML1 = "<?xml version = '1.0'?>"
 "<widget name='Container'/>"
 "</layout>"
 "</dialog>"
-"<dialog name='GameOptions_Engine_Container' overlays='GameOptions_Engine.Container'>"
-"<layout type='vertical' padding='8,8,8,8'>"
-"<widget name='customOption1Checkbox' "
-"type='Checkbox' "
-"/>"
-"<widget name='customOption2Checkbox' "
-"type='Checkbox' "
-"/>"
-"<widget name='customOption3Checkbox' "
-"type='Checkbox' "
-"/>"
-"<widget name='customOption4Checkbox' "
-"type='Checkbox' "
-"/>"
-"<widget name='customOption5Checkbox' "
-"type='Checkbox' "
-"/>"
-"<widget name='customOption6Checkbox' "
-"type='Checkbox' "
-"/>"
-"<widget name='customOption7Checkbox' "
-"type='Checkbox' "
-"/>"
-"</layout>"
-"</dialog>"
 "<dialog name='GlobalMenu' overlays='screen_center'>"
 "<layout type='vertical' padding='2,2,2,6' align='center' spacing='0'>"
 "<widget name='Title' "
@@ -4507,11 +4452,6 @@ const char *defaultXML1 = "<?xml version = '1.0'?>"
 "<widget name='Container'/>"
 "</layout>"
 "</dialog>"
-"<dialog name='GlobalConfig_Engine_Container' overlays='Dialog.GlobalConfig_Engine.Container'>"
-"<layout type='vertical' padding='8,8,8,8'>"
-"<import layout='Dialog.GameOptions_Engine_Container' />"
-"</layout>"
-"</dialog>"
 "<dialog name='GlobalConfig_Audio' overlays='Dialog.GlobalConfig.TabWidget'>"
 "<layout type='vertical' padding='8,8,8,8'>"
 "<layout type='horizontal' padding='0,0,0,0' spacing='6' align='center'>"
diff --git a/gui/themes/residualvm.zip b/gui/themes/residualvm.zip
index 05edbd3a37..5209ffd69f 100644
Binary files a/gui/themes/residualvm.zip and b/gui/themes/residualvm.zip differ
diff --git a/gui/themes/residualvm/THEMERC b/gui/themes/residualvm/THEMERC
index 14c28baf9a..32a56ed4ba 100644
--- a/gui/themes/residualvm/THEMERC
+++ b/gui/themes/residualvm/THEMERC
@@ -1 +1 @@
-[SCUMMVM_STX0.8.41:ResidualVM Modern Theme:No Author]
+[SCUMMVM_STX0.8.42:ResidualVM Modern Theme:No Author]
diff --git a/gui/themes/residualvm/residualvm_layout.stx b/gui/themes/residualvm/residualvm_layout.stx
index ebd4781b72..420e4c5450 100644
--- a/gui/themes/residualvm/residualvm_layout.stx
+++ b/gui/themes/residualvm/residualvm_layout.stx
@@ -1199,32 +1199,6 @@
 		</layout>
 	</dialog>
 
-	<dialog name = 'GameOptions_Engine_Container' overlays = 'GameOptions_Engine.Container'>
-		<layout type = 'vertical' padding = '16, 16, 16, 16'>
-			<widget name = 'customOption1Checkbox'
-					type = 'Checkbox'
-			/>
-			<widget name = 'customOption2Checkbox'
-					type = 'Checkbox'
-			/>
-			<widget name = 'customOption3Checkbox'
-					type = 'Checkbox'
-			/>
-			<widget name = 'customOption4Checkbox'
-					type = 'Checkbox'
-			/>
-			<widget name = 'customOption5Checkbox'
-					type = 'Checkbox'
-			/>
-			<widget name = 'customOption6Checkbox'
-					type = 'Checkbox'
-			/>
-			<widget name = 'customOption7Checkbox'
-					type = 'Checkbox'
-			/>
-		</layout>
-	</dialog>
-
 	<dialog name = 'GlobalMenu' overlays = 'screen_center'>
 		<layout type = 'vertical' padding = '16, 16, 16, 16' align = 'center'>
 			<widget name = 'Logo'
@@ -1299,12 +1273,6 @@
 		</layout>
 	</dialog>
 
-	<dialog name = 'GlobalConfig_Engine_Container' overlays = 'Dialog.GlobalConfig_Engine.Container'>
-		<layout type = 'vertical' padding = '16, 16, 16, 16'>
-			<import layout = 'Dialog.GameOptions_Engine_Container' />
-		</layout>
-	</dialog>
-
 	<dialog name = 'GlobalConfig_Audio' overlays = 'Dialog.GlobalConfig.TabWidget'>
 		<layout type = 'vertical' padding = '8, 8, 8, 8' spacing = '8'>
 			<layout type = 'horizontal' padding = '0, 0, 0, 0'>
diff --git a/gui/themes/residualvm/residualvm_layout_lowres.stx b/gui/themes/residualvm/residualvm_layout_lowres.stx
index 1d6f1f729c..90db68fcfd 100644
--- a/gui/themes/residualvm/residualvm_layout_lowres.stx
+++ b/gui/themes/residualvm/residualvm_layout_lowres.stx
@@ -1193,32 +1193,6 @@
 		</layout>
 	</dialog>
 
-	<dialog name = 'GameOptions_Engine_Container' overlays = 'GameOptions_Engine.Container'>
-		<layout type = 'vertical' padding = '8, 8, 8, 8'>
-			<widget name = 'customOption1Checkbox'
-					type = 'Checkbox'
-			/>
-			<widget name = 'customOption2Checkbox'
-					type = 'Checkbox'
-			/>
-			<widget name = 'customOption3Checkbox'
-					type = 'Checkbox'
-			/>
-			<widget name = 'customOption4Checkbox'
-					type = 'Checkbox'
-			/>
-			<widget name = 'customOption5Checkbox'
-					type = 'Checkbox'
-			/>
-			<widget name = 'customOption6Checkbox'
-					type = 'Checkbox'
-			/>
-			<widget name = 'customOption7Checkbox'
-					type = 'Checkbox'
-			/>
-		</layout>
-	</dialog>
-
 	<dialog name = 'GlobalMenu' overlays = 'screen_center'>
 		<layout type = 'vertical' padding = '4, 4, 4, 4' align = 'center' spacing='2'>
 			<widget name = 'Title'
@@ -1293,12 +1267,6 @@
 		</layout>
 	</dialog>
 
-	<dialog name = 'GlobalConfig_Engine_Container' overlays = 'Dialog.GlobalConfig_Engine.Container'>
-		<layout type = 'vertical' padding = '8, 8, 8, 8'>
-			<import layout = 'Dialog.GameOptions_Engine_Container' />
-		</layout>
-	</dialog>
-
 	<dialog name = 'GlobalConfig_Audio' overlays = 'Dialog.GlobalConfig.TabWidget'>
 		<layout type = 'vertical' padding = '8, 8, 8, 8'>
 			<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '6' align = 'center'>
diff --git a/gui/themes/scummclassic.zip b/gui/themes/scummclassic.zip
index afbc7d3462..f8086b7027 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 e94521352a..2c89173ddd 100644
--- a/gui/themes/scummclassic/THEMERC
+++ b/gui/themes/scummclassic/THEMERC
@@ -1 +1 @@
-[SCUMMVM_STX0.8.41:ScummVM Classic Theme:No Author]
+[SCUMMVM_STX0.8.42:ScummVM Classic Theme:No Author]
diff --git a/gui/themes/scummclassic/classic_layout.stx b/gui/themes/scummclassic/classic_layout.stx
index 2e22cd3fd6..9c67cb6b14 100644
--- a/gui/themes/scummclassic/classic_layout.stx
+++ b/gui/themes/scummclassic/classic_layout.stx
@@ -1184,32 +1184,6 @@
 		</layout>
 	</dialog>
 
-	<dialog name = 'GameOptions_Engine_Container' overlays = 'GameOptions_Engine.Container'>
-		<layout type = 'vertical' padding = '16, 16, 16, 16'>
-			<widget name = 'customOption1Checkbox'
-					type = 'Checkbox'
-			/>
-			<widget name = 'customOption2Checkbox'
-					type = 'Checkbox'
-			/>
-			<widget name = 'customOption3Checkbox'
-					type = 'Checkbox'
-			/>
-			<widget name = 'customOption4Checkbox'
-					type = 'Checkbox'
-			/>
-			<widget name = 'customOption5Checkbox'
-					type = 'Checkbox'
-			/>
-			<widget name = 'customOption6Checkbox'
-					type = 'Checkbox'
-			/>
-			<widget name = 'customOption7Checkbox'
-					type = 'Checkbox'
-			/>
-		</layout>
-	</dialog>
-
 	<dialog name = 'GlobalMenu' overlays = 'screen_center'>
 		<layout type = 'vertical' padding = '16, 16, 16, 16' align = 'center'>
 			<widget name = 'Title'
@@ -1284,12 +1258,6 @@
 		</layout>
 	</dialog>
 
-	<dialog name = 'GlobalConfig_Engine_Container' overlays = 'Dialog.GlobalConfig_Engine.Container'>
-		<layout type = 'vertical' padding = '16, 16, 16, 16'>
-			<import layout = 'Dialog.GameOptions_Engine_Container' />
-		</layout>
-	</dialog>
-
 	<dialog name = 'GlobalConfig_Audio' overlays = 'Dialog.GlobalConfig.TabWidget'>
 		<layout type = 'vertical' padding = '8, 8, 8, 8' spacing = '8'>
 			<layout type = 'horizontal' padding = '0, 0, 0, 0'>
diff --git a/gui/themes/scummclassic/classic_layout_lowres.stx b/gui/themes/scummclassic/classic_layout_lowres.stx
index 8286494ce2..48475b20ef 100644
--- a/gui/themes/scummclassic/classic_layout_lowres.stx
+++ b/gui/themes/scummclassic/classic_layout_lowres.stx
@@ -1194,32 +1194,6 @@
 		</layout>
 	</dialog>
 
-	<dialog name = 'GameOptions_Engine_Container' overlays = 'GameOptions_Engine.Container'>
-		<layout type = 'vertical' padding = '8, 8, 8, 8'>
-			<widget name = 'customOption1Checkbox'
-					type = 'Checkbox'
-			/>
-			<widget name = 'customOption2Checkbox'
-					type = 'Checkbox'
-			/>
-			<widget name = 'customOption3Checkbox'
-					type = 'Checkbox'
-			/>
-			<widget name = 'customOption4Checkbox'
-					type = 'Checkbox'
-			/>
-			<widget name = 'customOption5Checkbox'
-					type = 'Checkbox'
-			/>
-			<widget name = 'customOption6Checkbox'
-					type = 'Checkbox'
-			/>
-			<widget name = 'customOption7Checkbox'
-					type = 'Checkbox'
-			/>
-		</layout>
-	</dialog>
-
 	<dialog name = 'GlobalMenu' overlays = 'screen_center'>
 		<layout type = 'vertical' padding = '2, 2, 2, 6' align = 'center' spacing='0'>
 			<widget name = 'Title'
@@ -1295,12 +1269,6 @@
 		</layout>
 	</dialog>
 
-	<dialog name = 'GlobalConfig_Engine_Container' overlays = 'Dialog.GlobalConfig_Engine.Container'>
-		<layout type = 'vertical' padding = '8, 8, 8, 8'>
-			<import layout = 'Dialog.GameOptions_Engine_Container' />
-		</layout>
-	</dialog>
-
 	<dialog name = 'GlobalConfig_Audio' overlays = 'Dialog.GlobalConfig.TabWidget'>
 		<layout type = 'vertical' padding = '8, 8, 8, 8'>
 			<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '6' align = 'center'>
diff --git a/gui/themes/scummmodern.zip b/gui/themes/scummmodern.zip
index bd06d24ce0..6f993a3da2 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 46b2ab48a0..21cc0e5cbc 100644
--- a/gui/themes/scummmodern/THEMERC
+++ b/gui/themes/scummmodern/THEMERC
@@ -1 +1 @@
-[SCUMMVM_STX0.8.41:ScummVM Modern Theme:No Author]
+[SCUMMVM_STX0.8.42:ScummVM Modern Theme:No Author]
diff --git a/gui/themes/scummmodern/scummmodern_layout.stx b/gui/themes/scummmodern/scummmodern_layout.stx
index 5c288174d7..046175f44f 100644
--- a/gui/themes/scummmodern/scummmodern_layout.stx
+++ b/gui/themes/scummmodern/scummmodern_layout.stx
@@ -1199,32 +1199,6 @@
 		</layout>
 	</dialog>
 
-	<dialog name = 'GameOptions_Engine_Container' overlays = 'GameOptions_Engine.Container'>
-		<layout type = 'vertical' padding = '16, 16, 16, 16'>
-			<widget name = 'customOption1Checkbox'
-					type = 'Checkbox'
-			/>
-			<widget name = 'customOption2Checkbox'
-					type = 'Checkbox'
-			/>
-			<widget name = 'customOption3Checkbox'
-					type = 'Checkbox'
-			/>
-			<widget name = 'customOption4Checkbox'
-					type = 'Checkbox'
-			/>
-			<widget name = 'customOption5Checkbox'
-					type = 'Checkbox'
-			/>
-			<widget name = 'customOption6Checkbox'
-					type = 'Checkbox'
-			/>
-			<widget name = 'customOption7Checkbox'
-					type = 'Checkbox'
-			/>
-		</layout>
-	</dialog>
-
 	<dialog name = 'GlobalMenu' overlays = 'screen_center'>
 		<layout type = 'vertical' padding = '16, 16, 16, 16' align = 'center'>
 			<widget name = 'Logo'
@@ -1299,12 +1273,6 @@
 		</layout>
 	</dialog>
 
-	<dialog name = 'GlobalConfig_Engine_Container' overlays = 'Dialog.GlobalConfig_Engine.Container'>
-		<layout type = 'vertical' padding = '16, 16, 16, 16'>
-			<import layout = 'Dialog.GameOptions_Engine_Container' />
-		</layout>
-	</dialog>
-
 	<dialog name = 'GlobalConfig_Audio' overlays = 'Dialog.GlobalConfig.TabWidget'>
 		<layout type = 'vertical' padding = '8, 8, 8, 8' spacing = '8'>
 			<layout type = 'horizontal' padding = '0, 0, 0, 0'>
diff --git a/gui/themes/scummmodern/scummmodern_layout_lowres.stx b/gui/themes/scummmodern/scummmodern_layout_lowres.stx
index 1d6f1f729c..90db68fcfd 100644
--- a/gui/themes/scummmodern/scummmodern_layout_lowres.stx
+++ b/gui/themes/scummmodern/scummmodern_layout_lowres.stx
@@ -1193,32 +1193,6 @@
 		</layout>
 	</dialog>
 
-	<dialog name = 'GameOptions_Engine_Container' overlays = 'GameOptions_Engine.Container'>
-		<layout type = 'vertical' padding = '8, 8, 8, 8'>
-			<widget name = 'customOption1Checkbox'
-					type = 'Checkbox'
-			/>
-			<widget name = 'customOption2Checkbox'
-					type = 'Checkbox'
-			/>
-			<widget name = 'customOption3Checkbox'
-					type = 'Checkbox'
-			/>
-			<widget name = 'customOption4Checkbox'
-					type = 'Checkbox'
-			/>
-			<widget name = 'customOption5Checkbox'
-					type = 'Checkbox'
-			/>
-			<widget name = 'customOption6Checkbox'
-					type = 'Checkbox'
-			/>
-			<widget name = 'customOption7Checkbox'
-					type = 'Checkbox'
-			/>
-		</layout>
-	</dialog>
-
 	<dialog name = 'GlobalMenu' overlays = 'screen_center'>
 		<layout type = 'vertical' padding = '4, 4, 4, 4' align = 'center' spacing='2'>
 			<widget name = 'Title'
@@ -1293,12 +1267,6 @@
 		</layout>
 	</dialog>
 
-	<dialog name = 'GlobalConfig_Engine_Container' overlays = 'Dialog.GlobalConfig_Engine.Container'>
-		<layout type = 'vertical' padding = '8, 8, 8, 8'>
-			<import layout = 'Dialog.GameOptions_Engine_Container' />
-		</layout>
-	</dialog>
-
 	<dialog name = 'GlobalConfig_Audio' overlays = 'Dialog.GlobalConfig.TabWidget'>
 		<layout type = 'vertical' padding = '8, 8, 8, 8'>
 			<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '6' align = 'center'>
diff --git a/gui/themes/scummremastered.zip b/gui/themes/scummremastered.zip
index feb69686b3..4d18003367 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 f678d26119..59d4fbbc3c 100644
--- a/gui/themes/scummremastered/THEMERC
+++ b/gui/themes/scummremastered/THEMERC
@@ -1 +1 @@
-[SCUMMVM_STX0.8.41:ScummVM Modern Theme Remastered:No Author]
+[SCUMMVM_STX0.8.42:ScummVM Modern Theme Remastered:No Author]
diff --git a/gui/themes/scummremastered/remastered_layout.stx b/gui/themes/scummremastered/remastered_layout.stx
index 5c288174d7..046175f44f 100644
--- a/gui/themes/scummremastered/remastered_layout.stx
+++ b/gui/themes/scummremastered/remastered_layout.stx
@@ -1199,32 +1199,6 @@
 		</layout>
 	</dialog>
 
-	<dialog name = 'GameOptions_Engine_Container' overlays = 'GameOptions_Engine.Container'>
-		<layout type = 'vertical' padding = '16, 16, 16, 16'>
-			<widget name = 'customOption1Checkbox'
-					type = 'Checkbox'
-			/>
-			<widget name = 'customOption2Checkbox'
-					type = 'Checkbox'
-			/>
-			<widget name = 'customOption3Checkbox'
-					type = 'Checkbox'
-			/>
-			<widget name = 'customOption4Checkbox'
-					type = 'Checkbox'
-			/>
-			<widget name = 'customOption5Checkbox'
-					type = 'Checkbox'
-			/>
-			<widget name = 'customOption6Checkbox'
-					type = 'Checkbox'
-			/>
-			<widget name = 'customOption7Checkbox'
-					type = 'Checkbox'
-			/>
-		</layout>
-	</dialog>
-
 	<dialog name = 'GlobalMenu' overlays = 'screen_center'>
 		<layout type = 'vertical' padding = '16, 16, 16, 16' align = 'center'>
 			<widget name = 'Logo'
@@ -1299,12 +1273,6 @@
 		</layout>
 	</dialog>
 
-	<dialog name = 'GlobalConfig_Engine_Container' overlays = 'Dialog.GlobalConfig_Engine.Container'>
-		<layout type = 'vertical' padding = '16, 16, 16, 16'>
-			<import layout = 'Dialog.GameOptions_Engine_Container' />
-		</layout>
-	</dialog>
-
 	<dialog name = 'GlobalConfig_Audio' overlays = 'Dialog.GlobalConfig.TabWidget'>
 		<layout type = 'vertical' padding = '8, 8, 8, 8' spacing = '8'>
 			<layout type = 'horizontal' padding = '0, 0, 0, 0'>
diff --git a/gui/themes/scummremastered/remastered_layout_lowres.stx b/gui/themes/scummremastered/remastered_layout_lowres.stx
index 1d6f1f729c..90db68fcfd 100644
--- a/gui/themes/scummremastered/remastered_layout_lowres.stx
+++ b/gui/themes/scummremastered/remastered_layout_lowres.stx
@@ -1193,32 +1193,6 @@
 		</layout>
 	</dialog>
 
-	<dialog name = 'GameOptions_Engine_Container' overlays = 'GameOptions_Engine.Container'>
-		<layout type = 'vertical' padding = '8, 8, 8, 8'>
-			<widget name = 'customOption1Checkbox'
-					type = 'Checkbox'
-			/>
-			<widget name = 'customOption2Checkbox'
-					type = 'Checkbox'
-			/>
-			<widget name = 'customOption3Checkbox'
-					type = 'Checkbox'
-			/>
-			<widget name = 'customOption4Checkbox'
-					type = 'Checkbox'
-			/>
-			<widget name = 'customOption5Checkbox'
-					type = 'Checkbox'
-			/>
-			<widget name = 'customOption6Checkbox'
-					type = 'Checkbox'
-			/>
-			<widget name = 'customOption7Checkbox'
-					type = 'Checkbox'
-			/>
-		</layout>
-	</dialog>
-
 	<dialog name = 'GlobalMenu' overlays = 'screen_center'>
 		<layout type = 'vertical' padding = '4, 4, 4, 4' align = 'center' spacing='2'>
 			<widget name = 'Title'
@@ -1293,12 +1267,6 @@
 		</layout>
 	</dialog>
 
-	<dialog name = 'GlobalConfig_Engine_Container' overlays = 'Dialog.GlobalConfig_Engine.Container'>
-		<layout type = 'vertical' padding = '8, 8, 8, 8'>
-			<import layout = 'Dialog.GameOptions_Engine_Container' />
-		</layout>
-	</dialog>
-
 	<dialog name = 'GlobalConfig_Audio' overlays = 'Dialog.GlobalConfig.TabWidget'>
 		<layout type = 'vertical' padding = '8, 8, 8, 8'>
 			<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '6' align = 'center'>
diff --git a/gui/widget.cpp b/gui/widget.cpp
index c8983d6c47..a682c2eb32 100644
--- a/gui/widget.cpp
+++ b/gui/widget.cpp
@@ -941,7 +941,7 @@ OptionsContainerWidget::OptionsContainerWidget(GuiObject *boss, const Common::St
 		_scrollContainer(nullptr) {
 
 	if (scrollable) {
-		_scrollContainer = new ScrollContainerWidget(this, 0, 0, 0, 0, kReflowCmd);
+		_scrollContainer = new ScrollContainerWidget(this, name, _dialogLayout, kReflowCmd);
 		_scrollContainer->setTarget(this);
 		_scrollContainer->setBackgroundType(GUI::ThemeEngine::kWidgetBackgroundNo);
 	}
@@ -958,7 +958,9 @@ void OptionsContainerWidget::reflowLayout() {
 			defineLayout(*g_gui.xmlEval(), _dialogLayout, _name);
 		}
 
-		g_gui.xmlEval()->reflowDialogLayout(_dialogLayout, _firstWidget);
+		if (!_scrollContainer) {
+			g_gui.xmlEval()->reflowDialogLayout(_dialogLayout, _firstWidget);
+		}
 	}
 
 	if (_scrollContainer) {




More information about the Scummvm-git-logs mailing list