diff options
author | ritsuka <[email protected]> | 2013-08-04 09:12:33 +0000 |
---|---|---|
committer | ritsuka <[email protected]> | 2013-08-04 09:12:33 +0000 |
commit | e9d1e1af56ca8ba9d8139020fd38f5dfdf2e1d4e (patch) | |
tree | d381326b958f6777b3f5d7b740bf6d38dcbdea42 /macosx | |
parent | 7cb083b6bb9d63a29104a6726c9d683c3e8b0b72 (diff) |
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
Diffstat (limited to 'macosx')
-rw-r--r-- | macosx/HBPreviewController.m | 17 |
1 files changed, 17 insertions, 0 deletions
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 |