From 151caf049c95368347a6243e85e04a50c87d0e5e Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Mon, 12 Oct 2015 13:22:12 +0200 Subject: Fix missing 'direction' type changes (int to enum). --- plugingui/scrollbar.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'plugingui/scrollbar.cc') 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 -- cgit v1.2.3