diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-09-03 03:56:00 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-09-03 03:56:00 +0300 |
commit | 13bd2f1e30894321d2ba9c48fdde5c96de2f24c4 (patch) | |
tree | cc9d987acfe9b5ea2b618d3aa927e105f3c02d69 /src/gui/widgets/scrollarea.cpp | |
parent | daebd688c0978db5f5715df99f5602fd0fbba70d (diff) | |
download | manaplus-13bd2f1e30894321d2ba9c48fdde5c96de2f24c4.tar.gz manaplus-13bd2f1e30894321d2ba9c48fdde5c96de2f24c4.tar.bz2 manaplus-13bd2f1e30894321d2ba9c48fdde5c96de2f24c4.tar.xz manaplus-13bd2f1e30894321d2ba9c48fdde5c96de2f24c4.zip |
Improve a bit scrollarea.
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 d3f6ac7e1..e22ecdcf3 100644 --- a/src/gui/widgets/scrollarea.cpp +++ b/src/gui/widgets/scrollarea.cpp @@ -255,8 +255,8 @@ void ScrollArea::logic() checkPolicies(); - setVerticalScrollAmount(getVerticalScrollAmount()); - setHorizontalScrollAmount(getHorizontalScrollAmount()); + setVerticalScrollAmount(mVScroll); + setHorizontalScrollAmount(mHScroll); Widget *const content = getContent(); if (content != nullptr) @@ -1339,7 +1339,7 @@ void ScrollArea::mouseWheelMovedUp(MouseEvent& event) if (event.isConsumed()) return; - setVerticalScrollAmount(getVerticalScrollAmount() + setVerticalScrollAmount(mVScroll - getChildrenArea().height / 8); event.consume(); @@ -1350,7 +1350,7 @@ void ScrollArea::mouseWheelMovedDown(MouseEvent& event) if (event.isConsumed()) return; - setVerticalScrollAmount(getVerticalScrollAmount() + setVerticalScrollAmount(mVScroll + getChildrenArea().height / 8); event.consume(); |