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

sev- noreply at scummvm.org
Thu Jun 13 23:15:18 UTC 2024


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

Summary:
65e843c5da GUI: Separate the scroll container from the remap widget
efec9b2d25 GUI: Remove built-in scroll containers from OptionsContainerWidget
fd7ebd7925 GUI: Fix scrolling the game tab in the options
a6a369cdd3 GUI: Handle padding for the backend and engine options in the theme definitions
35077b3e95 GUI: Use a separate scroll container for the paths tab
afb383f3b1 GUI: Remove automatic scrollbars from TabWidget
e45f8edeb0 GUI: Improve the padding for the lowres themes
c17884608b GUI: Update the theme version and regenerate the archives


Commit: 65e843c5daeeab514303909e92db939709edb3c4
    https://github.com/scummvm/scummvm/commit/65e843c5daeeab514303909e92db939709edb3c4
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2024-06-14T01:15:12+02:00

Commit Message:
GUI: Separate the scroll container from the remap widget

Changed paths:
    backends/keymapper/remap-widget.cpp
    backends/keymapper/remap-widget.h
    engines/dialogs.cpp
    gui/editgamedialog.cpp
    gui/options.cpp
    gui/themes/common/highres_layout.stx
    gui/themes/common/lowres_layout.stx
    gui/themes/default.inc
    gui/themes/scummclassic/classic_layout.stx
    gui/themes/scummclassic/classic_layout_lowres.stx


diff --git a/backends/keymapper/remap-widget.cpp b/backends/keymapper/remap-widget.cpp
index f033d3e6fe7..21346fb141e 100644
--- a/backends/keymapper/remap-widget.cpp
+++ b/backends/keymapper/remap-widget.cpp
@@ -44,7 +44,7 @@ enum {
 };
 
 RemapWidget::RemapWidget(GuiObject *boss, const Common::String &name, const KeymapArray &keymaps) :
-		OptionsContainerWidget(boss, name, "", true, ""),
+		OptionsContainerWidget(boss, name, "", false, ""),
 		_keymapTable(keymaps),
 		_remapKeymap(nullptr),
 		_remapAction(nullptr),
@@ -98,6 +98,11 @@ void RemapWidget::handleInputChanged() {
 	refreshKeymap();
 }
 
+void RemapWidget::reflowLayout() {
+	OptionsContainerWidget::reflowLayout();
+	reflowActionWidgets();
+};
+
 void RemapWidget::reflowActionWidgets() {
 	int buttonHeight = g_gui.xmlEval()->getVar("Globals.Button.Height", 0);
 
@@ -164,8 +169,6 @@ void RemapWidget::handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 d
 		resetMapping(cmd - kResetActionCmd);
 	} else if (cmd >= kResetKeymapCmd && cmd < kResetKeymapCmd + _actions.size()) {
 		resetKeymap(cmd - kResetKeymapCmd);
-	} else if (cmd == kReflowCmd) {
-		reflowActionWidgets();
 	} else {
 		OptionsContainerWidget::handleCommand(sender, cmd, data);
 	}
diff --git a/backends/keymapper/remap-widget.h b/backends/keymapper/remap-widget.h
index f031ddcac53..2c192e2c9b6 100644
--- a/backends/keymapper/remap-widget.h
+++ b/backends/keymapper/remap-widget.h
@@ -31,7 +31,6 @@ namespace GUI {
 class ButtonWidget;
 class DropdownButtonWidget;
 class PopUpWidget;
-class ScrollContainerWidget;
 class StaticTextWidget;
 }
 
@@ -54,6 +53,7 @@ public:
 	void handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data) override;
 	void handleMouseDown(int x, int y, int button, int clickCount) override;
 	void handleTickle() override;
