diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2015-10-12 13:22:12 +0200 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2015-10-12 13:22:12 +0200 |
commit | 151caf049c95368347a6243e85e04a50c87d0e5e (patch) | |
tree | b2e5481c84a13dc593ddc5caef40aac1df208a36 /plugingui/scrollbar.cc | |
parent | 4dcddacbe63574c27296d5266554d8d6667367f1 (diff) |
Fix missing 'direction' type changes (int to enum).
Diffstat (limited to 'plugingui/scrollbar.cc')
-rw-r--r-- | plugingui/scrollbar.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/plugingui/scrollbar.cc b/plugingui/scrollbar.cc index 07dc36b..0b10972 100644 --- a/plugingui/scrollbar.cc +++ b/plugingui/scrollbar.cc @@ -150,21 +150,21 @@ void GUI::ScrollBar::mouseMoveEvent(MouseMoveEvent *e) void GUI::ScrollBar::buttonEvent(ButtonEvent *e) { if(e->y < (int)width() && e->y > 0) { - if(e->direction == -1) setValue(value() - 1); + if(e->direction == ButtonEvent::Up) setValue(value() - 1); return; } if(e->y > (int)height() - (int)width() && e->y < (int)height()) { - if(e->direction == -1) setValue(value() + 1); + if(e->direction == ButtonEvent::Up) setValue(value() + 1); return; } - if(e->direction == 1) { + if(e->direction == ButtonEvent::Down) { yoffset = e->y; value_offset = value(); } - dragging = (e->direction == 1); + dragging = (e->direction == ButtonEvent::Down); } #ifdef TEST_SCROLLBAR |