]> granicus.if.org Git - handbrake/commitdiff
MacGui: Read events from the mouse scroll wheel in HBPreviewController.m to change...
authorritsuka <damiog@gmail.com>
Sun, 4 Aug 2013 09:12:33 +0000 (09:12 +0000)
committerritsuka <damiog@gmail.com>
Sun, 4 Aug 2013 09:12:33 +0000 (09:12 +0000)
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5690 b64f7644-9d1e-0410-96f1-a4d463321fa5

macosx/HBPreviewController.m

index 5d132a12ef33282488799ae5c22de53972ededce..8ea8c9bb3dfa89754ab0c6d57dc9fd985528d36a 100644 (file)
         [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