From 13bd2f1e30894321d2ba9c48fdde5c96de2f24c4 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 3 Sep 2017 03:56:00 +0300 Subject: Improve a bit scrollarea. --- src/gui/widgets/scrollarea.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') 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(); -- cgit v1.2.3-70-g09d2