summaryrefslogtreecommitdiff
path: root/src/gui/widgets/tabbedarea.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-07-07 14:42:58 +0300
committerAndrei Karas <akaras@inbox.ru>2013-07-07 14:42:58 +0300
commitc1eb6af06cb3453eea7a5242bc603af716c58990 (patch)
treee7af20a2bf90d07f35f43f33fedab8a2b1fb4aaf /src/gui/widgets/tabbedarea.cpp
parent94fdc870da3cfba82ac9b05b0e77489782244a76 (diff)
downloadmanaverse-c1eb6af06cb3453eea7a5242bc603af716c58990.tar.gz
manaverse-c1eb6af06cb3453eea7a5242bc603af716c58990.tar.bz2
manaverse-c1eb6af06cb3453eea7a5242bc603af716c58990.tar.xz
manaverse-c1eb6af06cb3453eea7a5242bc603af716c58990.zip
extent tab to follow different resize policy.
Diffstat (limited to 'src/gui/widgets/tabbedarea.cpp')
-rw-r--r--src/gui/widgets/tabbedarea.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/gui/widgets/tabbedarea.cpp b/src/gui/widgets/tabbedarea.cpp
index de88a3e50..3a9ded199 100644
--- a/src/gui/widgets/tabbedarea.cpp
+++ b/src/gui/widgets/tabbedarea.cpp
@@ -51,7 +51,8 @@ TabbedArea::TabbedArea(const Widget2 *const widget) :
mEnableScrollButtons(false),
mRightMargin(0),
mFollowDownScroll(false),
- mBlockSwitching(true)
+ mBlockSwitching(true),
+ mResizeHeight(true)
{
setFocusable(true);
addKeyListener(this);
@@ -478,8 +479,16 @@ void TabbedArea::adjustSize()
const int frame2 = 2 * wFrameSize;
w->setPosition(wFrameSize, wFrameSize);
- w->setSize(mWidgetContainer->getWidth() - frame2,
- mWidgetContainer->getHeight() - frame2);
+ if (mResizeHeight)
+ {
+ w->setSize(mWidgetContainer->getWidth() - frame2,
+ mWidgetContainer->getHeight() - frame2);
+ }
+ else
+ {
+ w->setSize(mWidgetContainer->getWidth() - frame2,
+ w->getHeight());
+ }
}
}