summaryrefslogtreecommitdiff
path: root/src/gui/widgets/scrollarea.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-10-05 12:45:04 +0300
committerAndrei Karas <akaras@inbox.ru>2013-10-05 12:45:04 +0300
commit901898455259123e13a32a35052b4cadfa8c8a30 (patch)
tree67d92ea500d83cfd0d28d4fec2493c4d6c06ef59 /src/gui/widgets/scrollarea.cpp
parent7223ee1b262437ce14046cd15e83e4c0699aa465 (diff)
downloadmv-901898455259123e13a32a35052b4cadfa8c8a30.tar.gz
mv-901898455259123e13a32a35052b4cadfa8c8a30.tar.bz2
mv-901898455259123e13a32a35052b4cadfa8c8a30.tar.xz
mv-901898455259123e13a32a35052b4cadfa8c8a30.zip
do mouse scrolling in scroll area only with mouse moved more than 20 px.
Before was 10 px.
Diffstat (limited to 'src/gui/widgets/scrollarea.cpp')
-rw-r--r--src/gui/widgets/scrollarea.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gui/widgets/scrollarea.cpp b/src/gui/widgets/scrollarea.cpp
index 061db3333..fdce0ff8c 100644
--- a/src/gui/widgets/scrollarea.cpp
+++ b/src/gui/widgets/scrollarea.cpp
@@ -734,10 +734,10 @@ void ScrollArea::mouseReleased(gcn::MouseEvent& event)
int dx = event.getX() - mClickX;
int dy = event.getY() - mClickY;
- if ((dx < 10 && dx > 0) || (dx > -10 && dx < 0))
+ if ((dx < 20 && dx > 0) || (dx > -20 && dx < 0))
dx = 0;
- if ((dy < 10 && dy > 0) || (dy > -10 && dy < 0))
+ if ((dy < 20 && dy > 0) || (dy > -20 && dy < 0))
dy = 0;
if (dx)
@@ -774,7 +774,8 @@ void ScrollArea::mouseReleased(gcn::MouseEvent& event)
}
mClickX = 0;
mClickY = 0;
- event.consume();
+ if (dx || dy)
+ event.consume();
}
}
gcn::ScrollArea::mouseReleased(event);