diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-10-05 12:45:04 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-10-05 12:45:04 +0300 |
commit | 901898455259123e13a32a35052b4cadfa8c8a30 (patch) | |
tree | 67d92ea500d83cfd0d28d4fec2493c4d6c06ef59 /src/gui/widgets | |
parent | 7223ee1b262437ce14046cd15e83e4c0699aa465 (diff) | |
download | manaverse-901898455259123e13a32a35052b4cadfa8c8a30.tar.gz manaverse-901898455259123e13a32a35052b4cadfa8c8a30.tar.bz2 manaverse-901898455259123e13a32a35052b4cadfa8c8a30.tar.xz manaverse-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')
-rw-r--r-- | src/gui/widgets/scrollarea.cpp | 7 |
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); |