diff options
author | Damiano Galassi <[email protected]> | 2019-03-06 09:37:35 +0100 |
---|---|---|
committer | Damiano Galassi <[email protected]> | 2019-03-06 09:37:35 +0100 |
commit | 8d78f7d001b06872b1c31620c6387da239ae51eb (patch) | |
tree | 2a53fb0c98c211fd11f62d0c2f16b3529f801bec | |
parent | 371fa07a23b86c7099b838f996896d791e5e01b2 (diff) |
MacGui: fix quality slider granularity prefs when the app is localized.
-rw-r--r-- | macosx/Base.lproj/Preferences.xib | 12 | ||||
-rw-r--r-- | macosx/HBPreferencesController.m | 2 | ||||
-rw-r--r-- | macosx/HBVideoController.m | 8 |
3 files changed, 11 insertions, 11 deletions
diff --git a/macosx/Base.lproj/Preferences.xib b/macosx/Base.lproj/Preferences.xib index ee5f95348..e33aa270b 100644 --- a/macosx/Base.lproj/Preferences.xib +++ b/macosx/Base.lproj/Preferences.xib @@ -392,17 +392,17 @@ </popUpButton> <popUpButton toolTip="Determines the granularity of the x264 Constant Quality control. Smaller values allow for finer quality increments." horizontalHuggingPriority="249" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="387"> <rect key="frame" x="294" y="227" width="60" height="22"/> - <popUpButtonCell key="cell" type="push" title="0.25" bezelStyle="rounded" alignment="left" controlSize="small" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" selectedItem="391" id="388"> + <popUpButtonCell key="cell" type="push" title="0.25" bezelStyle="rounded" alignment="left" controlSize="small" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" tag="4" imageScaling="proportionallyDown" inset="2" selectedItem="391" id="388"> <behavior key="behavior" lightByBackground="YES" lightByGray="YES"/> <font key="font" metaFont="smallSystem"/> <menu key="menu" title="OtherViews" id="389"> <items> - <menuItem title="1.0" id="394"/> - <menuItem title="0.50" id="393"/> - <menuItem title="0.25" state="on" id="391"> + <menuItem title="1.0" tag="1" id="394"/> + <menuItem title="0.50" tag="2" id="393"/> + <menuItem title="0.25" state="on" tag="4" id="391"> <modifierMask key="keyEquivalentModifierMask"/> </menuItem> - <menuItem title="0.20" id="390"> + <menuItem title="0.20" tag="5" id="390"> <modifierMask key="keyEquivalentModifierMask"/> </menuItem> </items> @@ -410,7 +410,7 @@ </popUpButtonCell> <connections> <accessibilityConnection property="title" destination="395" id="NVF-jL-QpH"/> - <binding destination="61" name="selectedValue" keyPath="values.x264CqSliderFractional" id="397"/> + <binding destination="61" name="selectedTag" keyPath="values.HBx264CqSliderFractional" id="XKV-6r-lP5"/> </connections> </popUpButton> <button toolTip="Use libdvdnav to read DVDs. Only disable this for problematic DVDs where libdvdread works better (rare)." verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="398"> diff --git a/macosx/HBPreferencesController.m b/macosx/HBPreferencesController.m index 4ad596738..840e2248b 100644 --- a/macosx/HBPreferencesController.m +++ b/macosx/HBPreferencesController.m @@ -69,7 +69,7 @@ @"EncodeLogLocation": @"NO", @"MinTitleScanSeconds": @"10", @"PreviewsNumber": @"10", - @"x264CqSliderFractional": @"0.50", + @"HBx264CqSliderFractional": @2, @"HBShowAdvancedTab": @NO, @"HBAutoNamingFormat": @[@"{Source}", @" ", @"{Title}"], @"HBQueuePauseIfLowSpace": @YES, diff --git a/macosx/HBVideoController.m b/macosx/HBVideoController.m index e5bc66ad5..95619247d 100644 --- a/macosx/HBVideoController.m +++ b/macosx/HBVideoController.m @@ -49,7 +49,7 @@ static void *HBVideoControllerContext = &HBVideoControllerContext; // Observe the x264 slider granularity, to update the slider when the pref is changed. [[NSUserDefaultsController sharedUserDefaultsController] addObserver:self - forKeyPath:@"values.x264CqSliderFractional" + forKeyPath:@"values.HBx264CqSliderFractional" options:NSKeyValueObservingOptionNew | NSKeyValueObservingOptionInitial context:HBVideoControllerContext]; @@ -124,7 +124,7 @@ static void *HBVideoControllerContext = &HBVideoControllerContext; fDisplayX264PresetsUnparseTextField.stringValue = @""; } } - else if ([keyPath isEqualToString:@"values.x264CqSliderFractional"]) + else if ([keyPath isEqualToString:@"values.HBx264CqSliderFractional"]) { [self setupQualitySlider]; } @@ -151,8 +151,8 @@ static void *HBVideoControllerContext = &HBVideoControllerContext; { // Encoders that allow fractional CQ values often have a low granularity // which makes the slider hard to use, so use a value from preferences. - granularity = [[NSUserDefaults standardUserDefaults] - floatForKey:@"x264CqSliderFractional"]; + granularity = 1.0f / [[NSUserDefaults standardUserDefaults] + integerForKey:@"HBx264CqSliderFractional"]; } fVidQualitySlider.minValue = minValue; fVidQualitySlider.maxValue = maxValue; |