From e9d1e1af56ca8ba9d8139020fd38f5dfdf2e1d4e Mon Sep 17 00:00:00 2001 From: ritsuka Date: Sun, 4 Aug 2013 09:12:33 +0000 Subject: MacGui: Read events from the mouse scroll wheel in HBPreviewController.m to change the preview image. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5690 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- macosx/HBPreviewController.m | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/macosx/HBPreviewController.m b/macosx/HBPreviewController.m index 5d132a12e..8ea8c9bb3 100644 --- a/macosx/HBPreviewController.m +++ b/macosx/HBPreviewController.m @@ -1278,6 +1278,23 @@ [super keyDown:event]; } +- (void)scrollWheel:(NSEvent *)theEvent +{ + if (!fEncodeState) + { + if ([theEvent deltaY] < 0) + { + [fPictureSlider setIntegerValue:fPicture < [fPictureSlider maxValue] ? fPicture + 1 : fPicture]; + [self pictureSliderChanged:self]; + } + else if ([theEvent deltaY] > 0) + { + [fPictureSlider setIntegerValue:fPicture > [fPictureSlider minValue] ? fPicture - 1 : fPicture]; + [self pictureSliderChanged:self]; + } + } +} + #pragma mark *** QTTime Utilities *** // convert a time value (long) to a QTTime structure -- cgit v1.2.3