Commit 2d77e342 authored by Felix Paul Kühne's avatar Felix Paul Kühne

macosx: fix video effect adjust reset button

parent 3a93f25b
......@@ -788,6 +788,25 @@
#pragma mark basic
- (IBAction)enableAdjust:(id)sender
{
if (sender == _adjustResetButton) {
[_adjustBrightnessSlider setFloatValue: 1.0];
[_adjustContrastSlider setFloatValue: 1.0];
[_adjustGammaSlider setFloatValue: 1.0];
[_adjustHueSlider setFloatValue: 0];
[_adjustSaturationSlider setFloatValue: 1.0];
[_adjustBrightnessSlider setToolTip: [NSString stringWithFormat:@"%0.3f", 1.0]];
[_adjustContrastSlider setToolTip: [NSString stringWithFormat:@"%0.3f", 1.0]];
[_adjustGammaSlider setToolTip: [NSString stringWithFormat:@"%0.3f", 1.0]];
[_adjustHueSlider setToolTip: [NSString stringWithFormat:@"%.0f", 0.0]];
[_adjustSaturationSlider setToolTip: [NSString stringWithFormat:@"%0.3f", 1.0]];
VLCCoreInteraction *vci_si = [VLCCoreInteraction sharedInstance];
[vci_si setVideoFilterProperty: "brightness" forFilter: "adjust" float: 1.0];
[vci_si setVideoFilterProperty: "contrast" forFilter: "adjust" float: 1.0];
[vci_si setVideoFilterProperty: "gamma" forFilter: "adjust" float: 1.0];
[vci_si setVideoFilterProperty: "hue" forFilter: "adjust" float: 0.0];
[vci_si setVideoFilterProperty: "saturation" forFilter: "adjust" float: 1.0];
} else {
BOOL b_state = [_adjustCheckbox state];
[[VLCCoreInteraction sharedInstance] setVideoFilter: "adjust" on: b_state];
......@@ -803,6 +822,7 @@
[_adjustSaturationSlider setEnabled: b_state];
[_adjustSaturationLabel setEnabled: b_state];
[_adjustResetButton setEnabled: b_state];
}
}
- (IBAction)adjustSliderChanged:(id)sender
......@@ -827,26 +847,7 @@
- (IBAction)enableAdjustBrightnessThreshold:(id)sender
{
VLCCoreInteraction *vci_si = [VLCCoreInteraction sharedInstance];
if (sender == _adjustResetButton) {
[_adjustBrightnessSlider setFloatValue: 1.0];
[_adjustContrastSlider setFloatValue: 1.0];
[_adjustGammaSlider setFloatValue: 1.0];
[_adjustHueSlider setFloatValue: 0];
[_adjustSaturationSlider setFloatValue: 1.0];
[_adjustBrightnessSlider setToolTip: [NSString stringWithFormat:@"%0.3f", 1.0]];
[_adjustContrastSlider setToolTip: [NSString stringWithFormat:@"%0.3f", 1.0]];
[_adjustGammaSlider setToolTip: [NSString stringWithFormat:@"%0.3f", 1.0]];
[_adjustHueSlider setToolTip: [NSString stringWithFormat:@"%.0f", 0.0]];
[_adjustSaturationSlider setToolTip: [NSString stringWithFormat:@"%0.3f", 1.0]];
[vci_si setVideoFilterProperty: "brightness" forFilter: "adjust" float: 1.0];
[vci_si setVideoFilterProperty: "contrast" forFilter: "adjust" float: 1.0];
[vci_si setVideoFilterProperty: "gamma" forFilter: "adjust" float: 1.0];
[vci_si setVideoFilterProperty: "hue" forFilter: "adjust" float: 0.0];
[vci_si setVideoFilterProperty: "saturation" forFilter: "adjust" float: 1.0];
} else
[vci_si setVideoFilterProperty: "brightness-threshold" forFilter: "adjust" boolean: [_adjustBrightnessCheckbox state]];
}
- (IBAction)enableSharpen:(id)sender
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment