diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-12-12 18:25:17 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-12-12 18:25:17 +0300 |
commit | 752a02d2990db39dc7f3d193951c9f8375c31889 (patch) | |
tree | 5a77805818f365254e61093e44aa17d1f45ad567 /src | |
parent | 226f85d32cdb0978a7a72ff15fa83ca9db796959 (diff) | |
download | mv-752a02d2990db39dc7f3d193951c9f8375c31889.tar.gz mv-752a02d2990db39dc7f3d193951c9f8375c31889.tar.bz2 mv-752a02d2990db39dc7f3d193951c9f8375c31889.tar.xz mv-752a02d2990db39dc7f3d193951c9f8375c31889.zip |
fix tabbed area resizing with scroll arrows disabled.
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/widgets/tabbedarea.cpp | 8 |
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; |