diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-08-30 22:51:23 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-08-30 22:51:23 +0300 |
commit | ef8ef35d28daa3ea7dd542078ac9c0d3f7a9a5e2 (patch) | |
tree | c3d7c79fca18ac387d0c90512ef3201c92da5890 /src/gui/widgets/scrollarea.cpp | |
parent | 22b64d16b613c1e5b26632237879b167024788ab (diff) | |
download | manaverse-ef8ef35d28daa3ea7dd542078ac9c0d3f7a9a5e2.tar.gz manaverse-ef8ef35d28daa3ea7dd542078ac9c0d3f7a9a5e2.tar.bz2 manaverse-ef8ef35d28daa3ea7dd542078ac9c0d3f7a9a5e2.tar.xz manaverse-ef8ef35d28daa3ea7dd542078ac9c0d3f7a9a5e2.zip |
Move some variables to better scope.
Diffstat (limited to 'src/gui/widgets/scrollarea.cpp')
-rw-r--r-- | src/gui/widgets/scrollarea.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/widgets/scrollarea.cpp b/src/gui/widgets/scrollarea.cpp index 630f7e9bf..b67ea756a 100644 --- a/src/gui/widgets/scrollarea.cpp +++ b/src/gui/widgets/scrollarea.cpp @@ -953,7 +953,7 @@ Rect ScrollArea::getVerticalBarDimension() const if (!mVBarVisible) return Rect(0, 0, 0, 0); - const int height = (mVBarVisible && mShowButtons) ? mScrollbarWidth : 0; + const int height = mShowButtons ? mScrollbarWidth : 0; if (mHBarVisible) { return Rect(mDimension.width - mScrollbarWidth, @@ -1122,10 +1122,10 @@ Rect ScrollArea::getDownButtonDimension() const if (!mVBarVisible || !mShowButtons) return Rect(0, 0, 0, 0); - if (mVBarVisible && mHBarVisible) + if (mHBarVisible) { return Rect(mDimension.width - mScrollbarWidth, - mDimension.height - mScrollbarWidth*2, + mDimension.height - mScrollbarWidth * 2, mScrollbarWidth, mScrollbarWidth); } @@ -1150,7 +1150,7 @@ Rect ScrollArea::getRightButtonDimension() const if (!mHBarVisible || !mShowButtons) return Rect(0, 0, 0, 0); - if (mVBarVisible && mHBarVisible) + if (mVBarVisible) { return Rect(mDimension.width - mScrollbarWidth*2, mDimension.height - mScrollbarWidth, |