summaryrefslogtreecommitdiff
path: root/src/gui/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/tabbedarea.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/gui/widgets/tabbedarea.cpp b/src/gui/widgets/tabbedarea.cpp
index 7643e0044..31bab2599 100644
--- a/src/gui/widgets/tabbedarea.cpp
+++ b/src/gui/widgets/tabbedarea.cpp
@@ -362,12 +362,13 @@ void TabbedArea::setSelectedTabByPos(int tab)
void TabbedArea::widgetResized(const gcn::Event &event A_UNUSED)
{
+ adjustSize();
+
const int frameSize = 2 * getFrameSize();
const int widgetFrameSize = 2 * mWidgetContainer->getFrameSize();
const int width = getWidth() - frameSize - widgetFrameSize;
const int height = getHeight() - frameSize
- mWidgetContainer->getY() - widgetFrameSize;
- mWidgetContainer->setSize(width, height);
gcn::Widget *const w = getCurrentWidget();
if (w)
@@ -390,7 +391,8 @@ void TabbedArea::widgetResized(const gcn::Event &event A_UNUSED)
}
}
}
- w->setSize(width, height);
+ w->setSize(mWidgetContainer->getWidth(),
+ mWidgetContainer->getHeight());
if (scr && newScroll)
scr->setVerticalScrollAmount(newScroll);
}
@@ -459,9 +461,8 @@ void TabbedArea::adjustSize()
mTabContainer->setSize(getWidth() - 2, maxTabHeight);
- mWidgetContainer->setPosition(1, maxTabHeight + 1);
- mWidgetContainer->setSize(getWidth() - 2,
- getHeight() - maxTabHeight - 2);
+ mWidgetContainer->setPosition(0, maxTabHeight);
+ mWidgetContainer->setSize(getWidth(), getHeight() - maxTabHeight);
}
void TabbedArea::adjustTabPositions()