[Scummvm-git-logs] scummvm master -> 40c376fd3ab7b58891deaf5cd95a11089ad4a079
sev-
noreply at scummvm.org
Fri Jun 23 09:32:54 UTC 2023
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:
40c376fd3a GUI: Change ThemeLayout::setPadding input types to int16
Commit: 40c376fd3ab7b58891deaf5cd95a11089ad4a079
https://github.com/scummvm/scummvm/commit/40c376fd3ab7b58891deaf5cd95a11089ad4a079
Author: Lars Sundström (l.sundstrom at gmail.com)
Date: 2023-06-23T12:32:51+03:00
Commit Message:
GUI: Change ThemeLayout::setPadding input types to int16
The theme layout padding values are parsed and stored as 16 bit
signed integers. However ThemeLayout::setPadding treated the
values as 8 bit signed integeres.
The padding values parsed from the STX file suited for the screen
resolution are multiplied with the device content scale factor.
The scale factor determines how content is mapped from the logical
coordinate space (measured in points) to the device coordinate
space (measured in pixels).
If the scale factor and the padding value results in a value
greater than 255 it will wrap since the 8 bit type can't hold
bigger values than that.
Running the iOS backend in debug configuration on an iPhone 12
mini, having the content scale factor value 3, and drawing the
launcher in vertical mode where the bottom padding value is 92,
the result became 3 * 92 = 276 which would wrap to 20.
That resulted in incorrect layout where the GameList was too
high and the buttons in the bottom would not fit on the screen.
Change the input type to int16 in ThemeLayout::setPadding to
conform with the padding type used everywhere else.
Changed paths:
gui/ThemeLayout.h
diff --git a/gui/ThemeLayout.h b/gui/ThemeLayout.h
index 51f0aa30b4d..31172e2ee8c 100644
--- a/gui/ThemeLayout.h
+++ b/gui/ThemeLayout.h
@@ -77,7 +77,7 @@ public:
void addChild(ThemeLayout *child) { _children.push_back(child); }
- void setPadding(int8 left, int8 right, int8 top, int8 bottom) {
+ void setPadding(int16 left, int16 right, int16 top, int16 bottom) {
_padding.left = left;
_padding.right = right;
_padding.top = top;
More information about the Scummvm-git-logs
mailing list