summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-09-03 01:36:17 +0300
committerAndrei Karas <akaras@inbox.ru>2017-09-03 01:36:17 +0300
commitdaebd688c0978db5f5715df99f5602fd0fbba70d (patch)
tree3b959cc5034bb575bc4b3f407588825bb97d15c7 /src
parentfb10326caedf65ae6d4e9fb246bcb6486bda868f (diff)
downloadmv-daebd688c0978db5f5715df99f5602fd0fbba70d.tar.gz
mv-daebd688c0978db5f5715df99f5602fd0fbba70d.tar.bz2
mv-daebd688c0978db5f5715df99f5602fd0fbba70d.tar.xz
mv-daebd688c0978db5f5715df99f5602fd0fbba70d.zip
Fix scrolling in scroll areas.
Diffstat (limited to 'src')
-rw-r--r--src/gui/widgets/scrollarea.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/gui/widgets/scrollarea.cpp b/src/gui/widgets/scrollarea.cpp
index b67ea756a..d3f6ac7e1 100644
--- a/src/gui/widgets/scrollarea.cpp
+++ b/src/gui/widgets/scrollarea.cpp
@@ -794,12 +794,12 @@ void ScrollArea::mousePressed(MouseEvent& event)
if (y < getVerticalMarkerDimension().y)
{
setVerticalScrollAmount(mVScroll
- - CAST_S32(getChildrenArea().height * 0.95));
+ - CAST_S32(getChildrenArea().height * 0.1));
}
else
{
setVerticalScrollAmount(mVScroll
- + CAST_S32(getChildrenArea().height * 0.95));
+ + CAST_S32(getChildrenArea().height * 0.1));
}
event.consume();
}
@@ -815,17 +815,18 @@ void ScrollArea::mousePressed(MouseEvent& event)
if (x < getHorizontalMarkerDimension().x)
{
setHorizontalScrollAmount(mHScroll
- - CAST_S32(getChildrenArea().width * 0.95));
+ - CAST_S32(getChildrenArea().width * 0.1));
}
else
{
setHorizontalScrollAmount(mHScroll
- + CAST_S32(getChildrenArea().width * 0.95));
+ + CAST_S32(getChildrenArea().width * 0.1));
}
event.consume();
}
- if (event.getButton() == MouseButton::LEFT)
+ if (event.getButton() == MouseButton::LEFT &&
+ !event.isConsumed())
{
mClickX = event.getX();
mClickY = event.getY();