summaryrefslogtreecommitdiff
path: root/src/Fl_Scrollbar.cxx
diff options
context:
space:
mode:
authorMatthias Melcher <fltk@matthiasm.com>2005-11-07 08:51:53 +0000
committerMatthias Melcher <fltk@matthiasm.com>2005-11-07 08:51:53 +0000
commit476044f89877307539d3c943aed94b5ea3bc9267 (patch)
treee29065c76d7cf1424ddaebdf397533427cfee5ef /src/Fl_Scrollbar.cxx
parentba4b17c5454dcdd0945d30d82f3cbba94fb65dee (diff)
Scrollbar now reacts to horizontal scroll wheels if it is a horizontal scroll bar.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4645 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Scrollbar.cxx')
-rw-r--r--src/Fl_Scrollbar.cxx9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/Fl_Scrollbar.cxx b/src/Fl_Scrollbar.cxx
index 47b853320..370162a16 100644
--- a/src/Fl_Scrollbar.cxx
+++ b/src/Fl_Scrollbar.cxx
@@ -129,8 +129,13 @@ int Fl_Scrollbar::handle(int event) {
if (pushed_) return 1;
return Fl_Slider::handle(event, X,Y,W,H);
case FL_MOUSEWHEEL :
- if (horizontal()) return 0;
- handle_drag(clamp(value() + linesize_ * Fl::e_dy));
+ if (horizontal()) {
+ if (Fl::e_dx==0) return 0;
+ handle_drag(clamp(value() + linesize_ * Fl::e_dx));
+ } else {
+ if (Fl::e_dy==0) return 0;
+ handle_drag(clamp(value() + linesize_ * Fl::e_dy));
+ }
return 1;
case FL_SHORTCUT:
case FL_KEYBOARD: {