aboutsummaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
authorAlexander Tkachev2016-06-23 22:54:07 +0600
committerEugene Sandulenko2016-07-03 12:19:48 +0200
commit24963ac97d85a3d78d5b36d63be6cea6f63d178d (patch)
tree845c435ccb35e6fa7789776bfcf987f75374325b /gui
parent421f9826c8ad403d76b6f40bf1aa4c7c0ec7e676 (diff)
downloadscummvm-rg350-24963ac97d85a3d78d5b36d63be6cea6f63d178d.tar.gz
scummvm-rg350-24963ac97d85a3d78d5b36d63be6cea6f63d178d.tar.bz2
scummvm-rg350-24963ac97d85a3d78d5b36d63be6cea6f63d178d.zip
GUI: Fix Dialog's and TabWidget's reflowLayout()
Diffstat (limited to 'gui')
-rw-r--r--gui/dialog.cpp4
-rw-r--r--gui/widgets/tab.cpp8
2 files changed, 6 insertions, 6 deletions
diff --git a/gui/dialog.cpp b/gui/dialog.cpp
index 50b7755bb3..523227a237 100644
--- a/gui/dialog.cpp
+++ b/gui/dialog.cpp
@@ -113,13 +113,13 @@ void Dialog::reflowLayout() {
// changed, so any cached image may be invalid. The subsequent redraw
// should be treated as the very first draw.
+ GuiObject::reflowLayout();
+
Widget *w = _firstWidget;
while (w) {
w->reflowLayout();
w = w->_next;
}
-
- GuiObject::reflowLayout();
}
void Dialog::lostFocus() {
diff --git a/gui/widgets/tab.cpp b/gui/widgets/tab.cpp
index 756781a04b..689bf37e1b 100644
--- a/gui/widgets/tab.cpp
+++ b/gui/widgets/tab.cpp
@@ -258,6 +258,10 @@ void TabWidget::adjustTabs(int value) {
void TabWidget::reflowLayout() {
Widget::reflowLayout();
+ _tabHeight = g_gui.xmlEval()->getVar("Globals.TabWidget.Tab.Height");
+ _tabWidth = g_gui.xmlEval()->getVar("Globals.TabWidget.Tab.Width");
+ _titleVPad = g_gui.xmlEval()->getVar("Globals.TabWidget.Tab.Padding.Top");
+
for (uint i = 0; i < _tabs.size(); ++i) {
Widget *w = _tabs[i].firstWidget;
while (w) {
@@ -266,10 +270,6 @@ void TabWidget::reflowLayout() {
}
}
- _tabHeight = g_gui.xmlEval()->getVar("Globals.TabWidget.Tab.Height");
- _tabWidth = g_gui.xmlEval()->getVar("Globals.TabWidget.Tab.Width");
- _titleVPad = g_gui.xmlEval()->getVar("Globals.TabWidget.Tab.Padding.Top");
-
if (_tabWidth == 0) {
_tabWidth = 40;
#ifdef __DS__