]> granicus.if.org Git - handbrake/commitdiff
MacGui: give VoiceOver the right accessibility value for the video quality slider.
authorDamiano Galassi <damiog@gmail.com>
Fri, 21 Oct 2016 08:18:22 +0000 (10:18 +0200)
committerDamiano Galassi <damiog@gmail.com>
Fri, 21 Oct 2016 08:18:22 +0000 (10:18 +0200)
macosx/HBVideoController.m

index ef51a5a686125d6cbe257c289d6ea32ab2ba5d1b..eeb575ce105f5e5947e2d06aeda8a29c60333689 100644 (file)
@@ -78,6 +78,7 @@ static void *HBVideoControllerContext = &HBVideoControllerContext;
         // Observer a bunch of HBVideo properties to update the UI.
         [self addObserver:self forKeyPath:@"video.encoder" options:NSKeyValueObservingOptionInitial context:HBVideoControllerContext];
         [self addObserver:self forKeyPath:@"video.frameRate" options:NSKeyValueObservingOptionInitial context:HBVideoControllerContext];
+        [self addObserver:self forKeyPath:@"video.quality" options:NSKeyValueObservingOptionInitial context:HBVideoControllerContext];
         [self addObserver:self forKeyPath:@"video.unparseOptions" options:NSKeyValueObservingOptionInitial context:HBVideoControllerContext];
         [self addObserver:self forKeyPath:@"video.advancedOptions" options:NSKeyValueObservingOptionInitial context:HBVideoControllerContext];
     }
@@ -126,6 +127,10 @@ static void *HBVideoControllerContext = &HBVideoControllerContext;
                 [fFramerateVfrPfrCell setTitle:NSLocalizedString(@"Peak Framerate (VFR)", nil)];
             }
         }
+        else if ([keyPath isEqualToString:@"video.quality"])
+        {
+            fVidQualitySlider.accessibilityValue = [NSString stringWithFormat:@"%@ %.2f", self.video.constantQualityLabel, self.video.quality];
+        }
         else if ([keyPath isEqualToString:@"video.unparseOptions"])
         {
             if (self.video.encoder & HB_VCODEC_X264_MASK)