Commit 95bbdae8 authored by Felix Paul Kühne's avatar Felix Paul Kühne

playback: update brightness slider when using the swipe gesture (close #10518)

parent 1dfa5ec7
......@@ -5,7 +5,7 @@
* Added option to disable playback control gestures (#10592)
* Fixed serial ftp downloads
* Added support for m4b, caf, oma, w64 audio files
* Stability improvements and UX tweaks (amongst others #10601)
* Stability improvements and UX tweaks (amongst others #10601, #10518)
2.2.2:
------
......
......@@ -1095,10 +1095,14 @@
musicPlayer.volume += 0.01;
} else if ([panType isEqual:@"Brightness"]) {
CGFloat brightness = [UIScreen mainScreen].brightness;
if (panDirectionY > 0)
[[UIScreen mainScreen] setBrightness:(brightness - 0.01)];
brightness = brightness - 0.01;
else
[[UIScreen mainScreen] setBrightness:(brightness + 0.01)];
brightness = brightness + 0.01;
[[UIScreen mainScreen] setBrightness:brightness];
self.brightnessSlider.value = brightness * 2.;
NSString *brightnessHUD = [NSString stringWithFormat:@"%@: %@ %%", NSLocalizedString(@"VFILTER_BRIGHTNESS", @""), [[[NSString stringWithFormat:@"%f",(brightness*100)] componentsSeparatedByString:@"."] objectAtIndex:0]];
[self.statusLabel showStatusMessage:brightnessHUD];
......
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