diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-10-19 02:23:23 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-10-19 02:23:23 +0300 |
commit | 90fa5cb5c60fe06cad9f9c0410ef718d42acb6fc (patch) | |
tree | 0b6d4d53e6380d181cc295e54c35e235d83c1eea /src/gui/widgets | |
parent | 22dad6067a9eaa7f88273cca02d123cadfcb5073 (diff) | |
download | mv-90fa5cb5c60fe06cad9f9c0410ef718d42acb6fc.tar.gz mv-90fa5cb5c60fe06cad9f9c0410ef718d42acb6fc.tar.bz2 mv-90fa5cb5c60fe06cad9f9c0410ef718d42acb6fc.tar.xz mv-90fa5cb5c60fe06cad9f9c0410ef718d42acb6fc.zip |
Partial fix with tabbed area.
Diffstat (limited to 'src/gui/widgets')
-rw-r--r-- | src/gui/widgets/tabbedarea.cpp | 11 |
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() |