[Scummvm-git-logs] scummvm master -> faefa38c665bf8f0d827e2de5b63eec52604cc7d
sev-
sev at scummvm.org
Fri May 14 18:01:37 UTC 2021
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
faefa38c66 TESTBED: Fix GUI for HiDPI
Commit: faefa38c665bf8f0d827e2de5b63eec52604cc7d
https://github.com/scummvm/scummvm/commit/faefa38c665bf8f0d827e2de5b63eec52604cc7d
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2021-05-14T20:01:09+02:00
Commit Message:
TESTBED: Fix GUI for HiDPI
Changed paths:
engines/testbed/config.cpp
engines/testbed/testbed.cpp
gui/themes/default.inc
gui/themes/residualvm.zip
gui/themes/residualvm/residualvm_layout.stx
gui/themes/scummclassic.zip
gui/themes/scummclassic/classic_layout.stx
gui/themes/scummmodern.zip
gui/themes/scummmodern/scummmodern_layout.stx
gui/themes/scummremastered.zip
gui/themes/scummremastered/remastered_layout.stx
diff --git a/engines/testbed/config.cpp b/engines/testbed/config.cpp
index a53043e356..bf71a916e0 100644
--- a/engines/testbed/config.cpp
+++ b/engines/testbed/config.cpp
@@ -143,7 +143,8 @@ void TestbedInteractionDialog::addText(uint w, uint h, const Common::String text
xOffset = _xOffset;
}
_yOffset += yPadding;
- new GUI::StaticTextWidget(this, xOffset, _yOffset, w, h, text, textAlign);
+ GUI::StaticTextWidget *widget = new GUI::StaticTextWidget(this, xOffset, _yOffset, w, h, text, textAlign);
+ widget->resize(xOffset, _yOffset, w, h);
_yOffset += h;
}
@@ -153,20 +154,23 @@ void TestbedInteractionDialog::addButton(uint w, uint h, const Common::String na
}
_yOffset += yPadding;
_buttonArray.push_back(new GUI::ButtonWidget(this, xOffset, _yOffset, w, h, name, Common::U32String(), cmd));
+ _buttonArray.back()->resize(xOffset, _yOffset, w, h);
_yOffset += h;
}
void TestbedInteractionDialog::addList(uint x, uint y, uint w, uint h, const Common::Array<Common::U32String> &strArray, GUI::ListWidget::ColorList *colors, uint yPadding) {
_yOffset += yPadding;
GUI::ListWidget *list = new GUI::ListWidget(this, x, y, w, h);
+ list->resize(x, y, w, h);
list->setEditable(false);
list->setNumberingMode(GUI::kListNumberingOff);
list->setList(strArray, colors);
_yOffset += h;
}
-void TestbedInteractionDialog::addButtonXY(uint x, uint /* y */, uint w, uint h, const Common::String name, uint32 cmd) {
+void TestbedInteractionDialog::addButtonXY(uint x, uint y, uint w, uint h, const Common::String name, uint32 cmd) {
_buttonArray.push_back(new GUI::ButtonWidget(this, x, _yOffset, w, h, name, Common::U32String(), cmd));
+ _buttonArray.back()->resize(x, y, w, h);
}
void TestbedInteractionDialog::handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data) {
diff --git a/engines/testbed/testbed.cpp b/engines/testbed/testbed.cpp
index a34d056241..7fbea21d36 100644
--- a/engines/testbed/testbed.cpp
+++ b/engines/testbed/testbed.cpp
@@ -54,6 +54,7 @@
namespace Testbed {
void TestbedExitDialog::init() {
+ resize(80, 40, 500, 330);
_xOffset = 25;
_yOffset = 0;
Common::String text = "Thank you for using ScummVM testbed! Here are yor summarized results:";
diff --git a/gui/themes/default.inc b/gui/themes/default.inc
index 0d46436afe..ce339e9657 100644
--- a/gui/themes/default.inc
+++ b/gui/themes/default.inc
@@ -3217,7 +3217,7 @@ const char *defaultXML1 = "<?xml version = '1.0'?>"
"</layout>"
"</layout>"
"</dialog>"
-"<dialog name='TestbedOptions' overlays='screen_center' size='400,300'>"
+"<dialog name='TestbedOptions' overlays='screen' inset='32' >"
"<layout type='vertical' padding='8,8,8,8'>"
"<widget name='Headline' "
"height='Globals.Line.Height' "
diff --git a/gui/themes/residualvm.zip b/gui/themes/residualvm.zip
index 764edbe514..3a147828a6 100644
Binary files a/gui/themes/residualvm.zip and b/gui/themes/residualvm.zip differ
diff --git a/gui/themes/residualvm/residualvm_layout.stx b/gui/themes/residualvm/residualvm_layout.stx
index 3e95a6a7ff..5ae7adc21c 100644
--- a/gui/themes/residualvm/residualvm_layout.stx
+++ b/gui/themes/residualvm/residualvm_layout.stx
@@ -1918,7 +1918,7 @@
</layout>
</dialog>
- <dialog name = 'TestbedOptions' overlays = 'screen_center' size = '400, 300'>
+ <dialog name = 'TestbedOptions' overlays = 'screen' inset = '32' >
<layout type = 'vertical' padding = '8, 8, 8, 8'>
<widget name = 'Headline'
height = 'Globals.Line.Height'
diff --git a/gui/themes/scummclassic.zip b/gui/themes/scummclassic.zip
index cad5a7f8dd..eeba51f236 100644
Binary files a/gui/themes/scummclassic.zip and b/gui/themes/scummclassic.zip differ
diff --git a/gui/themes/scummclassic/classic_layout.stx b/gui/themes/scummclassic/classic_layout.stx
index 95dad76956..341ece4036 100644
--- a/gui/themes/scummclassic/classic_layout.stx
+++ b/gui/themes/scummclassic/classic_layout.stx
@@ -1902,7 +1902,7 @@
</layout>
</dialog>
- <dialog name = 'TestbedOptions' overlays = 'screen_center' size = '400, 300'>
+ <dialog name = 'TestbedOptions' overlays = 'screen' inset = '32' >
<layout type = 'vertical' padding = '8, 8, 8, 8'>
<widget name = 'Headline'
height = 'Globals.Line.Height'
diff --git a/gui/themes/scummmodern.zip b/gui/themes/scummmodern.zip
index fcd30a78df..63641955b3 100644
Binary files a/gui/themes/scummmodern.zip and b/gui/themes/scummmodern.zip differ
diff --git a/gui/themes/scummmodern/scummmodern_layout.stx b/gui/themes/scummmodern/scummmodern_layout.stx
index 3e95a6a7ff..5ae7adc21c 100644
--- a/gui/themes/scummmodern/scummmodern_layout.stx
+++ b/gui/themes/scummmodern/scummmodern_layout.stx
@@ -1918,7 +1918,7 @@
</layout>
</dialog>
- <dialog name = 'TestbedOptions' overlays = 'screen_center' size = '400, 300'>
+ <dialog name = 'TestbedOptions' overlays = 'screen' inset = '32' >
<layout type = 'vertical' padding = '8, 8, 8, 8'>
<widget name = 'Headline'
height = 'Globals.Line.Height'
diff --git a/gui/themes/scummremastered.zip b/gui/themes/scummremastered.zip
index 54376ac064..35b7048e72 100644
Binary files a/gui/themes/scummremastered.zip and b/gui/themes/scummremastered.zip differ
diff --git a/gui/themes/scummremastered/remastered_layout.stx b/gui/themes/scummremastered/remastered_layout.stx
index 66c522e2ea..0694882ff8 100644
--- a/gui/themes/scummremastered/remastered_layout.stx
+++ b/gui/themes/scummremastered/remastered_layout.stx
@@ -1920,7 +1920,7 @@
</layout>
</dialog>
- <dialog name = 'TestbedOptions' overlays = 'screen_center' size = '400, 300'>
+ <dialog name = 'TestbedOptions' overlays = 'screen' inset = '32' >
<layout type = 'vertical' padding = '8, 8, 8, 8'>
<widget name = 'Headline'
height = 'Globals.Line.Height'
More information about the Scummvm-git-logs
mailing list