diff options
Diffstat (limited to 'gui/ThemeEval.cpp')
-rw-r--r-- | gui/ThemeEval.cpp | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/gui/ThemeEval.cpp b/gui/ThemeEval.cpp index 9d57d2408b..9b7b57cad3 100644 --- a/gui/ThemeEval.cpp +++ b/gui/ThemeEval.cpp @@ -89,12 +89,20 @@ void ThemeEval::addWidget(const Common::String &name, int w, int h, const Common typeW = getVar("Globals." + type + ".Width", -1); typeH = getVar("Globals." + type + ".Height", -1); typeAlign = (Graphics::TextAlign)getVar("Globals." + type + ".Align", Graphics::kTextAlignInvalid); - } - - ThemeLayoutWidget *widget = new ThemeLayoutWidget(_curLayout.top(), name, - typeW == -1 ? w : typeW, - typeH == -1 ? h : typeH, - typeAlign == Graphics::kTextAlignInvalid ? align : typeAlign); + } + + ThemeLayoutWidget *widget; + if (type == "TabWidget") + widget = new ThemeLayoutTabWidget(_curLayout.top(), name, + typeW == -1 ? w : typeW, + typeH == -1 ? h : typeH, + typeAlign == Graphics::kTextAlignInvalid ? align : typeAlign, + getVar("Globals.TabWidget.Tab.Height", 0)); + else + widget = new ThemeLayoutWidget(_curLayout.top(), name, + typeW == -1 ? w : typeW, + typeH == -1 ? h : typeH, + typeAlign == Graphics::kTextAlignInvalid ? align : typeAlign); _curLayout.top()->addChild(widget); setVar(_curDialog + "." + name + ".Enabled", enabled ? 1 : 0); |