[Scummvm-git-logs] scummvm master -> aaa71d53b2cf57eca8e9a1be61b57dbe3eee190d
bluegr
bluegr at gmail.com
Sat Feb 22 11:14:10 UTC 2020
This automated email contains information about 4 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
22c75c644a EVENTS: Change DefaultEventManager to be the owner of the keymapper
94344ccf8e GUI: Allow providing an explicit size for screen_center dialogs
9475192e81 ENGINES: Add a keymaps tab in the in-game options dialog
aaa71d53b2 GUI: Don't try drawing widgets with an empty bounding rectangle
Commit: 22c75c644a68b2dcde50c88d168b0e5cb5aa1bc5
https://github.com/scummvm/scummvm/commit/22c75c644a68b2dcde50c88d168b0e5cb5aa1bc5
Author: Bastien Bouclet (bastien.bouclet at gmail.com)
Date: 2020-02-22T13:14:04+02:00
Commit Message:
EVENTS: Change DefaultEventManager to be the owner of the keymapper
Changed paths:
backends/events/default/default-events.cpp
common/EventDispatcher.cpp
common/events.h
diff --git a/backends/events/default/default-events.cpp b/backends/events/default/default-events.cpp
index 9565d11..97fc843 100644
--- a/backends/events/default/default-events.cpp
+++ b/backends/events/default/default-events.cpp
@@ -68,6 +68,7 @@ DefaultEventManager::~DefaultEventManager() {
#ifdef ENABLE_VKEYBD
delete _vk;
#endif
+ delete _keymapper;
}
void DefaultEventManager::init() {
diff --git a/common/EventDispatcher.cpp b/common/EventDispatcher.cpp
index 7b0d754..3f7da51 100644
--- a/common/EventDispatcher.cpp
+++ b/common/EventDispatcher.cpp
@@ -24,7 +24,7 @@
namespace Common {
-EventDispatcher::EventDispatcher() : _autoFreeMapper(false), _mapper(nullptr) {
+EventDispatcher::EventDispatcher() : _mapper(nullptr) {
}
EventDispatcher::~EventDispatcher() {
@@ -37,11 +37,6 @@ EventDispatcher::~EventDispatcher() {
if (i->autoFree)
delete i->observer;
}
-
- if (_autoFreeMapper) {
- delete _mapper;
- }
- _mapper = nullptr;
}
void EventDispatcher::dispatch() {
@@ -86,12 +81,8 @@ void EventDispatcher::clearEvents() {
}
-void EventDispatcher::registerMapper(EventMapper *mapper, bool autoFree) {
- if (_autoFreeMapper) {
- delete _mapper;
- }
+void EventDispatcher::registerMapper(EventMapper *mapper) {
_mapper = mapper;
- _autoFreeMapper = autoFree;
}
diff --git a/common/events.h b/common/events.h
index c50dc47..4346f08 100644
--- a/common/events.h
+++ b/common/events.h
@@ -346,24 +346,8 @@ public:
/**
* Registers an event mapper with the dispatcher.
- *
- * The ownership of the "mapper" variable will pass
- * to the EventDispatcher, thus it will be deleted
- * with "delete", when EventDispatcher is destroyed.
- *
- * @param autoFree Destroy previous mapper [default]
- * Normally we allow only one event mapper to exists,
- * However Event Recorder must intervent into normal
- * event flow without altering its semantics. Thus during
- * Event Recorder playback and recording we allow
- * two mappers.
- */
- void registerMapper(EventMapper *mapper, bool autoFree = true);
-
- /**
- * Queries the setup event mapper.
*/
- EventMapper *queryMapper() const { return _mapper; }
+ void registerMapper(EventMapper *mapper);
/**
* Registers a new EventSource with the Dispatcher.
@@ -392,7 +376,6 @@ public:
*/
void unregisterObserver(EventObserver *obs);
private:
- bool _autoFreeMapper;
EventMapper *_mapper;
struct Entry {
Commit: 94344ccf8e927339104fc2698535de3159d668f6
https://github.com/scummvm/scummvm/commit/94344ccf8e927339104fc2698535de3159d668f6
Author: Bastien Bouclet (bastien.bouclet at gmail.com)
Date: 2020-02-22T13:14:04+02:00
Commit Message:
GUI: Allow providing an explicit size for screen_center dialogs
Without an explicit size the layout system does not have enough
constraints to produce nice looking dialogs. Up until now the workaround
was to set explicit an size for some of the widget. This worked well
enough except when resizing down the window up until the widget size
constraints could no longer be enforced. At that point, produced layouts
looked too squished.
Changed paths:
gui/ThemeEval.cpp
gui/ThemeEval.h
gui/ThemeLayout.cpp
gui/ThemeLayout.h
gui/ThemeParser.cpp
gui/ThemeParser.h
gui/themes/default.inc
diff --git a/gui/ThemeEval.cpp b/gui/ThemeEval.cpp
index 03a4cbe..9a37a1b 100644
--- a/gui/ThemeEval.cpp
+++ b/gui/ThemeEval.cpp
@@ -108,10 +108,10 @@ void ThemeEval::addWidget(const Common::String &name, int w, int h, const Common
setVar("Dialog." + _curDialog + "." + name + ".Enabled", enabled ? 1 : 0);
}
-void ThemeEval::addDialog(const Common::String &name, const Common::String &overlays, bool enabled, int inset) {
+void ThemeEval::addDialog(const Common::String &name, const Common::String &overlays, int16 width, int16 height, bool enabled, int inset) {
Common::String var = "Dialog." + name;
- ThemeLayout *layout = new ThemeLayoutMain(name, overlays, enabled, inset);
+ ThemeLayout *layout = new ThemeLayoutMain(name, overlays, width, height, enabled, inset);
if (_layouts.contains(var))
delete _layouts[var];
diff --git a/gui/ThemeEval.h b/gui/ThemeEval.h
index 57c3a7c..bc6eb1d 100644
--- a/gui/ThemeEval.h
+++ b/gui/ThemeEval.h
@@ -74,7 +74,7 @@ public:
bool hasVar(const Common::String &name) { return _vars.contains(name) || _builtin.contains(name); }
- void addDialog(const Common::String &name, const Common::String &overlays, bool enabled = true, int inset = 0);
+ void addDialog(const Common::String &name, const Common::String &overlays, int16 maxWidth = -1, int16 maxHeight = -1, bool enabled = true, int inset = 0);
void addLayout(ThemeLayout::LayoutType type, int spacing, ThemeLayout::ItemAlign itemAlign);
void addWidget(const Common::String &name, int w, int h, const Common::String &type, bool enabled = true, Graphics::TextAlign align = Graphics::kTextAlignLeft);
bool addImportedLayout(const Common::String &name);
diff --git a/gui/ThemeLayout.cpp b/gui/ThemeLayout.cpp
index 4a825d1..86118d0 100644
--- a/gui/ThemeLayout.cpp
+++ b/gui/ThemeLayout.cpp
@@ -226,8 +226,8 @@ void ThemeLayoutMain::reflowLayout(Widget *widgetChain) {
} else if (_overlays == "screen_center") {
_x = -1;
_y = -1;
- _w = -1;
- _h = -1;
+ _w = _defaultW > 0 ? MIN(_defaultW, g_system->getOverlayWidth()) : -1;
+ _h = _defaultH > 0 ? MIN(_defaultH, g_system->getOverlayHeight()) : -1;
} else {
if (!g_gui.xmlEval()->getWidgetData(_overlays, _x, _y, (uint16 &) _w, (uint16 &) _h)) {
warning("Unable to retrieve overlayed dialog position %s", _overlays.c_str());
diff --git a/gui/ThemeLayout.h b/gui/ThemeLayout.h
index eed2eff..e17def4 100644
--- a/gui/ThemeLayout.h
+++ b/gui/ThemeLayout.h
@@ -139,14 +139,14 @@ protected:
class ThemeLayoutMain : public ThemeLayout {
public:
- ThemeLayoutMain(const Common::String &name, const Common::String &overlays, bool enabled, int inset) :
+ ThemeLayoutMain(const Common::String &name, const Common::String &overlays, int16 width, int16 height, bool enabled, int inset) :
ThemeLayout(nullptr),
_name(name),
_overlays(overlays),
_enabled(enabled),
_inset(inset) {
- _w = _defaultW = -1;
- _h = _defaultH = -1;
+ _w = _defaultW = width;
+ _h = _defaultH = height;
_x = _defaultX = -1;
_y = _defaultY = -1;
}
diff --git a/gui/ThemeParser.cpp b/gui/ThemeParser.cpp
index 951d124..872642f 100644
--- a/gui/ThemeParser.cpp
+++ b/gui/ThemeParser.cpp
@@ -740,7 +740,24 @@ bool ThemeParser::parserCallback_dialog(ParserNode *node) {
return false;
}
- _theme->getEvaluator()->addDialog(name, node->values["overlays"], enabled, inset);
+ Common::String overlays = node->values["overlays"];
+ // The size of a dialog depends on the value of its 'overlays' property:
+ // - 'screen', means the dialog fills the whole screen.
+ // - 'screen_center', means the size of the dialog is determined
+ // by its contents, unless an explicit size is specified.
+ // - if it is set to a user interface element name, the dialog takes
+ // its size.
+
+ int width = -1, height = -1;
+ if (node->values.contains("size")) {
+ if (overlays != "screen_center")
+ return parserError("Dialogs can only have an explicit size if they overlay 'screen_center'.");
+
+ if (!parseIntegerKey(node->values["size"], 2, &width, &height))
+ return false;
+ }
+
+ _theme->getEvaluator()->addDialog(name, overlays, width, height, enabled, inset);
if (node->values.contains("shading")) {
int shading = 0;
diff --git a/gui/ThemeParser.h b/gui/ThemeParser.h
index bb7033d..3faa89a 100644
--- a/gui/ThemeParser.h
+++ b/gui/ThemeParser.h
@@ -183,6 +183,7 @@ protected:
XML_KEY(dialog)
XML_PROP(name, true)
XML_PROP(overlays, true)
+ XML_PROP(size, false)
XML_PROP(shading, false)
XML_PROP(enabled, false)
XML_PROP(resolution, false)
diff --git a/gui/themes/default.inc b/gui/themes/default.inc
index c49293f..8e1c12e 100644
--- a/gui/themes/default.inc
+++ b/gui/themes/default.inc
@@ -2660,17 +2660,15 @@ const char *defaultXML1 = "<?xml version = '1.0'?>"
"</layout>"
"</layout>"
"</dialog>"
-"<dialog name='TestbedOptions' overlays='screen_center'>"
+"<dialog name='TestbedOptions' overlays='screen_center' size='400,300'>"
"<layout type='vertical' padding='8,8,8,8'>"
"<widget name='Headline' "
"height='Globals.Line.Height' "
-"width='400' "
"/>"
"<widget name='Info' "
"height='Globals.Line.Height' "
"/>"
"<widget name='List' "
-"height='200' "
"/>"
"<layout type='vertical' padding='0,0,16,0'>"
"<layout type='horizontal' padding='0,0,0,0'>"
Commit: 9475192e81e523d1772a8ec77d09ff345918d0df
https://github.com/scummvm/scummvm/commit/9475192e81e523d1772a8ec77d09ff345918d0df
Author: Bastien Bouclet (bastien.bouclet at gmail.com)
Date: 2020-02-22T13:14:04+02:00
Commit Message:
ENGINES: Add a keymaps tab in the in-game options dialog
Changed paths:
backends/keymapper/remap-widget.cpp
engines/dialogs.cpp
engines/dialogs.h
gui/ThemeEngine.h
gui/themes/default.inc
gui/themes/scummclassic.zip
gui/themes/scummclassic/THEMERC
gui/themes/scummclassic/classic_layout.stx
gui/themes/scummclassic/classic_layout_lowres.stx
gui/themes/scummmodern.zip
gui/themes/scummmodern/THEMERC
gui/themes/scummmodern/scummmodern_layout.stx
gui/themes/scummmodern/scummmodern_layout_lowres.stx
gui/themes/scummremastered.zip
gui/themes/scummremastered/THEMERC
gui/themes/scummremastered/remastered_layout.stx
gui/themes/scummremastered/remastered_layout_lowres.stx
diff --git a/backends/keymapper/remap-widget.cpp b/backends/keymapper/remap-widget.cpp
index 1f8f5e7..46e82f4 100644
--- a/backends/keymapper/remap-widget.cpp
+++ b/backends/keymapper/remap-widget.cpp
@@ -100,6 +100,7 @@ void RemapWidget::reflowActionWidgets() {
int keyButtonWidth = g_gui.xmlEval()->getVar("Globals.KeyMapper.ButtonWidth");
int resetButtonWidth = g_gui.xmlEval()->getVar("Globals.KeyMapper.ResetWidth");
int labelWidth = getWidth() - (spacing + keyButtonWidth + spacing);
+ labelWidth = MAX(0, labelWidth);
uint textYOff = (buttonHeight - kLineHeight) / 2;
@@ -120,7 +121,8 @@ void RemapWidget::reflowActionWidgets() {
KeymapTitleRow keymapTitle = _keymapSeparators[row.keymap];
if (keymapTitle.descriptionText) {
- uint descriptionWidth = getWidth() - x - spacing - resetButtonWidth - spacing;
+ int descriptionWidth = getWidth() - x - spacing - resetButtonWidth - spacing;
+ descriptionWidth = MAX(0, descriptionWidth);
keymapTitle.descriptionText->resize(x, y + textYOff, descriptionWidth, kLineHeight);
keymapTitle.resetButton->resize(x + descriptionWidth, y, resetButtonWidth, buttonHeight);
diff --git a/engines/dialogs.cpp b/engines/dialogs.cpp
index 14c0cb0..6e1f670 100644
--- a/engines/dialogs.cpp
+++ b/engines/dialogs.cpp
@@ -36,6 +36,7 @@
#include "gui/ThemeEngine.h"
#include "gui/ThemeEval.h"
#include "gui/widget.h"
+#include "gui/widgets/tab.h"
#include "graphics/font.h"
@@ -55,9 +56,9 @@ protected:
public:
ConfigDialog(bool subtitleControls);
- ~ConfigDialog();
+ ~ConfigDialog() override;
- virtual void handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data);
+ void handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data) override;
};
MainMenuDialog::MainMenuDialog(Engine *engine)
@@ -111,14 +112,12 @@ MainMenuDialog::MainMenuDialog(Engine *engine)
new GUI::ButtonWidget(this, "GlobalMenu.Quit", _("~Q~uit"), 0, kQuitCmd);
_aboutDialog = new GUI::AboutDialog();
- _optionsDialog = new ConfigDialog(_engine->hasFeature(Engine::kSupportsSubtitleOptions));
_loadDialog = new GUI::SaveLoadChooser(_("Load game:"), _("Load"), false);
_saveDialog = new GUI::SaveLoadChooser(_("Save game:"), _("Save"), true);
}
MainMenuDialog::~MainMenuDialog() {
delete _aboutDialog;
- delete _optionsDialog;
delete _loadDialog;
delete _saveDialog;
}
@@ -134,9 +133,11 @@ void MainMenuDialog::handleCommand(GUI::CommandSender *sender, uint32 cmd, uint3
case kSaveCmd:
save();
break;
- case kOptionsCmd:
- _optionsDialog->runModal();
+ case kOptionsCmd: {
+ ConfigDialog configDialog(_engine->hasFeature(Engine::kSupportsSubtitleOptions));
+ configDialog.runModal();
break;
+ }
case kAboutCmd:
_aboutDialog->runModal();
break;
@@ -283,11 +284,16 @@ enum {
ConfigDialog::ConfigDialog(bool subtitleControls)
: GUI::OptionsDialog("", "GlobalConfig") {
+ // GUI: Add tab widget
+ GUI::TabWidget *tab = new GUI::TabWidget(this, "GlobalConfig.TabWidget");
+
+ tab->addTab(_("Audio"), "GlobalConfig_Audio");
+
//
// Sound controllers
//
- addVolumeControls(this, "GlobalConfig.");
+ addVolumeControls(tab, "GlobalConfig_Audio.");
setVolumeSettingsState(true); // could disable controls by GUI options
//
@@ -296,11 +302,30 @@ ConfigDialog::ConfigDialog(bool subtitleControls)
if (subtitleControls) {
// Global talkspeed range of 0-255
- addSubtitleControls(this, "GlobalConfig.", 255);
+ addSubtitleControls(tab, "GlobalConfig_Audio.", 255);
setSubtitleSettingsState(true); // could disable controls by GUI options
}
//
+ // The Keymap tab
+ //
+ const Common::String &gameDomain = ConfMan.getActiveDomainName();
+ const Plugin *plugin = EngineMan.findPlugin(ConfMan.get("engineid"));
+
+ Common::KeymapArray keymaps;
+ if (plugin) {
+ keymaps = plugin->get<MetaEngine>().initKeymaps(gameDomain.c_str());
+ }
+
+ if (!keymaps.empty()) {
+ tab->addTab(_("Keymaps"), "GlobalConfig_KeyMapper");
+ addKeyMapperControls(tab, "GlobalConfig_KeyMapper.", keymaps, gameDomain);
+ }
+
+ // Activate the first tab
+ tab->setActiveTab(0);
+
+ //
// Add the buttons
//
diff --git a/engines/dialogs.h b/engines/dialogs.h
index a38cf2f..941b255 100644
--- a/engines/dialogs.h
+++ b/engines/dialogs.h
@@ -71,7 +71,6 @@ protected:
GUI::ButtonWidget *_helpButton;
GUI::Dialog *_aboutDialog;
- GUI::Dialog *_optionsDialog;
GUI::SaveLoadChooser *_loadDialog;
GUI::SaveLoadChooser *_saveDialog;
diff --git a/gui/ThemeEngine.h b/gui/ThemeEngine.h
index b550e45..208b162 100644
--- a/gui/ThemeEngine.h
+++ b/gui/ThemeEngine.h
@@ -37,7 +37,7 @@
#include "graphics/pixelformat.h"
-#define SCUMMVM_THEME_VERSION_STR "SCUMMVM_STX0.8.33"
+#define SCUMMVM_THEME_VERSION_STR "SCUMMVM_STX0.8.34"
class OSystem;
diff --git a/gui/themes/default.inc b/gui/themes/default.inc
index 8e1c12e..acc7608 100644
--- a/gui/themes/default.inc
+++ b/gui/themes/default.inc
@@ -2033,8 +2033,27 @@ const char *defaultXML1 = "<?xml version = '1.0'?>"
"/>"
"</layout>"
"</dialog>"
-"<dialog name='GlobalConfig' overlays='screen_center'>"
-"<layout type='vertical' padding='8,8,8,8'>"
+"<dialog name='GlobalConfig' overlays='screen_center' size='500,350' inset='8'>"
+"<layout type='vertical' padding='0,0,0,0'>"
+"<widget name='TabWidget' type='TabWidget' "
+"/>"
+"<layout type='horizontal' padding='16,16,16,16'>"
+"<space />"
+"<widget name='Keys' "
+"type='Button' "
+"/>"
+"<space />"
+"<widget name='Cancel' "
+"type='Button' "
+"/>"
+"<widget name='Ok' "
+"type='Button' "
+"/>"
+"</layout>"
+"</layout>"
+"</dialog>"
+"<dialog name='GlobalConfig_Audio' overlays='Dialog.GlobalConfig.TabWidget'>"
+"<layout type='vertical' padding='8,8,8,8' spacing='8'>"
"<layout type='horizontal' padding='0,0,0,0'>"
"<layout type='vertical' padding='0,0,0,0' align='center'>"
"<layout type='horizontal' padding='0,0,0,0' spacing='8'>"
@@ -2074,7 +2093,6 @@ const char *defaultXML1 = "<?xml version = '1.0'?>"
"<layout type='vertical' padding='24,24,24,24' align='center'>"
"<widget name='vcMuteCheckbox' "
"type='Checkbox' "
-"width='80' "
"/>"
"</layout>"
"</layout>"
@@ -2107,19 +2125,11 @@ const char *defaultXML1 = "<?xml version = '1.0'?>"
"type='SmallLabel' "
"/>"
"</layout>"
-"<space size='60'/>"
-"<layout type='horizontal' padding='0,0,0,0' spacing='10'>"
-"<widget name='Keys' "
-"type='Button' "
-"/>"
-"<space size='Globals.Button.Width' />"
-"<widget name='Cancel' "
-"type='Button' "
-"/>"
-"<widget name='Ok' "
-"type='Button' "
-"/>"
"</layout>"
+"</dialog>"
+"<dialog name='GlobalConfig_KeyMapper' overlays='Dialog.GlobalConfig.TabWidget'>"
+"<layout type='vertical' padding='0,0,0,0'>"
+"<widget name='Container'/>"
"</layout>"
"</dialog>"
"<dialog name='FluidSynthSettings' overlays='GlobalOptions' shading='dim'>"
@@ -3819,7 +3829,26 @@ const char *defaultXML1 = "<?xml version = '1.0'?>"
"</layout>"
"</layout>"
"</dialog>"
-"<dialog name='GlobalConfig' overlays='screen_center'>"
+"<dialog name='GlobalConfig' overlays='screen_center' size='300,220' inset='5' >"
+"<layout type='vertical' padding='0,0,0,0'>"
+"<widget name='TabWidget' type='TabWidget' "
+"/>"
+"<layout type='horizontal' padding='8,8,0,8'>"
+"<space />"
+"<widget name='Keys' "
+"type='Button' "
+"/>"
+"<space />"
+"<widget name='Cancel' "
+"type='Button' "
+"/>"
+"<widget name='Ok' "
+"type='Button' "
+"/>"
+"</layout>"
+"</layout>"
+"</dialog>"
+"<dialog name='GlobalConfig_Audio' overlays='Dialog.GlobalConfig.TabWidget'>"
"<layout type='vertical' padding='8,8,8,8'>"
"<layout type='horizontal' padding='0,0,0,0' spacing='6' align='center'>"
"<widget name='vcMusicText' "
@@ -3880,7 +3909,6 @@ const char *defaultXML1 = "<?xml version = '1.0'?>"
"/>"
"</layout>"
"</layout>"
-"<space size='2' />"
"<layout type='horizontal' padding='0,0,0,0' spacing='6' align='center'>"
"<widget name='subSubtitleSpeedDesc' "
"type='OptionsLabel' "
@@ -3892,19 +3920,11 @@ const char *defaultXML1 = "<?xml version = '1.0'?>"
"type='SmallLabel' "
"/>"
"</layout>"
-"<space size='16'/>"
-"<layout type='horizontal' padding='0,0,0,0' spacing='4'>"
-"<widget name='Keys' "
-"type='Button' "
-"/>"
-"<space size='Globals.Button.Width' />"
-"<widget name='Cancel' "
-"type='Button' "
-"/>"
-"<widget name='Ok' "
-"type='Button' "
-"/>"
"</layout>"
+"</dialog>"
+"<dialog name='GlobalConfig_KeyMapper' overlays='Dialog.GlobalConfig.TabWidget'>"
+"<layout type='vertical' padding='0,0,0,0'>"
+"<widget name='Container'/>"
"</layout>"
"</dialog>"
"<dialog name='FluidSynthSettings' overlays='GlobalOptions' shading='dim'>"
diff --git a/gui/themes/scummclassic.zip b/gui/themes/scummclassic.zip
index 93f8484..48685e6 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 8f6f4fe..7e7c039 100644
--- a/gui/themes/scummclassic/THEMERC
+++ b/gui/themes/scummclassic/THEMERC
@@ -1 +1 @@
-[SCUMMVM_STX0.8.33:ScummVM Classic Theme:No Author]
+[SCUMMVM_STX0.8.34:ScummVM Classic Theme:No Author]
diff --git a/gui/themes/scummclassic/classic_layout.stx b/gui/themes/scummclassic/classic_layout.stx
index cca15cc..7f107e7 100644
--- a/gui/themes/scummclassic/classic_layout.stx
+++ b/gui/themes/scummclassic/classic_layout.stx
@@ -1189,8 +1189,28 @@
</layout>
</dialog>
- <dialog name = 'GlobalConfig' overlays = 'screen_center'>
- <layout type = 'vertical' padding = '8, 8, 8, 8'>
+ <dialog name = 'GlobalConfig' overlays = 'screen_center' size = '500, 350' inset = '8'>
+ <layout type = 'vertical' padding = '0, 0, 0, 0'>
+ <widget name = 'TabWidget' type = 'TabWidget'
+ />
+ <layout type = 'horizontal' padding = '16, 16, 16, 16'>
+ <space />
+ <widget name='Keys'
+ type='Button'
+ />
+ <space />
+ <widget name = 'Cancel'
+ type = 'Button'
+ />
+ <widget name = 'Ok'
+ type = 'Button'
+ />
+ </layout>
+ </layout>
+ </dialog>
+
+ <dialog name = 'GlobalConfig_Audio' overlays = 'Dialog.GlobalConfig.TabWidget'>
+ <layout type = 'vertical' padding = '8, 8, 8, 8' spacing = '8'>
<layout type = 'horizontal' padding = '0, 0, 0, 0'>
<layout type = 'vertical' padding = '0, 0, 0, 0' align = 'center'>
<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '8'>
@@ -1231,7 +1251,6 @@
<layout type = 'vertical' padding = '24, 24, 24, 24' align = 'center'>
<widget name = 'vcMuteCheckbox'
type = 'Checkbox'
- width = '80' <!-- FIXME: Why this is needed? -->
/>
</layout>
</layout>
@@ -1264,19 +1283,12 @@
type = 'SmallLabel'
/>
</layout>
- <space size = '60'/>
- <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10'>
- <widget name = 'Keys'
- type = 'Button'
- />
- <space size = 'Globals.Button.Width' />
- <widget name = 'Cancel'
- type = 'Button'
- />
- <widget name = 'Ok'
- type = 'Button'
- />
- </layout>
+ </layout>
+ </dialog>
+
+ <dialog name = 'GlobalConfig_KeyMapper' overlays = 'Dialog.GlobalConfig.TabWidget'>
+ <layout type = 'vertical' padding = '0, 0, 0, 0'>
+ <widget name = 'Container'/>
</layout>
</dialog>
@@ -1834,17 +1846,15 @@
</layout>
</dialog>
- <dialog name = 'TestbedOptions' overlays = 'screen_center'>
+ <dialog name = 'TestbedOptions' overlays = 'screen_center' size = '400, 300'>
<layout type = 'vertical' padding = '8, 8, 8, 8'>
<widget name = 'Headline'
height = 'Globals.Line.Height'
- width = '400'
/>
<widget name = 'Info'
height = 'Globals.Line.Height'
/>
<widget name = 'List'
- height = '200'
/>
<layout type = 'vertical' padding = '0, 0, 16, 0'>
<layout type = 'horizontal' padding = '0, 0, 0, 0'>
diff --git a/gui/themes/scummclassic/classic_layout_lowres.stx b/gui/themes/scummclassic/classic_layout_lowres.stx
index 86a7776..7b131f9 100644
--- a/gui/themes/scummclassic/classic_layout_lowres.stx
+++ b/gui/themes/scummclassic/classic_layout_lowres.stx
@@ -1200,7 +1200,27 @@
</layout>
</dialog>
- <dialog name = 'GlobalConfig' overlays = 'screen_center'>
+ <dialog name = 'GlobalConfig' overlays = 'screen_center' size = '300, 220' inset = '5' >
+ <layout type = 'vertical' padding = '0, 0, 0, 0'>
+ <widget name = 'TabWidget' type = 'TabWidget'
+ />
+ <layout type = 'horizontal' padding = '8, 8, 0, 8'>
+ <space />
+ <widget name='Keys'
+ type='Button'
+ />
+ <space />
+ <widget name = 'Cancel'
+ type = 'Button'
+ />
+ <widget name = 'Ok'
+ type = 'Button'
+ />
+ </layout>
+ </layout>
+ </dialog>
+
+ <dialog name = 'GlobalConfig_Audio' overlays = 'Dialog.GlobalConfig.TabWidget'>
<layout type = 'vertical' padding = '8, 8, 8, 8'>
<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '6' align = 'center'>
<widget name = 'vcMusicText'
@@ -1261,7 +1281,6 @@
/>
</layout>
</layout>
- <space size = '2' />
<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '6' align = 'center'>
<widget name = 'subSubtitleSpeedDesc'
type = 'OptionsLabel'
@@ -1273,19 +1292,12 @@
type = 'SmallLabel'
/>
</layout>
- <space size = '16'/>
- <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '4'>
- <widget name = 'Keys'
- type = 'Button'
- />
- <space size = 'Globals.Button.Width' />
- <widget name = 'Cancel'
- type = 'Button'
- />
- <widget name = 'Ok'
- type = 'Button'
- />
- </layout>
+ </layout>
+ </dialog>
+
+ <dialog name = 'GlobalConfig_KeyMapper' overlays = 'Dialog.GlobalConfig.TabWidget'>
+ <layout type = 'vertical' padding = '0, 0, 0, 0'>
+ <widget name = 'Container'/>
</layout>
</dialog>
diff --git a/gui/themes/scummmodern.zip b/gui/themes/scummmodern.zip
index b003e85..a5459f5 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 d040620..5fc37c1 100644
--- a/gui/themes/scummmodern/THEMERC
+++ b/gui/themes/scummmodern/THEMERC
@@ -1 +1 @@
-[SCUMMVM_STX0.8.33:ScummVM Modern Theme:No Author]
+[SCUMMVM_STX0.8.34:ScummVM Modern Theme:No Author]
diff --git a/gui/themes/scummmodern/scummmodern_layout.stx b/gui/themes/scummmodern/scummmodern_layout.stx
index 7d1016c..1c00d44 100644
--- a/gui/themes/scummmodern/scummmodern_layout.stx
+++ b/gui/themes/scummmodern/scummmodern_layout.stx
@@ -1202,7 +1202,27 @@
</layout>
</dialog>
- <dialog name = 'GlobalConfig' overlays = 'screen_center'>
+ <dialog name = 'GlobalConfig' overlays = 'screen_center' size = '500, 350' inset = '8'>
+ <layout type = 'vertical' padding = '0, 0, 0, 0'>
+ <widget name = 'TabWidget' type = 'TabWidget'
+ />
+ <layout type = 'horizontal' padding = '16, 16, 16, 16'>
+ <space />
+ <widget name='Keys'
+ type='Button'
+ />
+ <space />
+ <widget name = 'Cancel'
+ type = 'Button'
+ />
+ <widget name = 'Ok'
+ type = 'Button'
+ />
+ </layout>
+ </layout>
+ </dialog>
+
+ <dialog name = 'GlobalConfig_Audio' overlays = 'Dialog.GlobalConfig.TabWidget'>
<layout type = 'vertical' padding = '8, 8, 8, 8' spacing = '8'>
<layout type = 'horizontal' padding = '0, 0, 0, 0'>
<layout type = 'vertical' padding = '0, 0, 0, 0' spacing = '8' align = 'center'>
@@ -1244,7 +1264,6 @@
<layout type = 'vertical' padding = '24, 24, 24, 24' align = 'center'>
<widget name = 'vcMuteCheckbox'
type = 'Checkbox'
- width = '120' <!-- FIXME: Why this is needed? -->
/>
</layout>
</layout>
@@ -1277,19 +1296,12 @@
type = 'SmallLabel'
/>
</layout>
- <space size = '60'/>
- <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10'>
- <widget name='Keys'
- type='Button'
- />
- <space size = 'Globals.Button.Width' />
- <widget name = 'Cancel'
- type = 'Button'
- />
- <widget name = 'Ok'
- type = 'Button'
- />
- </layout>
+ </layout>
+ </dialog>
+
+ <dialog name = 'GlobalConfig_KeyMapper' overlays = 'Dialog.GlobalConfig.TabWidget'>
+ <layout type = 'vertical' padding = '0, 0, 0, 0'>
+ <widget name = 'Container'/>
</layout>
</dialog>
@@ -1849,17 +1861,15 @@
</layout>
</dialog>
- <dialog name = 'TestbedOptions' overlays = 'screen_center'>
+ <dialog name = 'TestbedOptions' overlays = 'screen_center' size = '400, 300'>
<layout type = 'vertical' padding = '8, 8, 8, 8'>
<widget name = 'Headline'
height = 'Globals.Line.Height'
- width = '400'
/>
<widget name = 'Info'
height = 'Globals.Line.Height'
/>
<widget name = 'List'
- height = '200'
/>
<layout type = 'vertical' padding = '0, 0, 16, 0'>
<layout type = 'horizontal' padding = '0, 0, 0, 0'>
diff --git a/gui/themes/scummmodern/scummmodern_layout_lowres.stx b/gui/themes/scummmodern/scummmodern_layout_lowres.stx
index 8a058b4..0b7a74b 100644
--- a/gui/themes/scummmodern/scummmodern_layout_lowres.stx
+++ b/gui/themes/scummmodern/scummmodern_layout_lowres.stx
@@ -1198,7 +1198,27 @@
</layout>
</dialog>
- <dialog name = 'GlobalConfig' overlays = 'screen_center'>
+ <dialog name = 'GlobalConfig' overlays = 'screen_center' size = '300, 220' inset = '5' >
+ <layout type = 'vertical' padding = '0, 0, 0, 0'>
+ <widget name = 'TabWidget' type = 'TabWidget'
+ />
+ <layout type = 'horizontal' padding = '8, 8, 8, 8'>
+ <space />
+ <widget name='Keys'
+ type='Button'
+ />
+ <space />
+ <widget name = 'Cancel'
+ type = 'Button'
+ />
+ <widget name = 'Ok'
+ type = 'Button'
+ />
+ </layout>
+ </layout>
+ </dialog>
+
+ <dialog name = 'GlobalConfig_Audio' overlays = 'Dialog.GlobalConfig.TabWidget'>
<layout type = 'vertical' padding = '8, 8, 8, 8'>
<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '6' align = 'center'>
<widget name = 'vcMusicText'
@@ -1240,7 +1260,7 @@
width = '80'
/>
</layout>
- <space size = '4' />
+ <space size = '2' />
<layout type = 'vertical' padding = '0, 0, 0, 0' spacing = '6' align = 'center'>
<widget name = 'subToggleDesc'
type = 'OptionsLabel'
@@ -1260,7 +1280,7 @@
/>
</layout>
</layout>
- <space size = '4' />
+ <space size = '2' />
<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '6' align = 'center'>
<widget name = 'subSubtitleSpeedDesc'
type = 'OptionsLabel'
@@ -1272,19 +1292,12 @@
type = 'SmallLabel'
/>
</layout>
- <space size = '20'/>
- <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '4'>
- <widget name = 'Keys'
- type = 'Button'
- />
- <space size = 'Globals.Button.Width' />
- <widget name = 'Cancel'
- type = 'Button'
- />
- <widget name = 'Ok'
- type = 'Button'
- />
- </layout>
+ </layout>
+ </dialog>
+
+ <dialog name = 'GlobalConfig_KeyMapper' overlays = 'Dialog.GlobalConfig.TabWidget'>
+ <layout type = 'vertical' padding = '0, 0, 0, 0'>
+ <widget name = 'Container'/>
</layout>
</dialog>
diff --git a/gui/themes/scummremastered.zip b/gui/themes/scummremastered.zip
index 6f04cb4..0870ecf 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 dbb779f..1979c59 100644
--- a/gui/themes/scummremastered/THEMERC
+++ b/gui/themes/scummremastered/THEMERC
@@ -1 +1 @@
-[SCUMMVM_STX0.8.33:ScummVM Modern Theme Remastered:No Author]
+[SCUMMVM_STX0.8.34:ScummVM Modern Theme Remastered:No Author]
diff --git a/gui/themes/scummremastered/remastered_layout.stx b/gui/themes/scummremastered/remastered_layout.stx
index 009ba13..76789fb 100644
--- a/gui/themes/scummremastered/remastered_layout.stx
+++ b/gui/themes/scummremastered/remastered_layout.stx
@@ -1202,7 +1202,27 @@
</layout>
</dialog>
- <dialog name = 'GlobalConfig' overlays = 'screen_center'>
+ <dialog name = 'GlobalConfig' overlays = 'screen_center' size = '500, 350' inset = '8'>
+ <layout type = 'vertical' padding = '0, 0, 0, 0'>
+ <widget name = 'TabWidget' type = 'TabWidget'
+ />
+ <layout type = 'horizontal' padding = '16, 16, 16, 16'>
+ <space />
+ <widget name='Keys'
+ type='Button'
+ />
+ <space />
+ <widget name = 'Cancel'
+ type = 'Button'
+ />
+ <widget name = 'Ok'
+ type = 'Button'
+ />
+ </layout>
+ </layout>
+ </dialog>
+
+ <dialog name = 'GlobalConfig_Audio' overlays = 'Dialog.GlobalConfig.TabWidget'>
<layout type = 'vertical' padding = '8, 8, 8, 8' spacing = '8'>
<layout type = 'horizontal' padding = '0, 0, 0, 0'>
<layout type = 'vertical' padding = '0, 0, 0, 0' spacing = '8' align = 'center'>
@@ -1244,7 +1264,6 @@
<layout type = 'vertical' padding = '24, 24, 24, 24' align = 'center'>
<widget name = 'vcMuteCheckbox'
type = 'Checkbox'
- width = '120' <!-- FIXME: Why this is needed? -->
/>
</layout>
</layout>
@@ -1277,19 +1296,12 @@
type = 'SmallLabel'
/>
</layout>
- <space size = '60'/>
- <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10'>
- <widget name='Keys'
- type='Button'
- />
- <space size = 'Globals.Button.Width' />
- <widget name = 'Cancel'
- type = 'Button'
- />
- <widget name = 'Ok'
- type = 'Button'
- />
- </layout>
+ </layout>
+ </dialog>
+
+ <dialog name = 'GlobalConfig_KeyMapper' overlays = 'Dialog.GlobalConfig.TabWidget'>
+ <layout type = 'vertical' padding = '0, 0, 0, 0'>
+ <widget name = 'Container'/>
</layout>
</dialog>
@@ -1849,17 +1861,15 @@
</layout>
</dialog>
- <dialog name = 'TestbedOptions' overlays = 'screen_center'>
+ <dialog name = 'TestbedOptions' overlays = 'screen_center' size = '400, 300'>
<layout type = 'vertical' padding = '8, 8, 8, 8'>
<widget name = 'Headline'
height = 'Globals.Line.Height'
- width = '400'
/>
<widget name = 'Info'
height = 'Globals.Line.Height'
/>
<widget name = 'List'
- height = '200'
/>
<layout type = 'vertical' padding = '0, 0, 16, 0'>
<layout type = 'horizontal' padding = '0, 0, 0, 0'>
diff --git a/gui/themes/scummremastered/remastered_layout_lowres.stx b/gui/themes/scummremastered/remastered_layout_lowres.stx
index 220ad64..0f06c38 100644
--- a/gui/themes/scummremastered/remastered_layout_lowres.stx
+++ b/gui/themes/scummremastered/remastered_layout_lowres.stx
@@ -1198,7 +1198,27 @@
</layout>
</dialog>
- <dialog name = 'GlobalConfig' overlays = 'screen_center'>
+ <dialog name = 'GlobalConfig' overlays = 'screen_center' size = '300, 220' inset = '5' >
+ <layout type = 'vertical' padding = '0, 0, 0, 0'>
+ <widget name = 'TabWidget' type = 'TabWidget'
+ />
+ <layout type = 'horizontal' padding = '8, 8, 8, 8'>
+ <space />
+ <widget name='Keys'
+ type='Button'
+ />
+ <space />
+ <widget name = 'Cancel'
+ type = 'Button'
+ />
+ <widget name = 'Ok'
+ type = 'Button'
+ />
+ </layout>
+ </layout>
+ </dialog>
+
+ <dialog name = 'GlobalConfig_Audio' overlays = 'Dialog.GlobalConfig.TabWidget'>
<layout type = 'vertical' padding = '8, 8, 8, 8'>
<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '6' align = 'center'>
<widget name = 'vcMusicText'
@@ -1240,7 +1260,7 @@
width = '80'
/>
</layout>
- <space size = '4' />
+ <space size = '2' />
<layout type = 'vertical' padding = '0, 0, 0, 0' spacing = '6' align = 'center'>
<widget name = 'subToggleDesc'
type = 'OptionsLabel'
@@ -1260,7 +1280,7 @@
/>
</layout>
</layout>
- <space size = '4' />
+ <space size = '2' />
<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '6' align = 'center'>
<widget name = 'subSubtitleSpeedDesc'
type = 'OptionsLabel'
@@ -1272,19 +1292,12 @@
type = 'SmallLabel'
/>
</layout>
- <space size = '20'/>
- <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '4'>
- <widget name = 'Keys'
- type = 'Button'
- />
- <space size = 'Globals.Button.Width' />
- <widget name = 'Cancel'
- type = 'Button'
- />
- <widget name = 'Ok'
- type = 'Button'
- />
- </layout>
+ </layout>
+ </dialog>
+
+ <dialog name = 'GlobalConfig_KeyMapper' overlays = 'Dialog.GlobalConfig.TabWidget'>
+ <layout type = 'vertical' padding = '0, 0, 0, 0'>
+ <widget name = 'Container'/>
</layout>
</dialog>
Commit: aaa71d53b2cf57eca8e9a1be61b57dbe3eee190d
https://github.com/scummvm/scummvm/commit/aaa71d53b2cf57eca8e9a1be61b57dbe3eee190d
Author: Bastien Bouclet (bastien.bouclet at gmail.com)
Date: 2020-02-22T13:14:04+02:00
Commit Message:
GUI: Don't try drawing widgets with an empty bounding rectangle
Fixes the dropdown buttons being incorrectly drawn in the keymaps
dialog with the classic theme when scrolled down.
Changed paths:
gui/ThemeEngine.cpp
diff --git a/gui/ThemeEngine.cpp b/gui/ThemeEngine.cpp
index 7928499..9c3fa53 100644
--- a/gui/ThemeEngine.cpp
+++ b/gui/ThemeEngine.cpp
@@ -876,6 +876,11 @@ void ThemeEngine::drawDD(DrawData type, const Common::Rect &r, uint32 dynamic, b
extendedRect.clip(_clip);
}
+ // Cull the elements not in the clip rect
+ if (extendedRect.isEmpty()) {
+ return;
+ }
+
if (forceRestore || drawData->_layer == kDrawLayerBackground)
restoreBackground(extendedRect);
More information about the Scummvm-git-logs
mailing list