diff options
author | Bastien Bouclet | 2019-12-28 10:43:58 +0100 |
---|---|---|
committer | Bastien Bouclet | 2020-01-04 10:56:25 +0100 |
commit | 346d53b0342d8a1d543887560a28cc45f211d9ad (patch) | |
tree | 61deeb53375e2968303ddc8265f102fcc6d33724 /gui/ThemeEval.cpp | |
parent | c0d8b6d9fc73abc8de4575686e0776e3468d37b2 (diff) | |
download | scummvm-rg350-346d53b0342d8a1d543887560a28cc45f211d9ad.tar.gz scummvm-rg350-346d53b0342d8a1d543887560a28cc45f211d9ad.tar.bz2 scummvm-rg350-346d53b0342d8a1d543887560a28cc45f211d9ad.zip |
GUI: Add finer control over cross-direction alignment for layout items
Previously it was only possible to specify whether items where aligned
to the start or centered in the cross direction of the layouts. It is
now additionally possible to align the items to the far end of the cross
direction or to resize them to match the size of the layout.
Terminology and behavior are loosely based on CSS's flexbox containers.
Diffstat (limited to 'gui/ThemeEval.cpp')
-rw-r--r-- | gui/ThemeEval.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gui/ThemeEval.cpp b/gui/ThemeEval.cpp index 66b5db5fb7..3eede27cca 100644 --- a/gui/ThemeEval.cpp +++ b/gui/ThemeEval.cpp @@ -130,13 +130,13 @@ void ThemeEval::addDialog(const Common::String &name, const Common::String &over setVar(var + ".Enabled", enabled ? 1 : 0); } -void ThemeEval::addLayout(ThemeLayout::LayoutType type, int spacing, bool center) { +void ThemeEval::addLayout(ThemeLayout::LayoutType type, int spacing, ThemeLayout::ItemAlign itemAlign) { ThemeLayout *layout = 0; if (spacing == -1) spacing = getVar("Globals.Layout.Spacing", 4); - layout = new ThemeLayoutStacked(_curLayout.top(), type, spacing, center); + layout = new ThemeLayoutStacked(_curLayout.top(), type, spacing, itemAlign); assert(layout); |