summaryrefslogtreecommitdiff
path: root/src/gui/widgets/tabbedarea.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-12-12 18:25:17 +0300
committerAndrei Karas <akaras@inbox.ru>2013-12-12 18:25:17 +0300
commit752a02d2990db39dc7f3d193951c9f8375c31889 (patch)
tree5a77805818f365254e61093e44aa17d1f45ad567 /src/gui/widgets/tabbedarea.cpp
parent226f85d32cdb0978a7a72ff15fa83ca9db796959 (diff)
downloadplus-752a02d2990db39dc7f3d193951c9f8375c31889.tar.gz
plus-752a02d2990db39dc7f3d193951c9f8375c31889.tar.bz2
plus-752a02d2990db39dc7f3d193951c9f8375c31889.tar.xz
plus-752a02d2990db39dc7f3d193951c9f8375c31889.zip
fix tabbed area resizing with scroll arrows disabled.
Diffstat (limited to 'src/gui/widgets/tabbedarea.cpp')
-rw-r--r--src/gui/widgets/tabbedarea.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/gui/widgets/tabbedarea.cpp b/src/gui/widgets/tabbedarea.cpp
index 5044d2758..dee1640ad 100644
--- a/src/gui/widgets/tabbedarea.cpp
+++ b/src/gui/widgets/tabbedarea.cpp
@@ -106,9 +106,9 @@ void TabbedArea::enableScrollButtons(const bool enable)
if (mEnableScrollButtons && !enable)
{
if (mArrowButton[0])
- add(mArrowButton[0]);
+ remove(mArrowButton[0]);
if (mArrowButton[1])
- add(mArrowButton[1]);
+ remove(mArrowButton[1]);
}
else if (!mEnableScrollButtons && enable)
{
@@ -117,6 +117,7 @@ void TabbedArea::enableScrollButtons(const bool enable)
if (mArrowButton[1])
add(mArrowButton[1]);
}
+ mEnableScrollButtons = enable;
}
int TabbedArea::getNumberOfTabs() const
@@ -519,7 +520,8 @@ void TabbedArea::adjustTabPositions()
maxTabHeight = tab->getHeight();
}
- int x = mArrowButton[0]->isVisible() ? mArrowButton[0]->getWidth() : 0;
+ int x = (mEnableScrollButtons && mArrowButton[0]->isVisible())
+ ? mArrowButton[0]->getWidth() : 0;
for (size_t i = mTabScrollIndex; i < sz; ++i)
{
Tab *const tab = mTabs[i].first;