Browse Source

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

Felix Paul Kühne 11 years ago
parent
commit
95bbdae8cf
2 changed files with 7 additions and 3 deletions
  1. 1 1
      NEWS
  2. 6 2
      Sources/VLCMovieViewController.m

+ 1 - 1
NEWS

@@ -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:
 ------

+ 6 - 2
Sources/VLCMovieViewController.m

@@ -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];