+	void reflowLayout() override;
 
 protected:
 	struct ActionRow {
diff --git a/engines/dialogs.cpp b/engines/dialogs.cpp
index 1e3b1aca1f5..c588135a2a2 100644
--- a/engines/dialogs.cpp
+++ b/engines/dialogs.cpp
@@ -340,7 +340,12 @@ ConfigDialog::ConfigDialog() :
 	Common::KeymapArray keymaps = metaEngine->initKeymaps(gameDomain.c_str());
 	if (!keymaps.empty()) {
 		tab->addTab(_("Keymaps"), "GlobalConfig_KeyMapper", false);
-		addKeyMapperControls(tab, "GlobalConfig_KeyMapper.", keymaps, gameDomain);
+
+		ScrollContainerWidget *keymapContainer = new ScrollContainerWidget(tab, "GlobalConfig_KeyMapper.Container", "GlobalConfig_KeyMapper_Container");
+		keymapContainer->setBackgroundType(ThemeEngine::kWidgetBackgroundNo);
+		keymapContainer->setTarget(this);
+
+		addKeyMapperControls(keymapContainer, "GlobalConfig_KeyMapper_Container.", keymaps, gameDomain);
 	}
 
 	//
diff --git a/gui/editgamedialog.cpp b/gui/editgamedialog.cpp
index 09109962cb3..c4986e2da55 100644
--- a/gui/editgamedialog.cpp
+++ b/gui/editgamedialog.cpp
@@ -216,7 +216,12 @@ EditGameDialog::EditGameDialog(const Common::String &domain)
 
 	if (!keymaps.empty()) {
 		tab->addTab(_("Keymaps"), "GameOptions_KeyMapper", false);
-		addKeyMapperControls(tab, "GameOptions_KeyMapper.", keymaps, domain);
+
+		ScrollContainerWidget *keymapContainer = new ScrollContainerWidget(tab, "GameOptions_KeyMapper.Container", "GameOptions_KeyMapper_Container");
+		keymapContainer->setBackgroundType(ThemeEngine::kWidgetBackgroundNo);
+		keymapContainer->setTarget(this);
+
+		addKeyMapperControls(keymapContainer, "GameOptions_KeyMapper_Container.", keymaps, domain);
 	}
 
 	//
diff --git a/gui/options.cpp b/gui/options.cpp
index c82f8797e00..7e9dc243604 100644
--- a/gui/options.cpp
+++ b/gui/options.cpp
@@ -2229,7 +2229,12 @@ void GlobalOptionsDialog::build() {
 
 	if (!keymaps.empty()) {
 		tab->addTab(_("Keymaps"), "GlobalOptions_KeyMapper", false);
-		addKeyMapperControls(tab, "GlobalOptions_KeyMapper.", keymaps, Common::ConfigManager::kKeymapperDomain);
+
+		ScrollContainerWidget *keymapContainer = new ScrollContainerWidget(tab, "GlobalOptions_KeyMapper.Container", "GlobalOptions_KeyMapper_Container");
+		keymapContainer->setBackgroundType(ThemeEngine::kWidgetBackgroundNo);
+		keymapContainer->setTarget(this);
+
+		addKeyMapperControls(keymapContainer, "GlobalOptions_KeyMapper_Container.", keymaps, Common::ConfigManager::kKeymapperDomain);
 	}
 
 	//
diff --git a/gui/themes/common/highres_layout.stx b/gui/themes/common/highres_layout.stx
index cc8da14ed0c..68a76e6c616 100644
--- a/gui/themes/common/highres_layout.stx
+++ b/gui/themes/common/highres_layout.stx
@@ -703,6 +703,12 @@
 		</layout>
 	</dialog>
 
+	<dialog name = 'GlobalOptions_KeyMapper_Container' overlays = 'GlobalOptions_KeyMapper.Container'>
+		<layout type = 'vertical' padding = '0, 0, 0, 0'>
+			<widget name = 'Container'/>
+		</layout>
+	</dialog>
+
 	<dialog name = 'GlobalOptions_Backend' overlays = 'Dialog.GlobalOptions.TabWidget'>
 		<layout type = 'vertical' padding = '0, 0, 0, 0'>
 			<widget name = 'Container'
@@ -1649,6 +1655,12 @@
 		</layout>
 	</dialog>
 
+	<dialog name = 'GameOptions_KeyMapper_Container' overlays = 'GameOptions_KeyMapper.Container'>
+		<layout type = 'vertical' padding = '0, 0, 0, 0'>
+			<import layout = 'Dialog.GlobalOptions_KeyMapper_Container' />
+		</layout>
+	</dialog>
+
 	<dialog name = 'GameOptions_Backend' overlays = 'Dialog.GameOptions.TabWidget'>
 		<layout type = 'vertical' padding = '0, 0, 0, 0'>
 			<widget name = 'Container'
@@ -1965,6 +1977,12 @@
 		</layout>
 	</dialog>
 
+	<dialog name = 'GlobalConfig_KeyMapper_Container' overlays = 'GlobalConfig_KeyMapper.Container'>
+		<layout type = 'vertical' padding = '0, 0, 0, 0'>
+			<import layout = 'Dialog.GlobalOptions_KeyMapper_Container' />
+		</layout>
+	</dialog>
+
 	<dialog name = 'GlobalConfig_Backend' overlays = 'Dialog.GlobalConfig.TabWidget'>
 		<layout type = 'vertical' padding = '0, 0, 0, 0'>
 			<widget name = 'Container'
diff --git a/gui/themes/common/lowres_layout.stx b/gui/themes/common/lowres_layout.stx
index f2c1a2d2c37..b561ee047ef 100644
--- a/gui/themes/common/lowres_layout.stx
+++ b/gui/themes/common/lowres_layout.stx
@@ -543,6 +543,12 @@
 		</layout>
 	</dialog>
 
+	<dialog name = 'GlobalOptions_KeyMapper_Container' overlays = 'GlobalOptions_KeyMapper.Container'>
+		<layout type = 'vertical' padding = '0, 0, 0, 0'>
+			<widget name = 'Container'/>
+		</layout>
+	</dialog>
+
 	<dialog name = 'GlobalOptions_Backend' overlays = 'Dialog.GlobalOptions.TabWidget'>
 		<layout type = 'vertical' padding = '0, 0, 0, 0'>
 			<widget name = 'Container'
@@ -1479,6 +1485,12 @@
 		</layout>
 	</dialog>
 
+	<dialog name = 'GameOptions_KeyMapper_Container' overlays = 'GameOptions_KeyMapper.Container'>
+		<layout type = 'vertical' padding = '0, 0, 0, 0'>
+			<import layout = 'Dialog.GlobalOptions_KeyMapper_Container' />
+		</layout>
+	</dialog>
+
 	<dialog name = 'GameOptions_Backend' overlays = 'Dialog.GameOptions.TabWidget'>
 		<layout type = 'vertical' padding = '0, 0, 0, 0'>
 			<widget name = 'Container'
@@ -1801,6 +1813,12 @@
 		</layout>
 	</dialog>
 
+	<dialog name = 'GlobalConfig_KeyMapper_Container' overlays = 'GlobalConfig_KeyMapper.Container'>
+		<layout type = 'vertical' padding = '0, 0, 0, 0'>
+			<import layout = 'Dialog.GlobalOptions_KeyMapper_Container' />
+		</layout>
+	</dialog>
+
 	<dialog name = 'GlobalConfig_Backend' overlays = 'Dialog.GlobalConfig.TabWidget'>
 		<layout type = 'vertical' padding = '0, 0, 0, 0'>
 			<widget name = 'Container'
diff --git a/gui/themes/default.inc b/gui/themes/default.inc
index 8036fb6153a..81903e57a80 100644
--- a/gui/themes/default.inc
+++ b/gui/themes/default.inc
@@ -1775,6 +1775,11 @@ const char *defaultXML1 = "<?xml version = '1.0'?>"
 "/>"
 "</layout>"
 "</dialog>"
+"<dialog name='GlobalOptions_KeyMapper_Container' overlays='GlobalOptions_KeyMapper.Container'>"
+"<layout type='vertical' padding='0,0,0,0'>"
+"<widget name='Container'/>"
+"</layout>"
+"</dialog>"
 "<dialog name='GlobalOptions_Backend' overlays='Dialog.GlobalOptions.TabWidget'>"
 "<layout type='vertical' padding='0,0,0,0'>"
 "<widget name='Container' "
@@ -2643,6 +2648,11 @@ const char *defaultXML1 = "<?xml version = '1.0'?>"
 "/>"
 "</layout>"
 "</dialog>"
+"<dialog name='GameOptions_KeyMapper_Container' overlays='GameOptions_KeyMapper.Container'>"
+"<layout type='vertical' padding='0,0,0,0'>"
+"<import layout='Dialog.GlobalOptions_KeyMapper_Container' />"
+"</layout>"
+"</dialog>"
 "<dialog name='GameOptions_Backend' overlays='Dialog.GameOptions.TabWidget'>"
 "<layout type='vertical' padding='0,0,0,0'>"
 "<widget name='Container' "
@@ -2943,6 +2953,11 @@ const char *defaultXML1 = "<?xml version = '1.0'?>"
 "/>"
 "</layout>"
 "</dialog>"
+"<dialog name='GlobalConfig_KeyMapper_Container' overlays='GlobalConfig_KeyMapper.Container'>"
+"<layout type='vertical' padding='0,0,0,0'>"
+"<import layout='Dialog.GlobalOptions_KeyMapper_Container' />"
+"</layout>"
+"</dialog>"
 "<dialog name='GlobalConfig_Backend' overlays='Dialog.GlobalConfig.TabWidget'>"
 "<layout type='vertical' padding='0,0,0,0'>"
 "<widget name='Container' "
@@ -4079,6 +4094,11 @@ const char *defaultXML1 = "<?xml version = '1.0'?>"
 "/>"
 "</layout>"
 "</dialog>"
+"<dialog name='GlobalOptions_KeyMapper_Container' overlays='GlobalOptions_KeyMapper.Container'>"
+"<layout type='vertical' padding='0,0,0,0'>"
+"<widget name='Container'/>"
+"</layout>"
+"</dialog>"
 "<dialog name='GlobalOptions_Backend' overlays='Dialog.GlobalOptions.TabWidget'>"
 "<layout type='vertical' padding='0,0,0,0'>"
 "<widget name='Container' "
@@ -4953,6 +4973,11 @@ const char *defaultXML1 = "<?xml version = '1.0'?>"
 "/>"
 "</layout>"
 "</dialog>"
+"<dialog name='GameOptions_KeyMapper_Container' overlays='GameOptions_KeyMapper.Container'>"
+"<layout type='vertical' padding='0,0,0,0'>"
+"<import layout='Dialog.GlobalOptions_KeyMapper_Container' />"
+"</layout>"
+"</dialog>"
 "<dialog name='GameOptions_Backend' overlays='Dialog.GameOptions.TabWidget'>"
 "<layout type='vertical' padding='0,0,0,0'>"
 "<widget name='Container' "
@@ -5259,6 +5284,11 @@ const char *defaultXML1 = "<?xml version = '1.0'?>"
 "/>"
 "</layout>"
 "</dialog>"
+"<dialog name='GlobalConfig_KeyMapper_Container' overlays='GlobalConfig_KeyMapper.Container'>"
+"<layout type='vertical' padding='0,0,0,0'>"
+"<import layout='Dialog.GlobalOptions_KeyMapper_Container' />"
+"</layout>"
+"</dialog>"
 "<dialog name='GlobalConfig_Backend' overlays='Dialog.GlobalConfig.TabWidget'>"
 "<layout type='vertical' padding='0,0,0,0'>"
 "<widget name='Container' "
diff --git a/gui/themes/scummclassic/classic_layout.stx b/gui/themes/scummclassic/classic_layout.stx
index 4364024520c..b714e67feb8 100644
--- a/gui/themes/scummclassic/classic_layout.stx
+++ b/gui/themes/scummclassic/classic_layout.stx
@@ -381,6 +381,12 @@
 		</layout>
 	</dialog>
 
+	<dialog name = 'GlobalOptions_KeyMapper_Container' overlays = 'GlobalOptions_KeyMapper.Container'>
+		<layout type = 'vertical' padding = '0, 0, 0, 0'>
+			<widget name = 'Container'/>
+		</layout>
+	</dialog>
+
 	<dialog name = 'GlobalOptions_Backend' overlays = 'Dialog.GlobalOptions.TabWidget'>
 		<layout type = 'vertical' padding = '0, 0, 0, 0'>
 			<widget name = 'Container'
@@ -1296,6 +1302,12 @@
 		</layout>
 	</dialog>
 
+	<dialog name = 'GameOptions_KeyMapper_Container' overlays = 'GameOptions_KeyMapper.Container'>
+		<layout type = 'vertical' padding = '0, 0, 0, 0'>
+			<import layout = 'Dialog.GlobalOptions_KeyMapper_Container' />
+		</layout>
+	</dialog>
+
 	<dialog name = 'GameOptions_Backend' overlays = 'Dialog.GameOptions.TabWidget'>
 		<layout type = 'vertical' padding = '0, 0, 0, 0'>
 			<widget name = 'Container'
@@ -1612,6 +1624,12 @@
 		</layout>
 	</dialog>
 
+	<dialog name = 'GlobalConfig_KeyMapper_Container' overlays = 'GlobalConfig_KeyMapper.Container'>
+		<layout type = 'vertical' padding = '0, 0, 0, 0'>
+			<import layout = 'Dialog.GlobalOptions_KeyMapper_Container' />
+		</layout>
+	</dialog>
+
 	<dialog name = 'GlobalConfig_Backend' overlays = 'Dialog.GlobalConfig.TabWidget'>
 		<layout type = 'vertical' padding = '0, 0, 0, 0'>
 			<widget name = 'Container'
diff --git a/gui/themes/scummclassic/classic_layout_lowres.stx b/gui/themes/scummclassic/classic_layout_lowres.stx
index 22cf2191baa..84b1099d1fe 100644
--- a/gui/themes/scummclassic/classic_layout_lowres.stx
+++ b/gui/themes/scummclassic/classic_layout_lowres.stx
@@ -388,6 +388,12 @@
 		</layout>
 	</dialog>
 
+	<dialog name = 'GlobalOptions_KeyMapper_Container' overlays = 'GlobalOptions_KeyMapper.Container'>
+		<layout type = 'vertical' padding = '0, 0, 0, 0'>
+			<widget name = 'Container'/>
+		</layout>
+	</dialog>
+
 	<dialog name = 'GlobalOptions_Backend' overlays = 'Dialog.GlobalOptions.TabWidget'>
 		<layout type = 'vertical' padding = '0, 0, 0, 0'>
 			<widget name = 'Container'
@@ -1308,6 +1314,12 @@
 		</layout>
 	</dialog>
 
+	<dialog name = 'GameOptions_KeyMapper_Container' overlays = 'GameOptions_KeyMapper.Container'>
+		<layout type = 'vertical' padding = '0, 0, 0, 0'>
+			<import layout = 'Dialog.GlobalOptions_KeyMapper_Container' />
+		</layout>
+	</dialog>
+
 	<dialog name = 'GameOptions_Backend' overlays = 'Dialog.GameOptions.TabWidget'>
 		<layout type = 'vertical' padding = '0, 0, 0, 0'>
 			<widget name = 'Container'
@@ -1629,6 +1641,12 @@
 		</layout>
 	</dialog>
 
+	<dialog name = 'GlobalConfig_KeyMapper_Container' overlays = 'GlobalConfig_KeyMapper.Container'>
+		<layout type = 'vertical' padding = '0, 0, 0, 0'>
+			<import layout = 'Dialog.GlobalOptions_KeyMapper_Container' />
+		</layout>
+	</dialog>
+
 	<dialog name = 'GlobalConfig_Backend' overlays = 'Dialog.GlobalConfig.TabWidget'>
 		<layout type = 'vertical' padding = '0, 0, 0, 0'>
 			<widget name = 'Container'


Commit: efec9b2d258e72f68ecab32ae391e16b85d6677a
    https://github.com/scummvm/scummvm/commit/efec9b2d258e72f68ecab32ae391e16b85d6677a
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2024-06-14T01:15:12+02:00

Commit Message:
GUI: Remove built-in scroll containers from OptionsContainerWidget

Changed paths:
    backends/keymapper/remap-widget.cpp
    backends/platform/3ds/options.cpp
    backends/platform/android/options.cpp
    backends/platform/ios7/ios7_options.mm
    backends/platform/libretro/src/libretro-options-widget.cpp
    engines/ags/dialogs.cpp
    engines/dialogs.cpp
    engines/mohawk/dialogs.cpp
    engines/neverhood/dialogs.cpp
    engines/sci/dialogs.cpp
    engines/scumm/dialogs.h
    engines/twp/dialogs.cpp
    gui/widget.cpp
    gui/widget.h


diff --git a/backends/keymapper/remap-widget.cpp b/backends/keymapper/remap-widget.cpp
index 21346fb141e..cc41dc9f0e4 100644
--- a/backends/keymapper/remap-widget.cpp
+++ b/backends/keymapper/remap-widget.cpp
@@ -44,7 +44,7 @@ enum {
 };
 
 RemapWidget::RemapWidget(GuiObject *boss, const Common::String &name, const KeymapArray &keymaps) :
-		OptionsContainerWidget(boss, name, "", false, ""),
+		OptionsContainerWidget(boss, name, "", ""),
 		_keymapTable(keymaps),
 		_remapKeymap(nullptr),
 		_remapAction(nullptr),
diff --git a/backends/platform/3ds/options.cpp b/backends/platform/3ds/options.cpp
index d5c99b41393..61c546f5019 100644
--- a/backends/platform/3ds/options.cpp
+++ b/backends/platform/3ds/options.cpp
@@ -59,7 +59,7 @@ private:
 };
 
 N3DSOptionsWidget::N3DSOptionsWidget(GuiObject *boss, const Common::String &name, const Common::String &domain) :
-		OptionsContainerWidget(boss, name, "N3DSOptionsDialog", false, domain), _enabled(true) {
+		OptionsContainerWidget(boss, name, "N3DSOptionsDialog", domain), _enabled(true) {
 
 	_showCursorCheckbox = new GUI::CheckboxWidget(widgetsBoss(), "N3DSOptionsDialog.ShowCursor", _("Show mouse cursor"), Common::U32String(), 0, 'T');
 	_snapToBorderCheckbox = new GUI::CheckboxWidget(widgetsBoss(), "N3DSOptionsDialog.SnapToBorder", _("Snap to edges"), Common::U32String(), 0, 'T');
diff --git a/backends/platform/android/options.cpp b/backends/platform/android/options.cpp
index 4974e4dac7f..0d1c5c1e7b2 100644
--- a/backends/platform/android/options.cpp
+++ b/backends/platform/android/options.cpp
@@ -124,7 +124,7 @@ enum {
 };
 
 AndroidOptionsWidget::AndroidOptionsWidget(GuiObject *boss, const Common::String &name, const Common::String &domain) :
-		OptionsContainerWidget(boss, name, "AndroidOptionsDialog", false, domain), _enabled(true) {
+		OptionsContainerWidget(boss, name, "AndroidOptionsDialog", domain), _enabled(true) {
 
 	const bool inAppDomain = domain.equalsIgnoreCase(Common::ConfigManager::kApplicationDomain);;
 
diff --git a/backends/platform/ios7/ios7_options.mm b/backends/platform/ios7/ios7_options.mm
index d52bb0d4c74..d6243b10aba 100644
--- a/backends/platform/ios7/ios7_options.mm
+++ b/backends/platform/ios7/ios7_options.mm
@@ -92,7 +92,7 @@ private:
 };
 
 IOS7OptionsWidget::IOS7OptionsWidget(GuiObject *boss, const Common::String &name, const Common::String &domain) :
-		OptionsContainerWidget(boss, name, "IOS7OptionsDialog", false, domain), _enabled(true) {
+		OptionsContainerWidget(boss, name, "IOS7OptionsDialog", domain), _enabled(true) {
 
 	_gamepadControllerCheckbox = new GUI::CheckboxWidget(widgetsBoss(), "IOS7OptionsDialog.GamepadController", _("Show Gamepad Controller (iOS 15 and later)"));
 	_gamepadControllerOpacityDesc = new GUI::StaticTextWidget(widgetsBoss(), "IOS7OptionsDialog.GamepadControllerOpacity", _("Gamepad opacity"));
diff --git a/backends/platform/libretro/src/libretro-options-widget.cpp b/backends/platform/libretro/src/libretro-options-widget.cpp
index f9f902bb907..011ea6cebc4 100644
--- a/backends/platform/libretro/src/libretro-options-widget.cpp
+++ b/backends/platform/libretro/src/libretro-options-widget.cpp
@@ -41,7 +41,7 @@ enum {
 };
 
 LibretroOptionsWidget::LibretroOptionsWidget(GuiObject *boss, const Common::String &name, const Common::String &domain) :
-	OptionsContainerWidget(boss, name, "LibretroOptionsDialog", false, domain) {
+	OptionsContainerWidget(boss, name, "LibretroOptionsDialog", domain) {
 
 	new GUI::StaticTextWidget(widgetsBoss(), "LibretroOptionsDialog.PlaylistHeader", _("LIBRETRO PLAYLIST GENERATOR"));
 	new GUI::StaticTextWidget(widgetsBoss(), "LibretroOptionsDialog.PlaylistSubheader", _("(check '? > Libretro playlist' for detailed info)"));
diff --git a/engines/ags/dialogs.cpp b/engines/ags/dialogs.cpp
index fdd205f112e..4b54bb32d0d 100644
--- a/engines/ags/dialogs.cpp
+++ b/engines/ags/dialogs.cpp
@@ -55,7 +55,7 @@ private:
 };
 
 AGSOptionsWidget::AGSOptionsWidget(GuiObject *boss, const Common::String &name, const Common::String &domain) :
-	OptionsContainerWidget(boss, name, "AGSGameOptionsDialog", false, domain) {
+	OptionsContainerWidget(boss, name, "AGSGameOptionsDialog", domain) {
 
 	// Language
 	GUI::StaticTextWidget *textWidget = new GUI::StaticTextWidget(widgetsBoss(), _dialogLayout + ".translation_desc", _("Game language:"), _("Language to use for multilingual games"));
diff --git a/engines/dialogs.cpp b/engines/dialogs.cpp
index c588135a2a2..80281c411bd 100644
--- a/engines/dialogs.cpp
+++ b/engines/dialogs.cpp
@@ -410,7 +410,7 @@ void ConfigDialog::apply() {
 }
 
 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), domain),
 		_options(options) {
 
 	for (uint i = 0; i < _options.size(); i++) {
diff --git a/engines/mohawk/dialogs.cpp b/engines/mohawk/dialogs.cpp
index 9b937d99bce..9da7d85f33b 100644
--- a/engines/mohawk/dialogs.cpp
+++ b/engines/mohawk/dialogs.cpp
@@ -93,7 +93,7 @@ enum {
 #ifdef ENABLE_MYST
 
 MystOptionsWidget::MystOptionsWidget(GuiObject *boss, const Common::String &name, const Common::String &domain) :
-		OptionsContainerWidget(boss, name, "MystGameOptionsDialog", false, domain),
+		OptionsContainerWidget(boss, name, "MystGameOptionsDialog", domain),
 		_zipModeCheckbox(nullptr),
 		_transitionsCheckbox(nullptr),
 		_mystFlyByCheckbox(nullptr),
@@ -349,7 +349,7 @@ void MystMenuDialog::handleCommand(GUI::CommandSender *sender, uint32 cmd, uint3
 #ifdef ENABLE_RIVEN
 
 RivenOptionsWidget::RivenOptionsWidget(GuiObject *boss, const Common::String &name, const Common::String &domain) :
-		OptionsContainerWidget(boss, name, "RivenOptionsDialog", false, domain),
+		OptionsContainerWidget(boss, name, "RivenOptionsDialog", domain),
 		_languagePopUp(nullptr) {
 	Common::String guiOptions = ConfMan.get("guioptions", domain);
 	bool is25th = checkGameGUIOption(GAMEOPTION_25TH, guiOptions);
diff --git a/engines/neverhood/dialogs.cpp b/engines/neverhood/dialogs.cpp
index 263a90e2d7b..a9efd0da54f 100644
--- a/engines/neverhood/dialogs.cpp
+++ b/engines/neverhood/dialogs.cpp
@@ -35,7 +35,7 @@
 namespace Neverhood {
 
 NeverhoodOptionsWidget::NeverhoodOptionsWidget(GuiObject *boss, const Common::String &name, const Common::String &domain) :
-		OptionsContainerWidget(boss, name, "NeverhoodGameOptionsDialog", false, domain),
+		OptionsContainerWidget(boss, name, "NeverhoodGameOptionsDialog", domain),
 		_originalSaveLoadCheckbox(nullptr),
 		_skipHallOfRecordsCheckbox(nullptr),
 		_scaleMakingOfVideosCheckbox(nullptr),
diff --git a/engines/sci/dialogs.cpp b/engines/sci/dialogs.cpp
index 55e69b35301..a92e7d9baac 100644
--- a/engines/sci/dialogs.cpp
+++ b/engines/sci/dialogs.cpp
@@ -35,7 +35,7 @@
 namespace Sci {
 
 OptionsWidget::OptionsWidget(GuiObject *boss, const Common::String &name, const Common::String &domain) :
-		OptionsContainerWidget(boss, name, "SciGameOptionsDialog", false, domain) {
+		OptionsContainerWidget(boss, name, "SciGameOptionsDialog", domain) {
 	_guiOptions = ConfMan.get("guioptions", domain);
 
 	for (const ADExtraGuiOptionsMap *entry = optionsList; entry->guioFlag; ++entry)
diff --git a/engines/scumm/dialogs.h b/engines/scumm/dialogs.h
index 85c06a136ca..6db9a1d3c77 100644
--- a/engines/scumm/dialogs.h
+++ b/engines/scumm/dialogs.h
@@ -222,7 +222,7 @@ private:
 class ScummOptionsContainerWidget : public GUI::OptionsContainerWidget {
 public:
 	ScummOptionsContainerWidget(GuiObject *boss, const Common::String &name, const Common::String &dialogLayout, const Common::String &domain) :
-		OptionsContainerWidget(boss, name, dialogLayout, false, domain) {
+		OptionsContainerWidget(boss, name, dialogLayout, domain) {
 	}
 
 	enum {
diff --git a/engines/twp/dialogs.cpp b/engines/twp/dialogs.cpp
index cc97d605ccd..b8e8987596e 100644
--- a/engines/twp/dialogs.cpp
+++ b/engines/twp/dialogs.cpp
@@ -28,7 +28,7 @@
 
 namespace Twp {
 
-TwpOptionsContainerWidget::TwpOptionsContainerWidget(GuiObject *boss, const Common::String &name, const Common::String &domain) : OptionsContainerWidget(boss, name, "TwpGameOptionsDialog", false, domain) {
+TwpOptionsContainerWidget::TwpOptionsContainerWidget(GuiObject *boss, const Common::String &name, const Common::String &domain) : OptionsContainerWidget(boss, name, "TwpGameOptionsDialog", domain) {
 	GUI::StaticTextWidget *text = new GUI::StaticTextWidget(widgetsBoss(), "TwpGameOptionsDialog.VideoLabel", _("Video:"));
 	text->setAlign(Graphics::TextAlign::kTextAlignStart);
 
diff --git a/gui/widget.cpp b/gui/widget.cpp
index a8d2f081371..6e2984bd94f 100644
--- a/gui/widget.cpp
+++ b/gui/widget.cpp
@@ -1072,27 +1072,16 @@ void ContainerWidget::drawWidget() {
 #pragma mark -
 
 OptionsContainerWidget::OptionsContainerWidget(GuiObject *boss, const Common::String &name, const Common::String &dialogLayout,
-											   bool scrollable, const Common::String &domain) :
+											   const Common::String &domain) :
 		Widget(boss, name),
 		_domain(domain),
 		_dialogLayout(dialogLayout),
-		_parentDialog(nullptr),
-		_scrollContainer(nullptr) {
-
-	if (scrollable) {
-		_scrollContainer = new ScrollContainerWidget(this, name, _dialogLayout, kReflowCmd);
-		_scrollContainer->setTarget(this);
-		_scrollContainer->setBackgroundType(GUI::ThemeEngine::kWidgetBackgroundNo);
-	}
+		_parentDialog(nullptr) {
 }
 
 OptionsContainerWidget::~OptionsContainerWidget() {
 }
 
-uint16 OptionsContainerWidget::getWidth() const {
-	return _scrollContainer ? _scrollContainer->getWidth() : _w;
-}
-
 void OptionsContainerWidget::reflowLayout() {
 	Widget::reflowLayout();
 
@@ -1101,13 +1090,7 @@ void OptionsContainerWidget::reflowLayout() {
 		// we have to create it every time.
 		defineLayout(*g_gui.xmlEval(), _dialogLayout, _name);
 
-		if (!_scrollContainer) {
-			g_gui.xmlEval()->reflowDialogLayout(_dialogLayout, _firstWidget);
-		}
-	}
-
-	if (_scrollContainer) {
-		_scrollContainer->resize(_x, _y, _w, _h, false);
+		g_gui.xmlEval()->reflowDialogLayout(_dialogLayout, _firstWidget);
 	}
 
 	Widget *w = _firstWidget;
@@ -1136,12 +1119,4 @@ void OptionsContainerWidget::removeWidget(Widget *widget) {
 	Widget::removeWidget(widget);
 }
 
-GuiObject *OptionsContainerWidget::widgetsBoss() {
-	if (_scrollContainer) {
-		return _scrollContainer;
-	}
-
-	return this;
-}
-
 } // End of namespace GUI
diff --git a/gui/widget.h b/gui/widget.h
index 49f11d81dcb..c575cbf2f2a 100644
--- a/gui/widget.h
+++ b/gui/widget.h
@@ -535,7 +535,7 @@ public:
 	 * @param domain       the configuration manager domain this widget is meant to edit
 	 */
 	OptionsContainerWidget(GuiObject *boss, const Common::String &name, const Common::String &dialogLayout,
-	                       bool scrollable, const Common::String &domain);
+	                       const Common::String &domain);
 	~OptionsContainerWidget() override;
 
 	/** Implementing classes should (re)initialize their widgets with state from the configuration domain */
@@ -560,14 +560,7 @@ public:
 	void setParentDialog(Dialog *parentDialog) { _parentDialog = parentDialog; }
 	void setDomain(const Common::String &domain) { _domain = domain; }
 
-	uint16 getWidth() const override;
-
 protected:
-	enum {
-		/** The command that gets sent when the scroll container needs to reflow its contents */
-		kReflowCmd = 'REFL'
-	};
-
 	// Widget API
 	void reflowLayout() override;
 	void drawWidget() override {}
@@ -576,7 +569,7 @@ protected:
 	void removeWidget(Widget *widget) override;
 
 	/** The pareent object to use when creating child widgets */
-	GuiObject *widgetsBoss();
+	GuiObject *widgetsBoss() { return this; }
 
 	/**
 	 * Child classes can override this method to define the layout used by the contained widgets in the layout system
@@ -589,9 +582,6 @@ protected:
 	const Common::String _dialogLayout;
 
 	Dialog *_parentDialog;
-
-private:
-	ScrollContainerWidget *_scrollContainer;
 };
 
 ButtonWidget *addClearButton(GuiObject *boss, const Common::String &name, uint32 cmd, int x=0, int y=0, int w=0, int h=0, bool scale = false);


Commit: fd7ebd7925482b6438e31d6514aa535e9178040d
    https://github.com/scummvm/scummvm/commit/fd7ebd7925482b6438e31d6514aa535e9178040d
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2024-06-14T01:15:12+02:00

Commit Message:
GUI: Fix scrolling the game tab in the options

Changed paths:
    engines/dialogs.cpp
    gui/editgamedialog.cpp
    gui/editgamedialog.h
    gui/themes/common/highres_layout.stx
    gui/themes/common/lowres_layout.stx
    gui/themes/default.inc
    gui/themes/scummclassic/classic_layout.stx
    gui/themes/scummclassic/classic_layout_lowres.stx


diff --git a/engines/dialogs.cpp b/engines/dialogs.cpp
index 80281c411bd..3c3709675bf 100644
--- a/engines/dialogs.cpp
+++ b/engines/dialogs.cpp
@@ -298,10 +298,14 @@ ConfigDialog::ConfigDialog() :
 	// The game specific options tab
 	//
 
-	int tabId = tab->addTab(_("Game"), "GlobalConfig_Engine");
+	int tabId = tab->addTab(_("Game"), "GlobalConfig_Engine", false);
 
 	if (g_engine->hasFeature(Engine::kSupportsChangingOptionsDuringRuntime)) {
-		_engineOptions = metaEngine->buildEngineOptionsWidget(tab, "GlobalConfig_Engine.Container", gameDomain);
+		ScrollContainerWidget *engineContainer = new ScrollContainerWidget(tab, "GlobalConfig_Engine.Container", "GlobalConfig_Engine_Container");
+		engineContainer->setBackgroundType(ThemeEngine::kWidgetBackgroundNo);
+		engineContainer->setTarget(this);
+
+		_engineOptions = metaEngine->buildEngineOptionsWidget(engineContainer, "GlobalConfig_Engine_Container.Container", gameDomain);
 	}
 
 	if (_engineOptions) {
diff --git a/gui/editgamedialog.cpp b/gui/editgamedialog.cpp
index c4986e2da55..c20ede88ac8 100644
--- a/gui/editgamedialog.cpp
+++ b/gui/editgamedialog.cpp
@@ -134,49 +134,13 @@ EditGameDialog::EditGameDialog(const Common::String &domain)
 	//
 	// 1) The game tab
 	//
-	tab->addTab(_("Game"), "GameOptions_Game");
+	tab->addTab(_("Game"), "GameOptions_Game", false);
 
-	// GUI:  Label & edit widget for the game ID
-	if (!g_gui.useLowResGUI())
-		new StaticTextWidget(tab, "GameOptions_Game.Id", _("ID:"), _("Short game identifier used for referring to saved games and running the game from the command line"));
-	else
-		new StaticTextWidget(tab, "GameOptions_Game.Id", _c("ID:", "lowres"), _("Short game identifier used for referring to saved games and running the game from the command line"));
-	_domainWidget = new DomainEditTextWidget(tab, "GameOptions_Game.Domain", _domain, _("Short game identifier used for referring to saved games and running the game from the command line"));
+	_gameContainer = new ScrollContainerWidget(tab, "GameOptions_Game.Container", "GameOptions_Game_Container");
+	_gameContainer->setBackgroundType(ThemeEngine::kWidgetBackgroundNo);
+	_gameContainer->setTarget(this);
 
-	// GUI:  Label & edit widget for the description
-	if (!g_gui.useLowResGUI())
-		new StaticTextWidget(tab, "GameOptions_Game.Name", _("Name:"), _("Full title of the game"));
-	else
-		new StaticTextWidget(tab, "GameOptions_Game.Name", _c("Name:", "lowres"), _("Full title of the game"));
-	_descriptionWidget = new EditTextWidget(tab, "GameOptions_Game.Desc", description, _("Full title of the game"));
-
-	// Language popup
-	_langPopUpDesc = nullptr;
-	_langPopUp = nullptr;
-	if (!_guioptions.contains(GUIO_NOLANG)) {
-		_langPopUpDesc = new StaticTextWidget(tab, "GameOptions_Game.LangPopupDesc", _("Language:"), _("Language of the game. This will not turn your Spanish game version into English"));
-		_langPopUp = new PopUpWidget(tab, "GameOptions_Game.LangPopup", _("Language of the game. This will not turn your Spanish game version into English"));
-		_langPopUp->appendEntry(_("<default>"), (uint32)Common::UNK_LANG);
-		_langPopUp->appendEntry("", (uint32)Common::UNK_LANG);
-		const Common::LanguageDescription *l = Common::g_languages;
-		for (; l->code; ++l) {
-			if (checkGameGUIOptionLanguage(l->id, _guioptionsString))
-				_langPopUp->appendEntry(l->description, l->id);
-		}
-	}
-
-	// Platform popup
-	if (!g_gui.useLowResGUI())
-		_platformPopUpDesc = new StaticTextWidget(tab, "GameOptions_Game.PlatformPopupDesc", _("Platform:"), _("Platform the game was originally designed for"));
-	else
-		_platformPopUpDesc = new StaticTextWidget(tab, "GameOptions_Game.PlatformPopupDesc", _c("Platform:", "lowres"), _("Platform the game was originally designed for"));
-	_platformPopUp = new PopUpWidget(tab, "GameOptions_Game.PlatformPopup", _("Platform the game was originally designed for"));
-	_platformPopUp->appendEntry(_("<default>"));
-	_platformPopUp->appendEntry("");
-	const Common::PlatformDescription *p = Common::g_platforms;
-	for (; p->code; ++p) {
-		_platformPopUp->appendEntry(p->description, p->id);
-	}
+	addGameControls(_gameContainer, "GameOptions_Game_Container.", description);
 
 	//
 	// 2) The engine's game settings (shown only if the engine implements one or there are custom engine options)
@@ -184,7 +148,7 @@ EditGameDialog::EditGameDialog(const Common::String &domain)
 
 	if (enginePlugin) {
 		enginePlugin->get<MetaEngine>().registerDefaultSettings(_domain);
-		_engineOptions = enginePlugin->get<MetaEngine>().buildEngineOptionsWidget(tab, "GameOptions_Game.Container", _domain);
+		_engineOptions = enginePlugin->get<MetaEngine>().buildEngineOptionsWidget(_gameContainer, "GameOptions_Game_Container.Container", _domain);
 
 		if (_engineOptions) {
 			_engineOptions->setParentDialog(this);
@@ -368,6 +332,50 @@ EditGameDialog::EditGameDialog(const Common::String &domain)
 	new ButtonWidget(this, "GameOptions.Ok", _("OK"), Common::U32String(), kOKCmd);
 }
 
+void EditGameDialog::addGameControls(GuiObject *boss, const Common::String &prefix, const Common::String &description) {
+	// GUI:  Label & edit widget for the game ID
+	if (!g_gui.useLowResGUI())
+		new StaticTextWidget(boss, prefix + "Id", _("ID:"), _("Short game identifier used for referring to saved games and running the game from the command line"));
+	else
+		new StaticTextWidget(boss, prefix + "Id", _c("ID:", "lowres"), _("Short game identifier used for referring to saved games and running the game from the command line"));
+	_domainWidget = new DomainEditTextWidget(boss, prefix + "Domain", _domain, _("Short game identifier used for referring to saved games and running the game from the command line"));
+
+	// GUI:  Label & edit widget for the description
+	if (!g_gui.useLowResGUI())
+		new StaticTextWidget(boss, prefix + "Name", _("Name:"), _("Full title of the game"));
+	else
+		new StaticTextWidget(boss, prefix + "Name", _c("Name:", "lowres"), _("Full title of the game"));
+	_descriptionWidget = new EditTextWidget(boss, prefix + "Desc", description, _("Full title of the game"));
+
+	// Language popup
+	_langPopUpDesc = nullptr;
+	_langPopUp = nullptr;
+	if (!_guioptions.contains(GUIO_NOLANG)) {
+		_langPopUpDesc = new StaticTextWidget(boss, prefix + "LangPopupDesc", _("Language:"), _("Language of the game. This will not turn your Spanish game version into English"));
+		_langPopUp = new PopUpWidget(boss, prefix + "LangPopup", _("Language of the game. This will not turn your Spanish game version into English"));
+		_langPopUp->appendEntry(_("<default>"), (uint32)Common::UNK_LANG);
+		_langPopUp->appendEntry("", (uint32)Common::UNK_LANG);
+		const Common::LanguageDescription *l = Common::g_languages;
+		for (; l->code; ++l) {
+			if (checkGameGUIOptionLanguage(l->id, _guioptionsString))
+				_langPopUp->appendEntry(l->description, l->id);
+		}
+	}
+
+	// Platform popup
+	if (!g_gui.useLowResGUI())
+		_platformPopUpDesc = new StaticTextWidget(boss, prefix + "PlatformPopupDesc", _("Platform:"), _("Platform the game was originally designed for"));
+	else
+		_platformPopUpDesc = new StaticTextWidget(boss, prefix + "PlatformPopupDesc", _c("Platform:", "lowres"), _("Platform the game was originally designed for"));
+	_platformPopUp = new PopUpWidget(boss, prefix + "PlatformPopup", _("Platform the game was originally designed for"));
+	_platformPopUp->appendEntry(_("<default>"));
+	_platformPopUp->appendEntry("");
+	const Common::PlatformDescription *p = Common::g_platforms;
+	for (; p->code; ++p) {
+		_platformPopUp->appendEntry(p->description, p->id);
+	}
+}
+
 void EditGameDialog::setupGraphicsTab() {
 	OptionsDialog::setupGraphicsTab();
 	_globalGraphicsOverride->setVisible(true);
diff --git a/gui/editgamedialog.h b/gui/editgamedialog.h
index b7b31bc5758..b02142bfef6 100644
--- a/gui/editgamedialog.h
+++ b/gui/editgamedialog.h
@@ -67,6 +67,8 @@ public:
 protected:
 	void setupGraphicsTab() override;
 
+	void addGameControls(GuiObject *boss, const Common::String &prefix, const Common::String &description);
+
 	EditTextWidget *_descriptionWidget;
 	DomainEditTextWidget *_domainWidget;
 
@@ -88,6 +90,7 @@ protected:
 	CheckboxWidget *_globalMT32Override;
 	CheckboxWidget *_globalVolumeOverride;
 
+	ScrollContainerWidget *_gameContainer;
 	OptionsContainerWidget *_engineOptions;
 };
 
diff --git a/gui/themes/common/highres_layout.stx b/gui/themes/common/highres_layout.stx
index 68a76e6c616..6c497348460 100644
--- a/gui/themes/common/highres_layout.stx
+++ b/gui/themes/common/highres_layout.stx
@@ -1740,7 +1740,15 @@
 		</layout>
 	</dialog>
 
-	<dialog name = 'GameOptions_Game' overlays = 'Dialog.GameOptions.TabWidget' shading = 'dim'>
+	<dialog name = 'GameOptions_Game' overlays = 'Dialog.GameOptions.TabWidget'>
+		<layout type = 'vertical' padding = '0, 0, 0, 0'>
+			<widget name = 'Container'
+					type = 'ScrollContainerWidget'
+			/>
+		</layout>
+	</dialog>
+
+	<dialog name = 'GameOptions_Game_Container' overlays = 'GameOptions_Game.Container' shading = 'dim'>
 		<layout type = 'vertical' padding = '16, 16, 16, 16'>
 			<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' align = 'center'>
 				<widget name = 'Id'
@@ -1880,6 +1888,14 @@
 	</dialog>
 
 	<dialog name = 'GlobalConfig_Engine' overlays = 'Dialog.GlobalConfig.TabWidget'>
+		<layout type = 'vertical' padding = '0, 0, 0, 0'>
+			<widget name = 'Container'
+					type = 'ScrollContainerWidget'
+			/>
+		</layout>
+	</dialog>
+
+	<dialog name = 'GlobalConfig_Engine_Container' overlays = 'GlobalConfig_Engine.Container'>
 		<layout type = 'vertical' padding = '8, 8, 8, 8'>
 			<widget name = 'Container'/>
 		</layout>
diff --git a/gui/themes/common/lowres_layout.stx b/gui/themes/common/lowres_layout.stx
index b561ee047ef..c9ddb8b8149 100644
--- a/gui/themes/common/lowres_layout.stx
+++ b/gui/themes/common/lowres_layout.stx
@@ -1570,7 +1570,15 @@
 		</layout>
 	</dialog>
 
-	<dialog name = 'GameOptions_Game' overlays = 'Dialog.GameOptions.TabWidget' shading = 'dim'>
+	<dialog name = 'GameOptions_Game' overlays = 'Dialog.GameOptions.TabWidget'>
+		<layout type = 'vertical' padding = '0, 0, 0, 0'>
+			<widget name = 'Container'
+					type = 'ScrollContainerWidget'
+			/>
+		</layout>
+	</dialog>
+
+	<dialog name = 'GameOptions_Game_Container' overlays = 'GameOptions_Game.Container' shading = 'dim'>
 		<layout type = 'vertical' padding = '8, 8, 8, 8'>
 			<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '6' align = 'center'>
 				<widget name = 'Id'
@@ -1719,6 +1727,14 @@
 	</dialog>
 
 	<dialog name = 'GlobalConfig_Engine' overlays = 'Dialog.GlobalConfig.TabWidget'>
+		<layout type = 'vertical' padding = '0, 0, 0, 0'>
+			<widget name = 'Container'
+					type = 'ScrollContainerWidget'
+			/>
+		</layout>
+	</dialog>
+
+	<dialog name = 'GlobalConfig_Engine_Container' overlays = 'GlobalConfig_Engine.Container'>
 		<layout type = 'vertical' padding = '8, 8, 8, 8'>
 			<widget name = 'Container'/>
 		</layout>
diff --git a/gui/themes/default.inc b/gui/themes/default.inc
index 81903e57a80..b4a4fd8e9e3 100644
--- a/gui/themes/default.inc
+++ b/gui/themes/default.inc
@@ -2724,7 +2724,14 @@ const char *defaultXML1 = "<?xml version = '1.0'?>"
 "<import layout='Dialog.GlobalOptions_Volume' />"
 "</layout>"
 "</dialog>"
-"<dialog name='GameOptions_Game' overlays='Dialog.GameOptions.TabWidget' shading='dim'>"
+"<dialog name='GameOptions_Game' overlays='Dialog.GameOptions.TabWidget'>"
+"<layout type='vertical' padding='0,0,0,0'>"
+"<widget name='Container' "
+"type='ScrollContainerWidget' "
+"/>"
+"</layout>"
+"</dialog>"
+"<dialog name='GameOptions_Game_Container' overlays='GameOptions_Game.Container' shading='dim'>"
 "<layout type='vertical' padding='16,16,16,16'>"
 "<layout type='horizontal' padding='0,0,0,0' spacing='10' align='center'>"
 "<widget name='Id' "
@@ -2860,6 +2867,13 @@ const char *defaultXML1 = "<?xml version = '1.0'?>"
 "</layout>"
 "</dialog>"
 "<dialog name='GlobalConfig_Engine' overlays='Dialog.GlobalConfig.TabWidget'>"
+"<layout type='vertical' padding='0,0,0,0'>"
+"<widget name='Container' "
+"type='ScrollContainerWidget' "
+"/>"
+"</layout>"
+"</dialog>"
+"<dialog name='GlobalConfig_Engine_Container' overlays='GlobalConfig_Engine.Container'>"
 "<layout type='vertical' padding='8,8,8,8'>"
 "<widget name='Container'/>"
 "</layout>"
@@ -5049,7 +5063,14 @@ const char *defaultXML1 = "<?xml version = '1.0'?>"
 "<import layout='Dialog.GlobalOptions_Volume' />"
 "</layout>"
 "</dialog>"
-"<dialog name='GameOptions_Game' overlays='Dialog.GameOptions.TabWidget' shading='dim'>"
+"<dialog name='GameOptions_Game' overlays='Dialog.GameOptions.TabWidget'>"
+"<layout type='vertical' padding='0,0,0,0'>"
+"<widget name='Container' "
+"type='ScrollContainerWidget' "
+"/>"
+"</layout>"
+"</dialog>"
+"<dialog name='GameOptions_Game_Container' overlays='GameOptions_Game.Container' shading='dim'>"
 "<layout type='vertical' padding='8,8,8,8'>"
 "<layout type='horizontal' padding='0,0,0,0' spacing='6' align='center'>"
 "<widget name='Id' "
@@ -5195,6 +5216,13 @@ const char *defaultXML1 = "<?xml version = '1.0'?>"
 "</layout>"
 "</dialog>"
 "<dialog name='GlobalConfig_Engine' overlays='Dialog.GlobalConfig.TabWidget'>"
+"<layout type='vertical' padding='0,0,0,0'>"
+"<widget name='Container' "
+"type='ScrollContainerWidget' "
+"/>"
+"</layout>"
+"</dialog>"
+"<dialog name='GlobalConfig_Engine_Container' overlays='GlobalConfig_Engine.Container'>"
 "<layout type='vertical' padding='8,8,8,8'>"
 "<widget name='Container'/>"
 "</layout>"
diff --git a/gui/themes/scummclassic/classic_layout.stx b/gui/themes/scummclassic/classic_layout.stx
index b714e67feb8..8489a4e587b 100644
--- a/gui/themes/scummclassic/classic_layout.stx
+++ b/gui/themes/scummclassic/classic_layout.stx
@@ -1387,7 +1387,15 @@
 		</layout>
 	</dialog>
 
-	<dialog name = 'GameOptions_Game' overlays = 'Dialog.GameOptions.TabWidget' shading = 'dim'>
+	<dialog name = 'GameOptions_Game' overlays = 'Dialog.GameOptions.TabWidget'>
+		<layout type = 'vertical' padding = '0, 0, 0, 0'>
+			<widget name = 'Container'
+					type = 'ScrollContainerWidget'
+			/>
+		</layout>
+	</dialog>
+
+	<dialog name = 'GameOptions_Game_Container' overlays = 'GameOptions_Game.Container' shading = 'dim'>
 		<layout type = 'vertical' padding = '16, 16, 16, 16'>
 			<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' align = 'center'>
 				<widget name = 'Id'
@@ -1527,6 +1535,14 @@
 	</dialog>
 
 	<dialog name = 'GlobalConfig_Engine' overlays = 'Dialog.GlobalConfig.TabWidget'>
+		<layout type = 'vertical' padding = '0, 0, 0, 0'>
+			<widget name = 'Container'
+					type = 'ScrollContainerWidget'
+			/>
+		</layout>
+	</dialog>
+
+	<dialog name = 'GlobalConfig_Engine_Container' overlays = 'GlobalConfig_Engine.Container'>
 		<layout type = 'vertical' padding = '8, 8, 8, 8'>
 			<widget name = 'Container'/>
 		</layout>
diff --git a/gui/themes/scummclassic/classic_layout_lowres.stx b/gui/themes/scummclassic/classic_layout_lowres.stx
index 84b1099d1fe..55df334cccb 100644
--- a/gui/themes/scummclassic/classic_layout_lowres.stx
+++ b/gui/themes/scummclassic/classic_layout_lowres.stx
@@ -1399,7 +1399,15 @@
 		</layout>
 	</dialog>
 
-	<dialog name = 'GameOptions_Game' overlays = 'Dialog.GameOptions.TabWidget' shading = 'dim'>
+	<dialog name = 'GameOptions_Game' overlays = 'Dialog.GameOptions.TabWidget'>
+		<layout type = 'vertical' padding = '0, 0, 0, 0'>
+			<widget name = 'Container'
+					type = 'ScrollContainerWidget'
+			/>
+		</layout>
+	</dialog>
+
+	<dialog name = 'GameOptions_Game_Container' overlays = 'GameOptions_Game.Container' shading = 'dim'>
 		<layout type = 'vertical' padding = '8, 8, 8, 8'>
 			<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '6' align = 'center'>
 				<widget name = 'Id'
@@ -1549,6 +1557,14 @@
 	</dialog>
 
 	<dialog name = 'GlobalConfig_Engine' overlays = 'Dialog.GlobalConfig.TabWidget'>
+		<layout type = 'vertical' padding = '0, 0, 0, 0'>
+			<widget name = 'Container'
+					type = 'ScrollContainerWidget'
+			/>
+		</layout>
+	</dialog>
+
+	<dialog name = 'GlobalConfig_Engine_Container' overlays = 'GlobalConfig_Engine.Container'>
 		<layout type = 'vertical' padding = '8, 8, 8, 8'>
 			<widget name = 'Container'/>
 		</layout>


Commit: a6a369cdd3ce2a6b20b0538a5f28a01d9ce9b4ea
    https://github.com/scummvm/scummvm/commit/a6a369cdd3ce2a6b20b0538a5f28a01d9ce9b4ea
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2024-06-14T01:15:12+02:00

Commit Message:
GUI: Handle padding for the backend and engine options in the theme definitions

Changed paths:
    backends/platform/3ds/options.cpp
    backends/platform/android/options.cpp
    backends/platform/ios7/ios7_options.mm
    backends/platform/libretro/src/libretro-options-widget.cpp
    engines/ags/dialogs.cpp
    engines/dialogs.cpp
    engines/mohawk/dialogs.cpp
    engines/neverhood/dialogs.cpp
    engines/sci/dialogs.cpp
    engines/scumm/dialogs.cpp
    engines/twp/dialogs.cpp
    gui/themes/common/highres_layout.stx
    gui/themes/common/lowres_layout.stx
    gui/themes/default.inc
    gui/themes/scummclassic/classic_layout.stx
    gui/themes/scummclassic/classic_layout_lowres.stx


diff --git a/backends/platform/3ds/options.cpp b/backends/platform/3ds/options.cpp
index 61c546f5019..be6af2644d1 100644
--- a/backends/platform/3ds/options.cpp
+++ b/backends/platform/3ds/options.cpp
@@ -78,7 +78,7 @@ N3DSOptionsWidget::~N3DSOptionsWidget() {
 void N3DSOptionsWidget::defineLayout(GUI::ThemeEval &layouts, const Common::String &layoutName, const Common::String &overlayedLayout) const {
 	layouts.addDialog(layoutName, overlayedLayout)
 	    .addLayout(GUI::ThemeLayout::kLayoutVertical)
-	        .addPadding(8, 8, 8, 8)
+	        .addPadding(0, 0, 0, 0)
 	        .addWidget("ShowCursor", "Checkbox")
 	        .addWidget("SnapToBorder", "Checkbox")
 	        .addWidget("StretchToFit", "Checkbox")
diff --git a/backends/platform/android/options.cpp b/backends/platform/android/options.cpp
index 0d1c5c1e7b2..f1bd868c864 100644
--- a/backends/platform/android/options.cpp
+++ b/backends/platform/android/options.cpp
@@ -198,7 +198,7 @@ void AndroidOptionsWidget::defineLayout(GUI::ThemeEval &layouts, const Common::S
 
 	layouts.addDialog(layoutName, overlayedLayout)
 	        .addLayout(GUI::ThemeLayout::kLayoutVertical)
-	            .addPadding(16, 16, 16, 16)
+	            .addPadding(0, 0, 0, 0)
 	            .addWidget("OnScreenControl", "Checkbox")
 	            .addWidget("PreferredTouchModeText", "", -1, layouts.getVar("Globals.Line.Height"));
 
diff --git a/backends/platform/ios7/ios7_options.mm b/backends/platform/ios7/ios7_options.mm
index d6243b10aba..f2b987b1caf 100644
--- a/backends/platform/ios7/ios7_options.mm
+++ b/backends/platform/ios7/ios7_options.mm
@@ -182,12 +182,12 @@ void IOS7OptionsWidget::defineLayout(GUI::ThemeEval &layouts, const Common::Stri
 #endif
 	            .addWidget("GamepadController", "Checkbox")
 			.addLayout(GUI::ThemeLayout::kLayoutHorizontal)
-				.addPadding(16, 16, 0, 0)
+				.addPadding(0, 0, 0, 0)
 				.addWidget("GamepadControllerLeftButton", "OptionsLabel")
 				.addWidget("GamepadControllerLeftButtonPopUp", "PopUp")
 			.closeLayout()
 	        .addLayout(GUI::ThemeLayout::kLayoutHorizontal)
-	            .addPadding(16, 16, 0, 0)
+	            .addPadding(0, 0, 0, 0)
 	            .addWidget("GamepadControllerOpacity", "OptionsLabel")
 	            .addWidget("GamepadControllerOpacitySlider", "Slider")
 	            .addWidget("GamepadControllerOpacityLabel", "OptionsLabel")
@@ -201,19 +201,19 @@ void IOS7OptionsWidget::defineLayout(GUI::ThemeEval &layouts, const Common::Stri
 
 	if (inAppDomain) {
 		layouts.addLayout(GUI::ThemeLayout::kLayoutHorizontal)
-			.addPadding(16, 16, 0, 0)
+			.addPadding(0, 0, 0, 0)
 			.addWidget("TouchModeMenusText", "OptionsLabel")
 			.addWidget("TouchModeMenus", "PopUp")
 			.closeLayout();
 	}
 	layouts.addLayout(GUI::ThemeLayout::kLayoutHorizontal)
-		.addPadding(16, 16, 0, 0)
+		.addPadding(0, 0, 0, 0)
 		.addWidget("TouchMode2DGamesText", "OptionsLabel")
 		.addWidget("TouchMode2DGames", "PopUp")
 		.closeLayout();
 
 	layouts.addLayout(GUI::ThemeLayout::kLayoutHorizontal)
-		.addPadding(16, 16, 0, 0)
+		.addPadding(0, 0, 0, 0)
 		.addWidget("TouchMode3DGamesText", "OptionsLabel")
 		.addWidget("TouchMode3DGames", "PopUp")
 		.closeLayout();
@@ -221,13 +221,13 @@ void IOS7OptionsWidget::defineLayout(GUI::ThemeEval &layouts, const Common::Stri
 	layouts.addWidget("OrientationText", "", -1, layouts.getVar("Globals.Line.Height"));
 	if (inAppDomain) {
 		layouts.addLayout(GUI::ThemeLayout::kLayoutHorizontal)
-			.addPadding(16, 16, 0, 0)
+			.addPadding(0, 0, 0, 0)
 			.addWidget("OMenusText", "OptionsLabel")
 			.addWidget("OMenus", "PopUp")
 		.closeLayout();
 	}
 	layouts.addLayout(GUI::ThemeLayout::kLayoutHorizontal)
-			.addPadding(16, 16, 0, 0)
+			.addPadding(0, 0, 0, 0)
 			.addWidget("OGamesText", "OptionsLabel")
 			.addWidget("OGames", "PopUp")
 		.closeLayout();
diff --git a/backends/platform/libretro/src/libretro-options-widget.cpp b/backends/platform/libretro/src/libretro-options-widget.cpp
index 011ea6cebc4..99ceac7ffa6 100644
--- a/backends/platform/libretro/src/libretro-options-widget.cpp
+++ b/backends/platform/libretro/src/libretro-options-widget.cpp
@@ -73,7 +73,7 @@ LibretroOptionsWidget::~LibretroOptionsWidget() {
 void LibretroOptionsWidget::defineLayout(GUI::ThemeEval &layouts, const Common::String &layoutName, const Common::String &overlayedLayout) const {
 	layouts.addDialog(layoutName, overlayedLayout)
 	.addLayout(GUI::ThemeLayout::kLayoutVertical, 8)
-	.addPadding(16, 16, 16, 16)
+	.addPadding(0, 0, 0, 0)
 	.addWidget("PlaylistHeader", "", -1, layouts.getVar("Globals.Line.Height"))
 	.addWidget("PlaylistSubheader", "", -1, layouts.getVar("Globals.Line.Height"))
 	.addLayout(GUI::ThemeLayout::kLayoutHorizontal, 10, GUI::ThemeLayout::kItemAlignCenter)
diff --git a/engines/ags/dialogs.cpp b/engines/ags/dialogs.cpp
index 4b54bb32d0d..e852793b0b9 100644
--- a/engines/ags/dialogs.cpp
+++ b/engines/ags/dialogs.cpp
@@ -93,7 +93,7 @@ AGSOptionsWidget::AGSOptionsWidget(GuiObject *boss, const Common::String &name,
 
 void AGSOptionsWidget::defineLayout(GUI::ThemeEval &layouts, const Common::String &layoutName, const Common::String &overlayedLayout) const {
 	layouts.addDialog(layoutName, overlayedLayout);
-	layouts.addLayout(GUI::ThemeLayout::kLayoutVertical).addPadding(16, 16, 16, 16);
+	layouts.addLayout(GUI::ThemeLayout::kLayoutVertical).addPadding(0, 0, 0, 0);
 
 	layouts.addLayout(GUI::ThemeLayout::kLayoutHorizontal).addPadding(0, 0, 0, 0);
 	layouts.addWidget("translation_desc", "OptionsLabel");
diff --git a/engines/dialogs.cpp b/engines/dialogs.cpp
index 3c3709675bf..9c83fde14f1 100644
--- a/engines/dialogs.cpp
+++ b/engines/dialogs.cpp
@@ -496,7 +496,7 @@ bool ExtraGuiOptionsWidget::save() {
 
 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);
+	layouts.addLayout(GUI::ThemeLayout::kLayoutVertical).addPadding(0, 0, 0, 0);
 
 	for (uint i = 0; i < _options.size(); i++) {
 		Common::String id = Common::String::format("%d", i + 1);
diff --git a/engines/mohawk/dialogs.cpp b/engines/mohawk/dialogs.cpp
index 9da7d85f33b..00fd90dd3be 100644
--- a/engines/mohawk/dialogs.cpp
+++ b/engines/mohawk/dialogs.cpp
@@ -175,7 +175,7 @@ MystOptionsWidget::~MystOptionsWidget() {
 void MystOptionsWidget::defineLayout(GUI::ThemeEval &layouts, const Common::String &layoutName, const Common::String &overlayedLayout) const {
 	layouts.addDialog(layoutName, overlayedLayout)
 	            .addLayout(GUI::ThemeLayout::kLayoutVertical)
-	                .addPadding(16, 16, 16, 16)
+	                .addPadding(0, 0, 0, 0)
 	                .addWidget("ZipMode", "Checkbox")
 	                .addWidget("Transistions", "Checkbox")
 	                .addWidget("PlayMystFlyBy", "Checkbox")
@@ -394,7 +394,7 @@ RivenOptionsWidget::~RivenOptionsWidget() {
 void RivenOptionsWidget::defineLayout(GUI::ThemeEval &layouts, const Common::String &layoutName, const Common::String &overlayedLayout) const {
 	layouts.addDialog(layoutName, overlayedLayout)
 	        .addLayout(GUI::ThemeLayout::kLayoutVertical)
-	            .addPadding(16, 16, 16, 16)
+	            .addPadding(0, 0, 0, 0)
 	            .addWidget("ZipMode", "Checkbox")
 	            .addWidget("WaterEffect", "Checkbox")
 	            .addLayout(GUI::ThemeLayout::kLayoutHorizontal)
diff --git a/engines/neverhood/dialogs.cpp b/engines/neverhood/dialogs.cpp
index a9efd0da54f..ccd94b83241 100644
--- a/engines/neverhood/dialogs.cpp
+++ b/engines/neverhood/dialogs.cpp
@@ -102,7 +102,7 @@ NeverhoodOptionsWidget::~NeverhoodOptionsWidget() {
 void NeverhoodOptionsWidget::defineLayout(GUI::ThemeEval &layouts, const Common::String &layoutName, const Common::String &overlayedLayout) const {
 	layouts.addDialog(layoutName, overlayedLayout)
 	            .addLayout(GUI::ThemeLayout::kLayoutVertical)
-	                .addPadding(16, 16, 16, 16)
+	                .addPadding(0, 0, 0, 0)
 	                .addWidget("OriginalSaveLoad", "Checkbox")
 	                .addWidget("SkipHallOfRecords", "Checkbox")
 		        .addWidget("ScaleMakingOfVideos", "Checkbox")
diff --git a/engines/sci/dialogs.cpp b/engines/sci/dialogs.cpp
index a92e7d9baac..10afc5cb4f7 100644
--- a/engines/sci/dialogs.cpp
+++ b/engines/sci/dialogs.cpp
@@ -56,7 +56,7 @@ OptionsWidget::OptionsWidget(GuiObject *boss, const Common::String &name, const
 
 void OptionsWidget::defineLayout(GUI::ThemeEval &layouts, const Common::String &layoutName, const Common::String &overlayedLayout) const {
 	layouts.addDialog(layoutName, overlayedLayout);
-	layouts.addLayout(GUI::ThemeLayout::kLayoutVertical).addPadding(16, 16, 16, 16);
+	layouts.addLayout(GUI::ThemeLayout::kLayoutVertical).addPadding(0, 0, 0, 0);
 
 	for (const ADExtraGuiOptionsMap *entry = optionsList; entry->guioFlag; ++entry)
 		layouts.addWidget(entry->option.configOption, "Checkbox");
diff --git a/engines/scumm/dialogs.cpp b/engines/scumm/dialogs.cpp
index 4a7e576e247..faa04815604 100644
--- a/engines/scumm/dialogs.cpp
+++ b/engines/scumm/dialogs.cpp
@@ -1254,7 +1254,7 @@ bool ScummGameOptionsWidget::save() {
 
 void ScummGameOptionsWidget::defineLayout(GUI::ThemeEval &layouts, const Common::String &layoutName, const Common::String &overlayedLayout) const {
 	layouts.addDialog(layoutName, overlayedLayout);
-	layouts.addLayout(GUI::ThemeLayout::kLayoutVertical).addPadding(0, 0, 8, 8);
+	layouts.addLayout(GUI::ThemeLayout::kLayoutVertical).addPadding(0, 0, 0, 0);
 
 	bool hasEnhancements = false;
 
diff --git a/engines/twp/dialogs.cpp b/engines/twp/dialogs.cpp
index b8e8987596e..684eb57e296 100644
--- a/engines/twp/dialogs.cpp
+++ b/engines/twp/dialogs.cpp
@@ -59,11 +59,9 @@ TwpOptionsContainerWidget::TwpOptionsContainerWidget(GuiObject *boss, const Comm
 
 void TwpOptionsContainerWidget::defineLayout(GUI::ThemeEval &layouts, const Common::String &layoutName, const Common::String &overlayedLayout) const {
 	layouts.addDialog(layoutName, overlayedLayout);
-	layouts.addLayout(GUI::ThemeLayout::kLayoutVertical).addPadding(0, 0, 8, 8);
+	layouts.addLayout(GUI::ThemeLayout::kLayoutVertical).addPadding(0, 0, 0, 0);
 
-	layouts.addPadding(0, 0, 8, 8)
-		.addSpace(10)
-		.addWidget("VideoLabel", "OptionsLabel")
+	layouts.addWidget("VideoLabel", "OptionsLabel")
 		.addWidget("VideoCheck1", "Checkbox")
 		.addWidget("VideoCheck2", "Checkbox")
 		.addWidget("ControlsLabel", "OptionsLabel")
diff --git a/gui/themes/common/highres_layout.stx b/gui/themes/common/highres_layout.stx
index 6c497348460..6c853b80fc5 100644
--- a/gui/themes/common/highres_layout.stx
+++ b/gui/themes/common/highres_layout.stx
@@ -718,7 +718,7 @@
 	</dialog>
 
 	<dialog name = 'GlobalOptions_Backend_Container' overlays = 'GlobalOptions_Backend.Container'>
-		<layout type = 'vertical' padding = '0, 0, 0, 0'>
+		<layout type = 'vertical' padding = '16, 16, 16, 16'>
 			<widget name = 'Container'/>
 		</layout>
 	</dialog>
@@ -1670,12 +1670,10 @@
 	</dialog>
 
 	<dialog name = 'GameOptions_Backend_Container' overlays = 'GameOptions_Backend.Container'>
-		<layout type = 'vertical' padding = '0, 0, 0, 0'>
-			<layout type = 'vertical' padding = '16, 16, 16, 16' spacing = '8'>
-				<widget name = 'EnableTabCheckbox'
-						type = 'Checkbox'
-				/>
-			</layout>
+		<layout type = 'vertical' padding = '16, 16, 16, 16' spacing = '8'>
+			<widget name = 'EnableTabCheckbox'
+					type = 'Checkbox'
+			/>
 			<import layout = 'Dialog.GlobalOptions_Backend_Container' />
 		</layout>
 	</dialog>
@@ -1782,6 +1780,7 @@
 						type = 'PopUp'
 				/>
 			</layout>
+			<space size = '5'/>
 			<widget name = 'Container'/>
 		</layout>
 	</dialog>
@@ -1896,7 +1895,7 @@
 	</dialog>
 
 	<dialog name = 'GlobalConfig_Engine_Container' overlays = 'GlobalConfig_Engine.Container'>
-		<layout type = 'vertical' padding = '8, 8, 8, 8'>
+		<layout type = 'vertical' padding = '16, 16, 16, 16'>
 			<widget name = 'Container'/>
 		</layout>
 	</dialog>
@@ -2008,7 +2007,7 @@
 	</dialog>
 
 	<dialog name = 'GlobalConfig_Backend_Container' overlays = 'GlobalConfig_Backend.Container'>
-		<layout type = 'vertical' padding = '0, 0, 0, 0'>
+		<layout type = 'vertical' padding = '16, 16, 16, 16'>
 			<import layout = 'Dialog.GlobalOptions_Backend_Container' />
 		</layout>
 	</dialog>
diff --git a/gui/themes/common/lowres_layout.stx b/gui/themes/common/lowres_layout.stx
index c9ddb8b8149..f9bdba97373 100644
--- a/gui/themes/common/lowres_layout.stx
+++ b/gui/themes/common/lowres_layout.stx
@@ -558,7 +558,7 @@
 	</dialog>
 
 	<dialog name = 'GlobalOptions_Backend_Container' overlays = 'GlobalOptions_Backend.Container'>
-		<layout type = 'vertical' padding = '0, 0, 0, 0'>
+		<layout type = 'vertical' padding = '8, 8, 8, 8'>
 			<widget name = 'Container'/>
 		</layout>
 	</dialog>
@@ -1500,12 +1500,10 @@
 	</dialog>
 
 	<dialog name = 'GameOptions_Backend_Container' overlays = 'GameOptions_Backend.Container'>
-		<layout type = 'vertical' padding = '0, 0, 0, 0'>
-			<layout type = 'vertical' padding = '16, 16, 16, 16' spacing = '8'>
-				<widget name = 'EnableTabCheckbox'
-						type = 'Checkbox'
-				/>
-			</layout>
+		<layout type = 'vertical' padding = '8, 8, 8, 8' spacing = '6'>
+			<widget name = 'EnableTabCheckbox'
+					type = 'Checkbox'
+			/>
 			<import layout = 'Dialog.GlobalOptions_Backend_Container' />
 		</layout>
 	</dialog>
@@ -1621,6 +1619,7 @@
 						type = 'PopUp'
 				/>
 			</layout>
+			<space size = '2'/>
 			<widget name = 'Container'/>
 		</layout>
 	</dialog>
@@ -1844,7 +1843,7 @@
 	</dialog>
 
 	<dialog name = 'GlobalConfig_Backend_Container' overlays = 'GlobalConfig_Backend.Container'>
-		<layout type = 'vertical' padding = '0, 0, 0, 0'>
+		<layout type = 'vertical' padding = '8, 8, 8, 8'>
 			<import layout = 'Dialog.GlobalOptions_Backend_Container' />
 		</layout>
 	</dialog>
diff --git a/gui/themes/default.inc b/gui/themes/default.inc
index b4a4fd8e9e3..ead26d2f104 100644
--- a/gui/themes/default.inc
+++ b/gui/themes/default.inc
@@ -1788,7 +1788,7 @@ const char *defaultXML1 = "<?xml version = '1.0'?>"
 "</layout>"
 "</dialog>"
 "<dialog name='GlobalOptions_Backend_Container' overlays='GlobalOptions_Backend.Container'>"
-"<layout type='vertical' padding='0,0,0,0'>"
+"<layout type='vertical' padding='16,16,16,16'>"
 "<widget name='Container'/>"
 "</layout>"
 "</dialog>"
@@ -2661,12 +2661,10 @@ const char *defaultXML1 = "<?xml version = '1.0'?>"
 "</layout>"
 "</dialog>"
 "<dialog name='GameOptions_Backend_Container' overlays='GameOptions_Backend.Container'>"
-"<layout type='vertical' padding='0,0,0,0'>"
 "<layout type='vertical' padding='16,16,16,16' spacing='8'>"
 "<widget name='EnableTabCheckbox' "
 "type='Checkbox' "
 "/>"
-"</layout>"
 "<import layout='Dialog.GlobalOptions_Backend_Container' />"
 "</layout>"
 "</dialog>"
@@ -2765,6 +2763,7 @@ const char *defaultXML1 = "<?xml version = '1.0'?>"
 "type='PopUp' "
 "/>"
 "</layout>"
+"<space size='5'/>"
 "<widget name='Container'/>"
 "</layout>"
 "</dialog>"
@@ -2874,7 +2873,7 @@ const char *defaultXML1 = "<?xml version = '1.0'?>"
 "</layout>"
 "</dialog>"
 "<dialog name='GlobalConfig_Engine_Container' overlays='GlobalConfig_Engine.Container'>"
-"<layout type='vertical' padding='8,8,8,8'>"
+"<layout type='vertical' padding='16,16,16,16'>"
 "<widget name='Container'/>"
 "</layout>"
 "</dialog>"
@@ -2980,7 +2979,7 @@ const char *defaultXML1 = "<?xml version = '1.0'?>"
 "</layout>"
 "</dialog>"
 "<dialog name='GlobalConfig_Backend_Container' overlays='GlobalConfig_Backend.Container'>"
-"<layout type='vertical' padding='0,0,0,0'>"
+"<layout type='vertical' padding='16,16,16,16'>"
 "<import layout='Dialog.GlobalOptions_Backend_Container' />"
 "</layout>"
 "</dialog>"
@@ -4121,7 +4120,7 @@ const char *defaultXML1 = "<?xml version = '1.0'?>"
 "</layout>"
 "</dialog>"
 "<dialog name='GlobalOptions_Backend_Container' overlays='GlobalOptions_Backend.Container'>"
-"<layout type='vertical' padding='0,0,0,0'>"
+"<layout type='vertical' padding='8,8,8,8'>"
 "<widget name='Container'/>"
 "</layout>"
 "</dialog>"
@@ -5000,12 +4999,10 @@ const char *defaultXML1 = "<?xml version = '1.0'?>"
 "</layout>"
 "</dialog>"
 "<dialog name='GameOptions_Backend_Container' overlays='GameOptions_Backend.Container'>"
-"<layout type='vertical' padding='0,0,0,0'>"
-"<layout type='vertical' padding='16,16,16,16' spacing='8'>"
+"<layout type='vertical' padding='8,8,8,8' spacing='6'>"
 "<widget name='EnableTabCheckbox' "
 "type='Checkbox' "
 "/>"
-"</layout>"
 "<import layout='Dialog.GlobalOptions_Backend_Container' />"
 "</layout>"
 "</dialog>"
@@ -5113,6 +5110,7 @@ const char *defaultXML1 = "<?xml version = '1.0'?>"
 "type='PopUp' "
 "/>"
 "</layout>"
+"<space size='2'/>"
 "<widget name='Container'/>"
 "</layout>"
 "</dialog>"
@@ -5325,7 +5323,7 @@ const char *defaultXML1 = "<?xml version = '1.0'?>"
 "</layout>"
 "</dialog>"
 "<dialog name='GlobalConfig_Backend_Container' overlays='GlobalConfig_Backend.Container'>"
-"<layout type='vertical' padding='0,0,0,0'>"
+"<layout type='vertical' padding='8,8,8,8'>"
 "<import layout='Dialog.GlobalOptions_Backend_Container' />"
 "</layout>"
 "</dialog>"
diff --git a/gui/themes/scummclassic/classic_layout.stx b/gui/themes/scummclassic/classic_layout.stx
index 8489a4e587b..9403137ad09 100644
--- a/gui/themes/scummclassic/classic_layout.stx
+++ b/gui/themes/scummclassic/classic_layout.stx
@@ -396,7 +396,7 @@
 	</dialog>
 
 	<dialog name = 'GlobalOptions_Backend_Container' overlays = 'GlobalOptions_Backend.Container'>
-		<layout type = 'vertical' padding = '0, 0, 0, 0'>
+		<layout type = 'vertical' padding = '16, 16, 16, 16'>
 			<widget name = 'Container'/>
 		</layout>
 	</dialog>
@@ -1317,12 +1317,10 @@
 	</dialog>
 
 	<dialog name = 'GameOptions_Backend_Container' overlays = 'GameOptions_Backend.Container'>
-		<layout type = 'vertical' padding = '0, 0, 0, 0'>
-			<layout type = 'vertical' padding = '16, 16, 16, 16' spacing = '8'>
-				<widget name = 'EnableTabCheckbox'
-						type = 'Checkbox'
-				/>
-			</layout>
+		<layout type = 'vertical' padding = '16, 16, 16, 16' spacing = '8'>
+			<widget name = 'EnableTabCheckbox'
+					type = 'Checkbox'
+			/>
 			<import layout = 'Dialog.GlobalOptions_Backend_Container' />
 		</layout>
 	</dialog>
@@ -1429,6 +1427,7 @@
 						type = 'PopUp'
 				/>
 			</layout>
+			<space size = '5'/>
 			<widget name = 'Container'/>
 		</layout>
 	</dialog>
@@ -1543,7 +1542,7 @@
 	</dialog>
 
 	<dialog name = 'GlobalConfig_Engine_Container' overlays = 'GlobalConfig_Engine.Container'>
-		<layout type = 'vertical' padding = '8, 8, 8, 8'>
+		<layout type = 'vertical' padding = '16, 16, 16, 16'>
 			<widget name = 'Container'/>
 		</layout>
 	</dialog>
@@ -1655,7 +1654,7 @@
 	</dialog>
 
 	<dialog name = 'GlobalConfig_Backend_Container' overlays = 'GlobalConfig_Backend.Container'>
-		<layout type = 'vertical' padding = '0, 0, 0, 0'>
+		<layout type = 'vertical' padding = '16, 16, 16, 16'>
 			<import layout = 'Dialog.GlobalOptions_Backend_Container' />
 		</layout>
 	</dialog>
diff --git a/gui/themes/scummclassic/classic_layout_lowres.stx b/gui/themes/scummclassic/classic_layout_lowres.stx
index 55df334cccb..4740fc63850 100644
--- a/gui/themes/scummclassic/classic_layout_lowres.stx
+++ b/gui/themes/scummclassic/classic_layout_lowres.stx
@@ -403,7 +403,7 @@
 	</dialog>
 
 	<dialog name = 'GlobalOptions_Backend_Container' overlays = 'GlobalOptions_Backend.Container'>
-		<layout type = 'vertical' padding = '0, 0, 0, 0'>
+		<layout type = 'vertical' padding = '8, 8, 8, 8'>
 			<widget name = 'Container'/>
 		</layout>
 	</dialog>
@@ -1329,12 +1329,10 @@
 	</dialog>
 
 	<dialog name = 'GameOptions_Backend_Container' overlays = 'GameOptions_Backend.Container'>
-		<layout type = 'vertical' padding = '0, 0, 0, 0'>
-			<layout type = 'vertical' padding = '16, 16, 16, 16' spacing = '8'>
-				<widget name = 'EnableTabCheckbox'
-						type = 'Checkbox'
-				/>
-			</layout>
+		<layout type = 'vertical' padding = '8, 8, 8, 8' spacing = '6'>
+			<widget name = 'EnableTabCheckbox'
+					type = 'Checkbox'
+			/>
 			<import layout = 'Dialog.GlobalOptions_Backend_Container' />
 		</layout>
 	</dialog>
@@ -1450,6 +1448,7 @@
 						type = 'PopUp'
 				/>
 			</layout>
+			<space size = '2'/>
 			<widget name = 'Container'/>
 		</layout>
 	</dialog>
@@ -1672,7 +1671,7 @@
 	</dialog>
 
 	<dialog name = 'GlobalConfig_Backend_Container' overlays = 'GlobalConfig_Backend.Container'>
-		<layout type = 'vertical' padding = '0, 0, 0, 0'>
+		<layout type = 'vertical' padding = '8, 8, 8, 8'>
 			<import layout = 'Dialog.GlobalOptions_Backend_Container' />
 		</layout>
 	</dialog>


Commit: 35077b3e950914f998e941e5d6d2cc33d2aa294b
    https://github.com/scummvm/scummvm/commit/35077b3e950914f998e941e5d6d2cc33d2aa294b
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2024-06-14T01:15:12+02:00

Commit Message:
GUI: Use a separate scroll container for the paths tab

Changed paths:
    gui/options.cpp
    gui/options.h
    gui/themes/common/highres_layout.stx
    gui/themes/common/lowres_layout.stx
    gui/themes/default.inc
    gui/themes/scummclassic/classic_layout.stx
    gui/themes/scummclassic/classic_layout_lowres.stx


diff --git a/gui/options.cpp b/gui/options.cpp
index 7e9dc243604..3a56678adb2 100644
--- a/gui/options.cpp
+++ b/gui/options.cpp
@@ -175,12 +175,12 @@ static const int guiBaseValues[] = { 200, 175, 150, 125, 100, 75, 50, 25, -1 };
 static const char *const kbdMouseSpeedLabels[] = { "3", "5", "8", "10", "13", "15", "18", "20", nullptr };
 
 OptionsDialog::OptionsDialog(const Common::String &domain, int x, int y, int w, int h)
-	: Dialog(x, y, w, h), _domain(domain), _graphicsTabId(-1), _midiTabId(-1), _pathsTabId(-1), _tabWidget(nullptr) {
+	: Dialog(x, y, w, h), _domain(domain), _graphicsTabId(-1), _midiTabId(-1), _pathsContainer(nullptr), _tabWidget(nullptr) {
 	init();
 }
 
 OptionsDialog::OptionsDialog(const Common::String &domain, const Common::String &name)
-	: Dialog(name), _domain(domain), _graphicsTabId(-1), _midiTabId(-1), _pathsTabId(-1), _tabWidget(nullptr) {
+	: Dialog(name), _domain(domain), _graphicsTabId(-1), _midiTabId(-1), _pathsContainer(nullptr), _tabWidget(nullptr) {
 	init();
 }
 
@@ -2286,10 +2286,13 @@ void GlobalOptionsDialog::build() {
 	// 5) The Paths tab
 	//
 	if (!g_gui.useLowResGUI())
-		_pathsTabId = tab->addTab(_("Paths"), "GlobalOptions_Paths");
+		tab->addTab(_("Paths"), "GlobalOptions_Paths", false);
 	else
-		_pathsTabId = tab->addTab(_c("Paths", "lowres"), "GlobalOptions_Paths");
-	addPathsControls(tab, "GlobalOptions_Paths.", g_gui.useLowResGUI());
+		tab->addTab(_c("Paths", "lowres"), "GlobalOptions_Paths", false);
+	_pathsContainer = new ScrollContainerWidget(tab, "GlobalOptions_Paths.Container", "GlobalOptions_Paths_Container");
+	_pathsContainer->setTarget(this);
+	_pathsContainer->setBackgroundType(ThemeEngine::kWidgetBackgroundNo);
+	addPathsControls(_pathsContainer, "GlobalOptions_Paths_Container.", g_gui.useLowResGUI());
 
 	//
 	// 6) The GUI tab
@@ -2507,7 +2510,7 @@ void GlobalOptionsDialog::addPathsControls(GuiObject *boss, const Common::String
 		new ButtonWidget(boss, prefix + "PluginsButton", _c("Plugins Path:", "lowres"), Common::U32String(), kChoosePluginsDirCmd);
 	_pluginsPath = new PathWidget(boss, prefix + "PluginsPath", Common::Path(), _c("None", "path"));
 
-	_pluginsPathClearButton = addClearButton(boss, "GlobalOptions_Paths.PluginsPathClearButton", kPluginsPathClearCmd);
+	_pluginsPathClearButton = addClearButton(boss, prefix + "PluginsPathClearButton", kPluginsPathClearCmd);
 #endif // DYNAMIC_MODULES
 #endif // !defined(__DC__)
 
@@ -3548,40 +3551,38 @@ void GlobalOptionsDialog::reflowLayout() {
 		_soundFontClearButton->setEnabled(enabled);
 	}
 
-	if (_pathsTabId != -1) {
-		_tabWidget->setActiveTab(_pathsTabId);
-
-		_tabWidget->removeWidget(_savePathClearButton);
+	if (_pathsContainer) {
+		_pathsContainer->removeWidget(_savePathClearButton);
 		_savePathClearButton->setNext(nullptr);
 		delete _savePathClearButton;
-		_savePathClearButton = addClearButton(_tabWidget, "GlobalOptions_Paths.SavePathClearButton", kSavePathClearCmd);
+		_savePathClearButton = addClearButton(_pathsContainer, "GlobalOptions_Paths_Container.SavePathClearButton", kSavePathClearCmd);
 
-		_tabWidget->removeWidget(_themePathClearButton);
+		_pathsContainer->removeWidget(_themePathClearButton);
 		_themePathClearButton->setNext(nullptr);
 		delete _themePathClearButton;
-		_themePathClearButton = addClearButton(_tabWidget, "GlobalOptions_Paths.ThemePathClearButton", kThemePathClearCmd);
+		_themePathClearButton = addClearButton(_pathsContainer, "GlobalOptions_Paths_Container.ThemePathClearButton", kThemePathClearCmd);
 
-		_tabWidget->removeWidget(_iconPathClearButton);
+		_pathsContainer->removeWidget(_iconPathClearButton);
 		_iconPathClearButton->setNext(nullptr);
 		delete _iconPathClearButton;
-		_iconPathClearButton = addClearButton(_tabWidget, "GlobalOptions_Paths.IconPathClearButton", kIconPathClearCmd);
+		_iconPathClearButton = addClearButton(_pathsContainer, "GlobalOptions_Paths_Container.IconPathClearButton", kIconPathClearCmd);
 
 #ifdef USE_DLC
-		_tabWidget->removeWidget(_dlcPathClearButton);
+		_pathsContainer->removeWidget(_dlcPathClearButton);
 		_dlcPathClearButton->setNext(nullptr);
 		delete _dlcPathClearButton;
-		_dlcPathClearButton = addClearButton(_tabWidget, "GlobalOptions_Paths.DLCPathClearButton", kDLCPathClearCmd);
+		_dlcPathClearButton = addClearButton(_pathsContainer, "GlobalOptions_Paths_Container.DLCPathClearButton", kDLCPathClearCmd);
 #endif
 
-		_tabWidget->removeWidget(_extraPathClearButton);
+		_pathsContainer->removeWidget(_extraPathClearButton);
 		_extraPathClearButton->setNext(nullptr);
 		delete _extraPathClearButton;
-		_extraPathClearButton = addClearButton(_tabWidget, "GlobalOptions_Paths.ExtraPathClearButton", kExtraPathClearCmd);
+		_extraPathClearButton = addClearButton(_pathsContainer, "GlobalOptions_Paths_Container.ExtraPathClearButton", kExtraPathClearCmd);
 
-		_tabWidget->removeWidget(_browserPathClearButton);
+		_pathsContainer->removeWidget(_browserPathClearButton);
 		_browserPathClearButton->setNext(nullptr);
 		delete _browserPathClearButton;
-		_browserPathClearButton = addClearButton(_tabWidget, "GlobalOptions_Paths.BrowserPathClearButton", kBrowserPathClearCmd);
+		_browserPathClearButton = addClearButton(_pathsContainer, "GlobalOptions_Paths_Container.BrowserPathClearButton", kBrowserPathClearCmd);
 	}
 
 	_tabWidget->setActiveTab(activeTab);
diff --git a/gui/options.h b/gui/options.h
index b3160e0bdeb..d8278c11320 100644
--- a/gui/options.h
+++ b/gui/options.h
@@ -55,6 +55,7 @@ class GuiObject;
 class RadiobuttonGroup;
 class RadiobuttonWidget;
 class PathWidget;
+class ScrollContainerWidget;
 class OptionsContainerWidget;
 
 class OptionsDialog : public Dialog {
@@ -120,7 +121,8 @@ protected:
 	TabWidget *_tabWidget;
 	int _graphicsTabId;
 	int _midiTabId;
-	int _pathsTabId;
+
+	ScrollContainerWidget *_pathsContainer;
 
 	PathWidget *_shader;
 	ButtonWidget *_shaderClearButton;
diff --git a/gui/themes/common/highres_layout.stx b/gui/themes/common/highres_layout.stx
index 6c853b80fc5..7b2a91e1ade 100644
--- a/gui/themes/common/highres_layout.stx
+++ b/gui/themes/common/highres_layout.stx
@@ -976,6 +976,14 @@
 	</dialog>
 
 	<dialog name = 'GlobalOptions_Paths' overlays = 'Dialog.GlobalOptions.TabWidget'>
+		<layout type = 'vertical' padding = '0, 0, 0, 0'>
+			<widget name = 'Container'
+					type = 'ScrollContainerWidget'
+			/>
+		</layout>
+	</dialog>
+
+	<dialog name = 'GlobalOptions_Paths_Container' overlays = 'GlobalOptions_Paths.Container'>
 		<layout type = 'vertical' padding = '16, 16, 16, 16' spacing = '8'>
 			<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' align = 'center'>
 				<widget name = 'SaveButton'
diff --git a/gui/themes/common/lowres_layout.stx b/gui/themes/common/lowres_layout.stx
index f9bdba97373..4bc18310e79 100644
--- a/gui/themes/common/lowres_layout.stx
+++ b/gui/themes/common/lowres_layout.stx
@@ -812,6 +812,14 @@
 	</dialog>
 
 	<dialog name = 'GlobalOptions_Paths' overlays = 'Dialog.GlobalOptions.TabWidget'>
+		<layout type = 'vertical' padding = '0, 0, 0, 0'>
+			<widget name = 'Container'
+					type = 'ScrollContainerWidget'
+			/>
+		</layout>
+	</dialog>
+
+	<dialog name = 'GlobalOptions_Paths_Container' overlays = 'GlobalOptions_Paths.Container'>
 		<layout type = 'vertical' padding = '16, 16, 16, 16' spacing = '8'>
 			<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '16' align = 'center'>
 				<widget name = 'SaveButton'
diff --git a/gui/themes/default.inc b/gui/themes/default.inc
index ead26d2f104..0b5bf88fd4b 100644
--- a/gui/themes/default.inc
+++ b/gui/themes/default.inc
@@ -2040,6 +2040,13 @@ const char *defaultXML1 = "<?xml version = '1.0'?>"
 "</layout>"
 "</dialog>"
 "<dialog name='GlobalOptions_Paths' overlays='Dialog.GlobalOptions.TabWidget'>"
+"<layout type='vertical' padding='0,0,0,0'>"
+"<widget name='Container' "
+"type='ScrollContainerWidget' "
+"/>"
+"</layout>"
+"</dialog>"
+"<dialog name='GlobalOptions_Paths_Container' overlays='GlobalOptions_Paths.Container'>"
 "<layout type='vertical' padding='16,16,16,16' spacing='8'>"
 "<layout type='horizontal' padding='0,0,0,0' spacing='10' align='center'>"
 "<widget name='SaveButton' "
@@ -4368,6 +4375,13 @@ const char *defaultXML1 = "<?xml version = '1.0'?>"
 "</layout>"
 "</dialog>"
 "<dialog name='GlobalOptions_Paths' overlays='Dialog.GlobalOptions.TabWidget'>"
+"<layout type='vertical' padding='0,0,0,0'>"
+"<widget name='Container' "
+"type='ScrollContainerWidget' "
+"/>"
+"</layout>"
+"</dialog>"
+"<dialog name='GlobalOptions_Paths_Container' overlays='GlobalOptions_Paths.Container'>"
 "<layout type='vertical' padding='16,16,16,16' spacing='8'>"
 "<layout type='horizontal' padding='0,0,0,0' spacing='16'>"
 "<widget name='SaveButton' "
diff --git a/gui/themes/scummclassic/classic_layout.stx b/gui/themes/scummclassic/classic_layout.stx
index 9403137ad09..3916d6fbfaf 100644
--- a/gui/themes/scummclassic/classic_layout.stx
+++ b/gui/themes/scummclassic/classic_layout.stx
@@ -654,6 +654,14 @@
 	</dialog>
 
 	<dialog name = 'GlobalOptions_Paths' overlays = 'Dialog.GlobalOptions.TabWidget'>
+		<layout type = 'vertical' padding = '0, 0, 0, 0'>
+			<widget name = 'Container'
+					type = 'ScrollContainerWidget'
+			/>
+		</layout>
+	</dialog>
+
+	<dialog name = 'GlobalOptions_Paths_Container' overlays = 'GlobalOptions_Paths.Container'>
 		<layout type = 'vertical' padding = '16, 16, 16, 16' spacing = '8'>
 			<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' align = 'center'>
 				<widget name = 'SaveButton'
diff --git a/gui/themes/scummclassic/classic_layout_lowres.stx b/gui/themes/scummclassic/classic_layout_lowres.stx
index 4740fc63850..ee9a8df25ff 100644
--- a/gui/themes/scummclassic/classic_layout_lowres.stx
+++ b/gui/themes/scummclassic/classic_layout_lowres.stx
@@ -657,6 +657,14 @@
 	</dialog>
 
 	<dialog name = 'GlobalOptions_Paths' overlays = 'Dialog.GlobalOptions.TabWidget'>
+		<layout type = 'vertical' padding = '0, 0, 0, 0'>
+			<widget name = 'Container'
+					type = 'ScrollContainerWidget'
+			/>
+		</layout>
+	</dialog>
+
+	<dialog name = 'GlobalOptions_Paths_Container' overlays = 'GlobalOptions_Paths.Container'>
 		<layout type = 'vertical' padding = '16, 16, 16, 16' spacing = '8'>
 			<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '16'>
 				<widget name = 'SaveButton'


Commit: afb383f3b164617d7c1b2d74a63134b85588f9ae
    https://github.com/scummvm/scummvm/commit/afb383f3b164617d7c1b2d74a63134b85588f9ae
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2024-06-14T01:15:12+02:00

Commit Message:
GUI: Remove automatic scrollbars from TabWidget

Changed paths:
    engines/dialogs.cpp
    gui/editgamedialog.cpp
    gui/helpdialog.cpp
    gui/options.cpp
    gui/widgets/tab.cpp
    gui/widgets/tab.h


diff --git a/engines/dialogs.cpp b/engines/dialogs.cpp
index 9c83fde14f1..3cc3b107449 100644
--- a/engines/dialogs.cpp
+++ b/engines/dialogs.cpp
@@ -298,7 +298,7 @@ ConfigDialog::ConfigDialog() :
 	// The game specific options tab
 	//
 
-	int tabId = tab->addTab(_("Game"), "GlobalConfig_Engine", false);
+	int tabId = tab->addTab(_("Game"), "GlobalConfig_Engine");
 
 	if (g_engine->hasFeature(Engine::kSupportsChangingOptionsDuringRuntime)) {
 		ScrollContainerWidget *engineContainer = new ScrollContainerWidget(tab, "GlobalConfig_Engine.Container", "GlobalConfig_Engine_Container");
@@ -343,7 +343,7 @@ ConfigDialog::ConfigDialog() :
 
 	Common::KeymapArray keymaps = metaEngine->initKeymaps(gameDomain.c_str());
 	if (!keymaps.empty()) {
-		tab->addTab(_("Keymaps"), "GlobalConfig_KeyMapper", false);
+		tab->addTab(_("Keymaps"), "GlobalConfig_KeyMapper");
 
 		ScrollContainerWidget *keymapContainer = new ScrollContainerWidget(tab, "GlobalConfig_KeyMapper.Container", "GlobalConfig_KeyMapper_Container");
 		keymapContainer->setBackgroundType(ThemeEngine::kWidgetBackgroundNo);
@@ -355,7 +355,7 @@ ConfigDialog::ConfigDialog() :
 	//
 	// The backend tab (shown only if the backend implements one)
 	//
-	int backendTabId = tab->addTab(_("Backend"), "GlobalConfig_Backend", false);
+	int backendTabId = tab->addTab(_("Backend"), "GlobalConfig_Backend");
 
 	ScrollContainerWidget *backendContainer = new ScrollContainerWidget(tab, "GlobalConfig_Backend.Container", "GlobalConfig_Backend_Container");
 	backendContainer->setBackgroundType(ThemeEngine::kWidgetBackgroundNo);
@@ -374,11 +374,11 @@ ConfigDialog::ConfigDialog() :
 	//
 	AchMan.setActiveDomain(metaEngine->getAchievementsInfo(gameDomain));
 	if (AchMan.getAchievementCount()) {
-		tab->addTab(_("Achievements"), "GlobalConfig_Achievements", false);
+		tab->addTab(_("Achievements"), "GlobalConfig_Achievements");
 		addAchievementsControls(tab, "GlobalConfig_Achievements.");
 	}
 	if (AchMan.getStatCount()) {
-		tab->addTab(_("Statistics"), "GlobalConfig_Achievements", false);
+		tab->addTab(_("Statistics"), "GlobalConfig_Achievements");
 		addStatisticsControls(tab, "GlobalConfig_Achievements.");
 	}
 
diff --git a/gui/editgamedialog.cpp b/gui/editgamedialog.cpp
index c20ede88ac8..e3047b6dcb1 100644
--- a/gui/editgamedialog.cpp
+++ b/gui/editgamedialog.cpp
@@ -134,7 +134,7 @@ EditGameDialog::EditGameDialog(const Common::String &domain)
 	//
 	// 1) The game tab
 	//
-	tab->addTab(_("Game"), "GameOptions_Game", false);
+	tab->addTab(_("Game"), "GameOptions_Game");
 
 	_gameContainer = new ScrollContainerWidget(tab, "GameOptions_Game.Container", "GameOptions_Game_Container");
 	_gameContainer->setBackgroundType(ThemeEngine::kWidgetBackgroundNo);
@@ -158,7 +158,7 @@ EditGameDialog::EditGameDialog(const Common::String &domain)
 	//
 	// 3) The graphics tab
 	//
-	_graphicsTabId = tab->addTab(g_gui.useLowResGUI() ? _("GFX") : _("Graphics"), "GameOptions_Graphics", false);
+	_graphicsTabId = tab->addTab(g_gui.useLowResGUI() ? _("GFX") : _("Graphics"), "GameOptions_Graphics");
 	ScrollContainerWidget *graphicsContainer = new ScrollContainerWidget(tab, "GameOptions_Graphics.Container", "GameOptions_Graphics_Container", kGraphicsTabContainerReflowCmd);
 	graphicsContainer->setBackgroundType(ThemeEngine::kWidgetBackgroundNo);
 	graphicsContainer->setTarget(this);
@@ -179,7 +179,7 @@ EditGameDialog::EditGameDialog(const Common::String &domain)
 	}
 
 	if (!keymaps.empty()) {
-		tab->addTab(_("Keymaps"), "GameOptions_KeyMapper", false);
+		tab->addTab(_("Keymaps"), "GameOptions_KeyMapper");
 
 		ScrollContainerWidget *keymapContainer = new ScrollContainerWidget(tab, "GameOptions_KeyMapper.Container", "GameOptions_KeyMapper_Container");
 		keymapContainer->setBackgroundType(ThemeEngine::kWidgetBackgroundNo);
@@ -191,7 +191,7 @@ EditGameDialog::EditGameDialog(const Common::String &domain)
 	//
 	// The backend tab (shown only if the backend implements one)
 	//
-	int backendTabId = tab->addTab(_("Backend"), "GameOptions_Backend", false);
+	int backendTabId = tab->addTab(_("Backend"), "GameOptions_Backend");
 
 	ScrollContainerWidget *backendContainer = new ScrollContainerWidget(tab, "GameOptions_Backend.Container", "GameOptions_Backend_Container");
 	backendContainer->setBackgroundType(ThemeEngine::kWidgetBackgroundNo);
@@ -314,11 +314,11 @@ EditGameDialog::EditGameDialog(const Common::String &domain)
 		const MetaEngine &metaEngine = enginePlugin->get<MetaEngine>();
 		AchMan.setActiveDomain(metaEngine.getAchievementsInfo(domain));
 		if (AchMan.getAchievementCount()) {
-			tab->addTab(_("Achievements"), "GameOptions_Achievements", false);
+			tab->addTab(_("Achievements"), "GameOptions_Achievements");
 			addAchievementsControls(tab, "GameOptions_Achievements.");
 		}
 		if (AchMan.getStatCount()) {
-			tab->addTab(_("Statistics"), "GameOptions_Achievements", false);
+			tab->addTab(_("Statistics"), "GameOptions_Achievements");
 			addStatisticsControls(tab, "GameOptions_Achievements.");
 		}
 	}
diff --git a/gui/helpdialog.cpp b/gui/helpdialog.cpp
index 3b5a2d957b4..998d55786ff 100644
--- a/gui/helpdialog.cpp
+++ b/gui/helpdialog.cpp
@@ -140,7 +140,7 @@ void HelpDialog::addTabs(const char * const *tabData) {
 
 		Common::U32String tabText(*tabData++);
 
-		_tab->addTab(tabName, "HelpContentDialog", false);
+		_tab->addTab(tabName, "HelpContentDialog");
 
 		RichTextWidget *rt = new RichTextWidget(_tab, "HelpContentDialog.RichTextWidget", tabText);
 
diff --git a/gui/options.cpp b/gui/options.cpp
index 3a56678adb2..75d4834592e 100644
--- a/gui/options.cpp
+++ b/gui/options.cpp
@@ -2194,7 +2194,7 @@ void GlobalOptionsDialog::build() {
 	//
 	// 1) The graphics tab
 	//
-	_graphicsTabId = tab->addTab(g_gui.useLowResGUI() ? _("GFX") : _("Graphics"), "GlobalOptions_Graphics", false);
+	_graphicsTabId = tab->addTab(g_gui.useLowResGUI() ? _("GFX") : _("Graphics"), "GlobalOptions_Graphics");
 	ScrollContainerWidget *graphicsContainer = new ScrollContainerWidget(tab, "GlobalOptions_Graphics.Container", "GlobalOptions_Graphics_Container", kGraphicsTabContainerReflowCmd);
 	graphicsContainer->setTarget(this);
 	graphicsContainer->setBackgroundType(ThemeEngine::kWidgetBackgroundNo);
@@ -2228,7 +2228,7 @@ void GlobalOptionsDialog::build() {
 	}
 
 	if (!keymaps.empty()) {
-		tab->addTab(_("Keymaps"), "GlobalOptions_KeyMapper", false);
+		tab->addTab(_("Keymaps"), "GlobalOptions_KeyMapper");
 
 		ScrollContainerWidget *keymapContainer = new ScrollContainerWidget(tab, "GlobalOptions_KeyMapper.Container", "GlobalOptions_KeyMapper_Container");
 		keymapContainer->setBackgroundType(ThemeEngine::kWidgetBackgroundNo);
@@ -2240,7 +2240,7 @@ void GlobalOptionsDialog::build() {
 	//
 	// The backend tab (shown only if the backend implements one)
 	//
-	int backendTabId = tab->addTab(_("Backend"), "GlobalOptions_Backend", false);
+	int backendTabId = tab->addTab(_("Backend"), "GlobalOptions_Backend");
 
 	ScrollContainerWidget *backendContainer = new ScrollContainerWidget(tab, "GlobalOptions_Backend.Container", "GlobalOptions_Backend_Container");
 	backendContainer->setBackgroundType(ThemeEngine::kWidgetBackgroundNo);
@@ -2286,9 +2286,9 @@ void GlobalOptionsDialog::build() {
 	// 5) The Paths tab
 	//
 	if (!g_gui.useLowResGUI())
-		tab->addTab(_("Paths"), "GlobalOptions_Paths", false);
+		tab->addTab(_("Paths"), "GlobalOptions_Paths");
 	else
-		tab->addTab(_c("Paths", "lowres"), "GlobalOptions_Paths", false);
+		tab->addTab(_c("Paths", "lowres"), "GlobalOptions_Paths");
 	_pathsContainer = new ScrollContainerWidget(tab, "GlobalOptions_Paths.Container", "GlobalOptions_Paths_Container");
 	_pathsContainer->setTarget(this);
 	_pathsContainer->setBackgroundType(ThemeEngine::kWidgetBackgroundNo);
@@ -2297,7 +2297,7 @@ void GlobalOptionsDialog::build() {
 	//
 	// 6) The GUI tab
 	//
-	tab->addTab(_("GUI"), "GlobalOptions_GUI", false);
+	tab->addTab(_("GUI"), "GlobalOptions_GUI");
 	ScrollContainerWidget *guiContainer = new ScrollContainerWidget(tab, "GlobalOptions_GUI.Container", "GlobalOptions_GUI_Container");
 	guiContainer->setTarget(this);
 	guiContainer->setBackgroundType(ThemeEngine::kWidgetBackgroundNo);
@@ -2306,7 +2306,7 @@ void GlobalOptionsDialog::build() {
 	//
 	// 7) The miscellaneous tab
 	//
-	tab->addTab(_("Misc"), "GlobalOptions_Misc", false);
+	tab->addTab(_("Misc"), "GlobalOptions_Misc");
 	ScrollContainerWidget *miscContainer = new ScrollContainerWidget(tab, "GlobalOptions_Misc.Container", "GlobalOptions_Misc_Container");
 	miscContainer->setTarget(this);
 	miscContainer->setBackgroundType(ThemeEngine::kWidgetBackgroundNo);
@@ -2318,9 +2318,9 @@ void GlobalOptionsDialog::build() {
 	// 8) The Cloud tab (remote storages)
 	//
 	if (!g_gui.useLowResGUI())
-		tab->addTab(_("Cloud"), "GlobalOptions_Cloud", false);
+		tab->addTab(_("Cloud"), "GlobalOptions_Cloud");
 	else
-		tab->addTab(_c("Cloud", "lowres"), "GlobalOptions_Cloud", false);
+		tab->addTab(_c("Cloud", "lowres"), "GlobalOptions_Cloud");
 
 	ScrollContainerWidget *container = new ScrollContainerWidget(tab, "GlobalOptions_Cloud.Container", "GlobalOptions_Cloud_Container", kCloudTabContainerReflowCmd);
 	container->setTarget(this);
diff --git a/gui/widgets/tab.cpp b/gui/widgets/tab.cpp
index 548b89b8114..965b000b3c9 100644
--- a/gui/widgets/tab.cpp
+++ b/gui/widgets/tab.cpp
@@ -99,12 +99,7 @@ TabWidget::~TabWidget() {
 		_tabs[_activeTab].firstWidget = _firstWidget;
 	_firstWidget = nullptr;
 	for (uint i = 0; i < _tabs.size(); ++i) {
-		if (_tabs[i].scrollWidget) {
-			delete _tabs[i].scrollWidget;
-		} else {
-			delete _tabs[i].firstWidget;
-		}
-		_tabs[i].scrollWidget = nullptr;
+		delete _tabs[i].firstWidget;
 		_tabs[i].firstWidget = nullptr;
 	}
 	_tabs.clear();
@@ -125,13 +120,12 @@ uint16 TabWidget::getHeight() const {
 	return _h + _tabHeight;
 }
 
-int TabWidget::addTab(const Common::U32String &title, const Common::String &dialogName, bool withScroll) {
+int TabWidget::addTab(const Common::U32String &title, const Common::String &dialogName) {
 	// Add a new tab page
 	Tab newTab;
 	newTab.title = title;
 	newTab.dialogName = dialogName;
 	newTab.firstWidget = nullptr;
-	newTab.scrollWidget = nullptr;
 
 	// Determine the new tab width
 	int newWidth = g_gui.getStringWidth(title) + _titleSpacing;
@@ -146,32 +140,9 @@ int TabWidget::addTab(const Common::U32String &title, const Common::String &dial
 	// Activate the new tab, also writes back our _firstWidget
 	setActiveTab(numTabs - 1);
 
-	if (withScroll) {
-		_tabs.back().scrollWidget = new ScrollContainerWidget(this, "", dialogName, 'gtcr');
-		_tabs.back().scrollWidget->setBackgroundType(ThemeEngine::kWidgetBackgroundNo);
-		_tabs.back().scrollWidget->setTarget(this);
-		_firstWidget = _tabs.back().scrollWidget;
-	}
-
 	return _activeTab;
 }
 
-Widget *TabWidget::addChild(Widget *newChild) {
-	if (_activeTab == -1 || _tabs[_activeTab].scrollWidget == nullptr)
-		return Widget::addChild(newChild);
-
-	newChild->setBoss(_tabs[_activeTab].scrollWidget);
-	return _tabs[_activeTab].scrollWidget->addChild(newChild);
-}
-
-void TabWidget::removeWidget(Widget *del) {
-	if (_activeTab == -1 || _tabs[_activeTab].scrollWidget == nullptr){
-		Widget::removeWidget(del);
-		return;
-	}
-	_tabs[_activeTab].scrollWidget->removeWidget(del);
-}
-
 void TabWidget::removeTab(int tabID) {
 	assert(0 <= tabID && tabID < (int)_tabs.size());
 
@@ -183,11 +154,7 @@ void TabWidget::removeTab(int tabID) {
 	}
 
 	// Dispose the widgets in that tab and then the tab itself
-	if (_tabs[tabID].scrollWidget) {
-		delete _tabs[tabID].scrollWidget;
-	} else {
-		delete _tabs[tabID].firstWidget;
-	}
+	delete _tabs[tabID].firstWidget;
 	_tabs.remove_at(tabID);
 
 	// Adjust _firstVisibleTab if necessary
@@ -217,10 +184,7 @@ void TabWidget::setActiveTab(int tabID) {
 			releaseFocus();
 		}
 		_activeTab = tabID;
-		if (_tabs[tabID].scrollWidget)
-			_firstWidget = _tabs[_activeTab].scrollWidget;
-		else
-			_firstWidget = _tabs[tabID].firstWidget;
+		_firstWidget = _tabs[tabID].firstWidget;
 
 		// Also ensure the tab is visible in the tab bar
 		if (_firstVisibleTab > tabID)
@@ -385,17 +349,12 @@ void TabWidget::reflowLayout() {
 		_tabs[_activeTab].firstWidget = _firstWidget;
 
 	for (uint i = 0; i < _tabs.size(); ++i) {
-		if (_tabs[i].scrollWidget) {
-			_tabs[i].scrollWidget->resize(_x, _y, _w, _h, false);
-			_tabs[i].scrollWidget->reflowLayout();
-		} else {
-			g_gui.xmlEval()->reflowDialogLayout(_tabs[i].dialogName, _tabs[i].firstWidget);
+		g_gui.xmlEval()->reflowDialogLayout(_tabs[i].dialogName, _tabs[i].firstWidget);
 
-			Widget *w = _tabs[i].firstWidget;
-			while (w) {
-				w->reflowLayout();
-				w = w->next();
-			}
+		Widget *w = _tabs[i].firstWidget;
+		while (w) {
+			w->reflowLayout();
+			w = w->next();
 		}
 	}
 
diff --git a/gui/widgets/tab.h b/gui/widgets/tab.h
index 23d5200f156..2d85471ecc5 100644
--- a/gui/widgets/tab.h
+++ b/gui/widgets/tab.h
@@ -38,7 +38,6 @@ class TabWidget : public Widget {
 		Common::U32String title;
 		Common::String dialogName;
 		Widget *firstWidget;
-		ScrollContainerWidget *scrollWidget;
 		int _tabWidth;
 	};
 	typedef Common::Array<Tab> TabList;
@@ -78,10 +77,7 @@ public:
 	 * Add a new tab with the given title. Returns a unique ID which can be used
 	 * to identify the tab (to remove it / activate it etc.).
 	 */
-	int addTab(const Common::U32String &title, const Common::String &dialogName, bool withScroll = true);
-
-	virtual Widget *addChild(Widget *newChild) override;
-	virtual void removeWidget(Widget *del) override;
+	int addTab(const Common::U32String &title, const Common::String &dialogName);
 
 	/**
 	 * Remove the tab with the given tab ID. Disposes all child widgets of that tab.


Commit: e45f8edeb07bd14f9eb56afb29387143c9162852
    https://github.com/scummvm/scummvm/commit/e45f8edeb07bd14f9eb56afb29387143c9162852
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2024-06-14T01:15:12+02:00

Commit Message:
GUI: Improve the padding for the lowres themes

Changed paths:
    gui/themes/common/lowres_layout.stx
    gui/themes/default.inc
    gui/themes/scummclassic/classic_layout_lowres.stx


diff --git a/gui/themes/common/lowres_layout.stx b/gui/themes/common/lowres_layout.stx
index 4bc18310e79..3ff90b2f8bd 100644
--- a/gui/themes/common/lowres_layout.stx
+++ b/gui/themes/common/lowres_layout.stx
@@ -504,7 +504,7 @@
 	</dialog>
 
 	<dialog name = 'GlobalOptions_Control' overlays = 'Dialog.GlobalOptions.TabWidget'>
-		<layout type = 'vertical' padding = '16, 16, 16, 16' spacing = '8'>
+		<layout type = 'vertical' padding = '8, 8, 8, 8' spacing = '6'>
 			<widget name = 'grTouchpadCheckbox'
 					type = 'Checkbox'
 			/>
@@ -571,7 +571,7 @@
 		</layout>
 	</dialog>
 	<dialog name = 'GlobalOptions_Graphics_Container' overlays = 'GlobalOptions_Graphics.Container'>
-		<layout type = 'vertical' padding = '16, 16, 16, 16' spacing = '8'>
+		<layout type = 'vertical' padding = '8, 8, 8, 8' spacing = '6'>
 			<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '6' align = 'center'>
 				<widget name = 'grModePopupDesc'
 						type = 'OptionsLabel'
@@ -654,7 +654,7 @@
 	</dialog>
 
 	<dialog name = 'GlobalOptions_Audio' overlays = 'Dialog.GlobalOptions.TabWidget'>
-		<layout type = 'vertical' padding = '16, 16, 16, 16' spacing = '8'>
+		<layout type = 'vertical' padding = '8, 8, 8, 8' spacing = '6'>
 			<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '6' align = 'center'>
 				<widget name = 'auMidiPopupDesc'
 						type = 'OptionsLabel'
@@ -701,7 +701,7 @@
 	</dialog>
 
 	<dialog name = 'GlobalOptions_Volume' overlays = 'Dialog.GlobalOptions.TabWidget'>
-		<layout type = 'vertical' padding = '16, 16, 16, 16' spacing = '8'>
+		<layout type = 'vertical' padding = '8, 8, 8, 8' spacing = '6'>
 			<layout type = 'horizontal' padding = '0, 0, 0, 0'>
 				<widget name = 'vcMusicText'
 						type = 'OptionsLabel'
@@ -748,7 +748,7 @@
 	</dialog>
 
 	<dialog name = 'GlobalOptions_MIDI' overlays = 'Dialog.GlobalOptions.TabWidget'>
-		<layout type = 'vertical' padding = '16, 16, 16, 16' spacing = '7'>
+		<layout type = 'vertical' padding = '8, 8, 8, 8' spacing = '6'>
 			<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '6' align = 'center'>
 				<widget name = 'auPrefGmPopupDesc'
 						type = 'OptionsLabel'
@@ -793,7 +793,7 @@
 	</dialog>
 
 	<dialog name = 'GlobalOptions_MT32' overlays = 'Dialog.GlobalOptions.TabWidget'>
-		<layout type = 'vertical' padding = '16, 16, 16, 16' spacing = '8'>
+		<layout type = 'vertical' padding = '8, 8, 8, 8' spacing = '6'>
 			<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '6' align = 'center'>
 				<widget name = 'auPrefMt32PopupDesc'
 						type = 'OptionsLabel'
@@ -820,7 +820,7 @@
 	</dialog>
 
 	<dialog name = 'GlobalOptions_Paths_Container' overlays = 'GlobalOptions_Paths.Container'>
-		<layout type = 'vertical' padding = '16, 16, 16, 16' spacing = '8'>
+		<layout type = 'vertical' padding = '8, 8, 8, 8' spacing = '6'>
 			<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '16' align = 'center'>
 				<widget name = 'SaveButton'
 						type = 'Button'
@@ -921,7 +921,7 @@
 	</dialog>
 
 	<dialog name = 'GlobalOptions_GUI_Container' overlays = 'GlobalOptions_GUI.Container'>
-		<layout type = 'vertical' padding = '16, 16, 16, 16' spacing = '8'>
+		<layout type = 'vertical' padding = '8, 8, 8, 8' spacing = '6'>
 			<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '16' align = 'center'>
 				<widget name = 'ThemeButton'
 						type = 'Button'
@@ -998,7 +998,7 @@
 	</dialog>
 
 	<dialog name = 'GlobalOptions_Misc_Container' overlays = 'GlobalOptions_Misc.Container'>
-		<layout type = 'vertical' padding = '16, 16, 16, 16' spacing = '8'>
+		<layout type = 'vertical' padding = '8, 8, 8, 8' spacing = '6'>
 			<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '6' align = 'center'>
 				<widget name = 'AutosavePeriodPopupDesc'
 						width = '80'
@@ -1062,7 +1062,7 @@
 	</dialog>
 
 	<dialog name = 'GlobalOptions_Cloud_Container' overlays = 'GlobalOptions_Cloud.Container'>
-		<layout type = 'vertical' padding = '10, 13, 10, 10' spacing = '8'>
+		<layout type = 'vertical' padding = '8, 8, 8, 8' spacing = '6'>
 			<layout type = 'horizontal' padding = '-7, 1, 0, 0' spacing = '6'>
 				<layout type = 'vertical' padding = '0, 0, 1, 0' spacing = '1'>
 					<widget name = 'StoragePopupDesc'
@@ -1161,7 +1161,7 @@
 	</dialog>
 
 	<dialog name = 'GlobalOptions_Network' overlays = 'Dialog.GlobalOptions.TabWidget'>
-		<layout type = 'vertical' padding = '16, 16, 16, 16' spacing = '8'>
+		<layout type = 'vertical' padding = '8, 8, 8, 8' spacing = '6'>
 			<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '6' align = 'center'>
 				<widget name = 'RunServerButton'
 						type = 'Button'
@@ -1209,7 +1209,7 @@
 	</dialog>
 
 	<dialog name = 'GlobalOptions_DownloadPacksDialog' overlays = 'Dialog.GlobalOptions' shading = 'dim'>
-		<layout type = 'vertical' padding = '8, 8, 8, 4' spacing = '8'>
+		<layout type = 'vertical' padding = '8, 8, 8, 8' spacing = '6'>
 			<widget name = 'StatusText'
 					height = 'Globals.Line.Height'
 			/>
@@ -1247,7 +1247,7 @@
 	</dialog>
 
 	<dialog name = 'GlobalOptions_Cloud_DownloadDialog' overlays = 'Dialog.GlobalOptions' shading = 'dim'>
-		<layout type = 'vertical' padding = '8, 8, 8, 4' spacing = '8'>
+		<layout type = 'vertical' padding = '8, 8, 8, 8' spacing = '8'>
 			<widget name = 'RemoteDirectory'
 					height = 'Globals.Line.Height'
 			/>
@@ -1282,7 +1282,7 @@
 	</dialog>
 
 	<dialog name = 'GlobalOptions_Cloud_ConnectionWizard' overlays = 'Dialog.GlobalOptions' shading = 'dim'>
-		<layout type = 'vertical' padding = '8, 8, 8, 4' spacing = '0'>
+		<layout type = 'vertical' padding = '8, 8, 8, 8' spacing = '0'>
 			<widget name = 'Headline'
 					height = 'Globals.Line.Height'
 			/>
@@ -1460,7 +1460,7 @@
 	</dialog>
 
 	<dialog name='GlobalOptions_Accessibility' overlays='Dialog.GlobalOptions.TabWidget'>
-		<layout type='vertical' padding='16,16,16,16' spacing='16'>
+		<layout type = 'vertical' padding = '8, 8, 8, 8' spacing = '6'>
 			<widget name='TTSCheckbox'
 				type='Checkbox'
 			/>
diff --git a/gui/themes/default.inc b/gui/themes/default.inc
index 0b5bf88fd4b..6e9c5c0f822 100644
--- a/gui/themes/default.inc
+++ b/gui/themes/default.inc
@@ -4077,7 +4077,7 @@ const char *defaultXML1 = "<?xml version = '1.0'?>"
 "</layout>"
 "</dialog>"
 "<dialog name='GlobalOptions_Control' overlays='Dialog.GlobalOptions.TabWidget'>"
-"<layout type='vertical' padding='16,16,16,16' spacing='8'>"
+"<layout type='vertical' padding='8,8,8,8' spacing='6'>"
 "<widget name='grTouchpadCheckbox' "
 "type='Checkbox' "
 "/>"
@@ -4139,7 +4139,7 @@ const char *defaultXML1 = "<?xml version = '1.0'?>"
 "</layout>"
 "</dialog>"
 "<dialog name='GlobalOptions_Graphics_Container' overlays='GlobalOptions_Graphics.Container'>"
-"<layout type='vertical' padding='16,16,16,16' spacing='8'>"
+"<layout type='vertical' padding='8,8,8,8' spacing='6'>"
 "<layout type='horizontal' padding='0,0,0,0' spacing='6' align='center'>"
 "<widget name='grModePopupDesc' "
 "type='OptionsLabel' "
@@ -4221,7 +4221,7 @@ const char *defaultXML1 = "<?xml version = '1.0'?>"
 "</layout>"
 "</dialog>"
 "<dialog name='GlobalOptions_Audio' overlays='Dialog.GlobalOptions.TabWidget'>"
-"<layout type='vertical' padding='16,16,16,16' spacing='8'>"
+"<layout type='vertical' padding='8,8,8,8' spacing='6'>"
 "<layout type='horizontal' padding='0,0,0,0' spacing='6' align='center'>"
 "<widget name='auMidiPopupDesc' "
 "type='OptionsLabel' "
@@ -4267,7 +4267,7 @@ const char *defaultXML1 = "<?xml version = '1.0'?>"
 "</layout>"
 "</dialog>"
 "<dialog name='GlobalOptions_Volume' overlays='Dialog.GlobalOptions.TabWidget'>"
-"<layout type='vertical' padding='16,16,16,16' spacing='8'>"
+"<layout type='vertical' padding='8,8,8,8' spacing='6'>"
 "<layout type='horizontal' padding='0,0,0,0' spacing='6' align='center'>"
 "<widget name='vcMusicText' "
 "type='OptionsLabel' "
@@ -4313,7 +4313,7 @@ const char *defaultXML1 = "<?xml version = '1.0'?>"
 "</layout>"
 "</dialog>"
 "<dialog name='GlobalOptions_MIDI' overlays='Dialog.GlobalOptions.TabWidget'>"
-"<layout type='vertical' padding='16,16,16,16' spacing='6'>"
+"<layout type='vertical' padding='8,8,8,8' spacing='6'>"
 "<layout type='horizontal' padding='0,0,0,0' spacing='6' align='center'>"
 "<widget name='auPrefGmPopupDesc' "
 "type='OptionsLabel' "
@@ -4357,7 +4357,7 @@ const char *defaultXML1 = "<?xml version = '1.0'?>"
 "</layout>"
 "</dialog>"
 "<dialog name='GlobalOptions_MT32' overlays='Dialog.GlobalOptions.TabWidget'>"
-"<layout type='vertical' padding='16,16,16,16' spacing='8'>"
+"<layout type='vertical' padding='8,8,8,8' spacing='6'>"
 "<layout type='horizontal' padding='0,0,0,0' spacing='6' align='center'>"
 "<widget name='auPrefMt32PopupDesc' "
 "type='OptionsLabel' "
@@ -4382,7 +4382,7 @@ const char *defaultXML1 = "<?xml version = '1.0'?>"
 "</layout>"
 "</dialog>"
 "<dialog name='GlobalOptions_Paths_Container' overlays='GlobalOptions_Paths.Container'>"
-"<layout type='vertical' padding='16,16,16,16' spacing='8'>"
+"<layout type='vertical' padding='8,8,8,8' spacing='6'>"
 "<layout type='horizontal' padding='0,0,0,0' spacing='16'>"
 "<widget name='SaveButton' "
 "type='Button' "
@@ -4469,7 +4469,7 @@ const char *defaultXML1 = "<?xml version = '1.0'?>"
 "</layout>"
 "</dialog>"
 "<dialog name='GlobalOptions_GUI_Container' overlays='GlobalOptions_GUI.Container'>"
-"<layout type='vertical' padding='16,16,16,16' spacing='8'>"
+"<layout type='vertical' padding='8,8,8,8' spacing='6'>"
 "<layout type='horizontal' padding='0,0,0,0' spacing='16'>"
 "<widget name='ThemeButton' "
 "type='Button' "
@@ -4544,7 +4544,7 @@ const char *defaultXML1 = "<?xml version = '1.0'?>"
 "</layout>"
 "</dialog>"
 "<dialog name='GlobalOptions_Misc_Container' overlays='GlobalOptions_Misc.Container'>"
-"<layout type='vertical' padding='16,16,16,16' spacing='8'>"
+"<layout type='vertical' padding='8,8,8,8' spacing='6'>"
 "<layout type='horizontal' padding='0,0,0,0' spacing='6' align='center'>"
 "<widget name='AutosavePeriodPopupDesc' "
 "width='80' "
@@ -4606,7 +4606,7 @@ const char *defaultXML1 = "<?xml version = '1.0'?>"
 "</layout>"
 "</dialog>"
 "<dialog name='GlobalOptions_Cloud_Container' overlays='GlobalOptions_Cloud.Container'>"
-"<layout type='vertical' padding='10,13,10,10' spacing='8'>"
+"<layout type='vertical' padding='8,8,8,8' spacing='6'>"
 "<layout type='horizontal' padding='-10,1,0,0' spacing='6'>"
 "<layout type='vertical' padding='0,0,1,0' spacing='1'>"
 "<widget name='StoragePopupDesc' "
@@ -4702,7 +4702,7 @@ const char *defaultXML1 = "<?xml version = '1.0'?>"
 "</layout>"
 "</dialog>"
 "<dialog name='GlobalOptions_Network' overlays='Dialog.GlobalOptions.TabWidget'>"
-"<layout type='vertical' padding='16,16,16,16' spacing='8'>"
+"<layout type='vertical' padding='8,8,8,8' spacing='6'>"
 "<layout type='horizontal' padding='0,0,0,0' spacing='6' align='center'>"
 "<widget name='RunServerButton' "
 "type='Button' "
@@ -4749,7 +4749,7 @@ const char *defaultXML1 = "<?xml version = '1.0'?>"
 "</layout>"
 "</dialog>"
 "<dialog name='GlobalOptions_DownloadPacksDialog' overlays='Dialog.GlobalOptions' shading='dim'>"
-"<layout type='vertical' padding='8,8,8,4' spacing='8'>"
+"<layout type='vertical' padding='8,8,8,8' spacing='6'>"
 "<widget name='StatusText' "
 "height='Globals.Line.Height' "
 "/>"
@@ -4786,7 +4786,7 @@ const char *defaultXML1 = "<?xml version = '1.0'?>"
 "</layout>"
 "</dialog>"
 "<dialog name='GlobalOptions_Cloud_DownloadDialog' overlays='Dialog.GlobalOptions' shading='dim'>"
-"<layout type='vertical' padding='8,8,8,4' spacing='8'>"
+"<layout type='vertical' padding='8,8,8,8' spacing='6'>"
 "<widget name='RemoteDirectory' "
 "height='Globals.Line.Height' "
 "/>"
@@ -4820,7 +4820,7 @@ const char *defaultXML1 = "<?xml version = '1.0'?>"
 "</layout>"
 "</dialog>"
 "<dialog name='GlobalOptions_Cloud_ConnectionWizard' overlays='Dialog.GlobalOptions' shading='dim'>"
-"<layout type='vertical' padding='8,8,8,4' spacing='0'>"
+"<layout type='vertical' padding='8,8,8,8' spacing='0'>"
 "<widget name='Headline' "
 "height='Globals.Line.Height' "
 "/>"
@@ -4970,7 +4970,7 @@ const char *defaultXML1 = "<?xml version = '1.0'?>"
 "</layout>"
 "</dialog>"
 "<dialog name='GlobalOptions_Accessibility' overlays='Dialog.GlobalOptions.TabWidget'>"
-"<layout type='vertical' padding='16,16,16,16' spacing='16'>"
+"<layout type='vertical' padding='8,8,8,8' spacing='6'>"
 "<widget name='TTSCheckbox' "
 "type='Checkbox' "
 "/>"
diff --git a/gui/themes/scummclassic/classic_layout_lowres.stx b/gui/themes/scummclassic/classic_layout_lowres.stx
index ee9a8df25ff..35d8903da74 100644
--- a/gui/themes/scummclassic/classic_layout_lowres.stx
+++ b/gui/themes/scummclassic/classic_layout_lowres.stx
@@ -349,7 +349,7 @@
 	</dialog>
 
 	<dialog name = 'GlobalOptions_Control' overlays = 'Dialog.GlobalOptions.TabWidget'>
-		<layout type = 'vertical' padding = '16, 16, 16, 16' spacing = '8'>
+		<layout type = 'vertical' padding = '8, 8, 8, 8' spacing = '6'>
 			<widget name = 'grTouchpadCheckbox'
 					type = 'Checkbox'
 			/>
@@ -416,7 +416,7 @@
 		</layout>
 	</dialog>
 	<dialog name = 'GlobalOptions_Graphics_Container' overlays = 'GlobalOptions_Graphics.Container'>
-		<layout type = 'vertical' padding = '16, 16, 16, 16' spacing = '8'>
+		<layout type = 'vertical' padding = '8, 8, 8, 8' spacing = '6'>
 			<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '6' align = 'center'>
 				<widget name = 'grModePopupDesc'
 						type = 'OptionsLabel'
@@ -499,7 +499,7 @@
 	</dialog>
 
 	<dialog name = 'GlobalOptions_Audio' overlays = 'Dialog.GlobalOptions.TabWidget'>
-		<layout type = 'vertical' padding = '16, 16, 16, 16' spacing = '8'>
+		<layout type = 'vertical' padding = '8, 8, 8, 8' spacing = '6'>
 			<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '6' align = 'center'>
 				<widget name = 'auMidiPopupDesc'
 						type = 'OptionsLabel'
@@ -546,7 +546,7 @@
 	</dialog>
 
 	<dialog name = 'GlobalOptions_Volume' overlays = 'Dialog.GlobalOptions.TabWidget'>
-		<layout type = 'vertical' padding = '16, 16, 16, 16' spacing = '8'>
+		<layout type = 'vertical' padding = '8, 8, 8, 8' spacing = '6'>
 			<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '6' align = 'center'>
 				<widget name = 'vcMusicText'
 						type = 'OptionsLabel'
@@ -593,7 +593,7 @@
 	</dialog>
 
 	<dialog name = 'GlobalOptions_MIDI' overlays = 'Dialog.GlobalOptions.TabWidget'>
-		<layout type = 'vertical' padding = '16, 16, 16, 16' spacing = '6'>
+		<layout type = 'vertical' padding = '8, 8, 8, 8' spacing = '6'>
 			<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '6' align = 'center'>
 				<widget name = 'auPrefGmPopupDesc'
 						type = 'OptionsLabel'
@@ -638,7 +638,7 @@
 	</dialog>
 
 	<dialog name = 'GlobalOptions_MT32' overlays = 'Dialog.GlobalOptions.TabWidget'>
-		<layout type = 'vertical' padding = '16, 16, 16, 16' spacing = '8'>
+		<layout type = 'vertical' padding = '8, 8, 8, 8' spacing = '6'>
 			<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '6' align = 'center'>
 				<widget name = 'auPrefMt32PopupDesc'
 						type = 'OptionsLabel'
@@ -665,7 +665,7 @@
 	</dialog>
 
 	<dialog name = 'GlobalOptions_Paths_Container' overlays = 'GlobalOptions_Paths.Container'>
-		<layout type = 'vertical' padding = '16, 16, 16, 16' spacing = '8'>
+		<layout type = 'vertical' padding = '8, 8, 8, 8' spacing = '6'>
 			<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '16'>
 				<widget name = 'SaveButton'
 						type = 'Button'
@@ -754,7 +754,7 @@
 	</dialog>
 
 	<dialog name = 'GlobalOptions_GUI_Container' overlays = 'GlobalOptions_GUI.Container'>
-		<layout type = 'vertical' padding = '16, 16, 16, 16' spacing = '8'>
+		<layout type = 'vertical' padding = '8, 8, 8, 8' spacing = '6'>
 			<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '16'>
 				<widget name = 'ThemeButton'
 						type = 'Button'
@@ -831,7 +831,7 @@
 	</dialog>
 
 	<dialog name = 'GlobalOptions_Misc_Container' overlays = 'GlobalOptions_Misc.Container'>
-		<layout type = 'vertical' padding = '16, 16, 16, 16' spacing = '8'>
+		<layout type = 'vertical' padding = '8, 8, 8, 8' spacing = '6'>
 			<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '6' align = 'center'>
 				<widget name = 'AutosavePeriodPopupDesc'
 						width = '80'
@@ -895,7 +895,7 @@
 	</dialog>
 
 	<dialog name = 'GlobalOptions_Cloud_Container' overlays = 'GlobalOptions_Cloud.Container'>
-		<layout type = 'vertical' padding = '10, 13, 10, 10' spacing = '8'>
+		<layout type = 'vertical' padding = '8, 8, 8, 8' spacing = '6'>
 			<layout type = 'horizontal' padding = '-10, 1, 0, 0' spacing = '6'>
 				<layout type = 'vertical' padding = '0, 0, 1, 0' spacing = '1'>
 					<widget name = 'StoragePopupDesc'
@@ -994,7 +994,7 @@
 	</dialog>
 
 	<dialog name = 'GlobalOptions_Network' overlays = 'Dialog.GlobalOptions.TabWidget'>
-		<layout type = 'vertical' padding = '16, 16, 16, 16' spacing = '8'>
+		<layout type = 'vertical' padding = '8, 8, 8, 8' spacing = '6'>
 			<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '6' align = 'center'>
 				<widget name = 'RunServerButton'
 						type = 'Button'
@@ -1042,7 +1042,7 @@
 	</dialog>
 
 	<dialog name = 'GlobalOptions_DownloadPacksDialog' overlays = 'Dialog.GlobalOptions' shading = 'dim'>
-		<layout type = 'vertical' padding = '8, 8, 8, 4' spacing = '8'>
+		<layout type = 'vertical' padding = '8, 8, 8, 8' spacing = '6'>
 			<widget name = 'StatusText'
 					height = 'Globals.Line.Height'
 			/>
@@ -1080,7 +1080,7 @@
 	</dialog>
 
 	<dialog name = 'GlobalOptions_Cloud_DownloadDialog' overlays = 'Dialog.GlobalOptions' shading = 'dim'>
-		<layout type = 'vertical' padding = '8, 8, 8, 4' spacing = '8'>
+		<layout type = 'vertical' padding = '8, 8, 8, 8' spacing = '6'>
 			<widget name = 'RemoteDirectory'
 					height = 'Globals.Line.Height'
 			/>
@@ -1115,7 +1115,7 @@
 	</dialog>
 
 	<dialog name = 'GlobalOptions_Cloud_ConnectionWizard' overlays = 'Dialog.GlobalOptions' shading = 'dim'>
-		<layout type = 'vertical' padding = '8, 8, 8, 4' spacing = '0'>
+		<layout type = 'vertical' padding = '8, 8, 8, 8' spacing = '0'>
 			<widget name = 'Headline'
 					height = 'Globals.Line.Height'
 			/>
@@ -1289,7 +1289,7 @@
 	</dialog>
 
 	<dialog name='GlobalOptions_Accessibility' overlays='Dialog.GlobalOptions.TabWidget'>
-		<layout type='vertical' padding='16,16,16,16' spacing='16'>
+		<layout type = 'vertical' padding = '8, 8, 8, 8' spacing = '6'>
 			<widget name='TTSCheckbox'
 				type='Checkbox'
 				/>


Commit: c17884608babbc54005720193a243b15c7ae0b89
    https://github.com/scummvm/scummvm/commit/c17884608babbc54005720193a243b15c7ae0b89
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2024-06-14T01:15:12+02:00

Commit Message:
GUI: Update the theme version and regenerate the archives

Changed paths:
    gui/ThemeEngine.h
    gui/themes/residualvm.zip
    gui/themes/residualvm/THEMERC
    gui/themes/scummclassic.zip
    gui/themes/scummclassic/THEMERC
    gui/themes/scummmodern.zip
    gui/themes/scummmodern/THEMERC
    gui/themes/scummremastered.zip
    gui/themes/scummremastered/THEMERC


diff --git a/gui/ThemeEngine.h b/gui/ThemeEngine.h
index 63403a5f539..eac49fab6c3 100644
--- a/gui/ThemeEngine.h
+++ b/gui/ThemeEngine.h
@@ -36,7 +36,7 @@
 #include "graphics/pixelformat.h"
 
 
-#define SCUMMVM_THEME_VERSION_STR "SCUMMVM_STX0.9.16"
+#define SCUMMVM_THEME_VERSION_STR "SCUMMVM_STX0.9.17"
 
 class OSystem;
 
diff --git a/gui/themes/residualvm.zip b/gui/themes/residualvm.zip
index cd6ddb5183e..47909204a16 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 132659d2bf5..c626af49461 100644
--- a/gui/themes/residualvm/THEMERC
+++ b/gui/themes/residualvm/THEMERC
@@ -1,3 +1,3 @@
-[SCUMMVM_STX0.9.16:ResidualVM Modern Theme Remastered:No Author]
+[SCUMMVM_STX0.9.17:ResidualVM Modern Theme Remastered:No Author]
 %using ../common
 %using ../common-svg
diff --git a/gui/themes/scummclassic.zip b/gui/themes/scummclassic.zip
index c91194030f2..05d54d7b148 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 415cdd8ed7d..6f052dd0a38 100644
--- a/gui/themes/scummclassic/THEMERC
+++ b/gui/themes/scummclassic/THEMERC
@@ -1 +1 @@
-[SCUMMVM_STX0.9.16:ScummVM Classic Theme:No Author]
+[SCUMMVM_STX0.9.17:ScummVM Classic Theme:No Author]
diff --git a/gui/themes/scummmodern.zip b/gui/themes/scummmodern.zip
index e9eb879700a..cd472ce2c35 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 17da4808d16..9fcd24c0df1 100644
--- a/gui/themes/scummmodern/THEMERC
+++ b/gui/themes/scummmodern/THEMERC
@@ -1,2 +1,2 @@
-[SCUMMVM_STX0.9.16:ScummVM Modern Theme:No Author]
+[SCUMMVM_STX0.9.17:ScummVM Modern Theme:No Author]
 %using ../common
diff --git a/gui/themes/scummremastered.zip b/gui/themes/scummremastered.zip
index c0a4c51e235..482ed58b621 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 7c4f21621a7..951f7f5a814 100644
--- a/gui/themes/scummremastered/THEMERC
+++ b/gui/themes/scummremastered/THEMERC
@@ -1,3 +1,3 @@
-[SCUMMVM_STX0.9.16:ScummVM Modern Theme Remastered:No Author]
+[SCUMMVM_STX0.9.17:ScummVM Modern Theme Remastered:No Author]
 %using ../common
 %using ../common-svg




More information about the Scummvm-git-logs mailing list