X-Git-Url: http://git.cinelerra-gg.org/git/?p=goodguy%2Fhistory.git;a=blobdiff_plain;f=cinelerra-5.1%2Fplugins%2Fcrikey%2Fcrikeywindow.C;h=eaaa0b5ca3c01c33269688d22ee172c289fc7ff8;hp=ca8245a1a55fa9d5de597b77729eef1878554e6c;hb=36bd2d2bbbe534bf04307149bf6162a70c088656;hpb=20002b54e92573aafc97cbc3a85ec529b35bb191 diff --git a/cinelerra-5.1/plugins/crikey/crikeywindow.C b/cinelerra-5.1/plugins/crikey/crikeywindow.C index ca8245a1..eaaa0b5c 100644 --- a/cinelerra-5.1/plugins/crikey/crikeywindow.C +++ b/cinelerra-5.1/plugins/crikey/crikeywindow.C @@ -225,6 +225,8 @@ int CriKeyWindow::grab_event(XEvent *event) switch( event->type ) { case ButtonPress: if( dragging ) return check_configure_change(0); + if( event->xbutton.button == WHEEL_UP ) return threshold->wheel_event(1); + if( event->xbutton.button == WHEEL_DOWN ) return threshold->wheel_event(-1); dragging = event->xbutton.state & ShiftMask ? -1 : 1; break; case ButtonRelease: @@ -490,6 +492,16 @@ CriKeyThreshold::CriKeyThreshold(CriKeyWindow *gui, int x, int y, int w) { this->gui = gui; set_precision(0.005); + set_pagination(0.01, 0.1); +} + +int CriKeyThreshold::wheel_event(int v) +{ + if( v > 0 ) increase_value(); + else if( v < 0 ) decrease_value(); + handle_event(); + enable(); + return 1; } int CriKeyThreshold::handle_event()