Bladeren bron

fix #14622, update time navigation title view on iPad.
fix time label size when changing to displayRemainingTime.

(cherry picked from commit 946b46f937380031c245d6a5bb61b4addf2e81ad)
Signed-off-by: Felix Paul Kühne <fkuehne@videolan.org>

Tobias Conradi 10 jaren geleden
bovenliggende
commit
35a150167b
2 gewijzigde bestanden met toevoegingen van 3 en 0 verwijderingen
  1. 1 0
      Resources/VLCMovieViewController~ipad.xib
  2. 2 0
      Sources/VLCMovieViewController.m

+ 1 - 0
Resources/VLCMovieViewController~ipad.xib

@@ -48,6 +48,7 @@
                 <outlet property="spuDelayLabel" destination="NX8-Zc-K6Y" id="WLd-cA-fUn"/>
                 <outlet property="spuDelaySlider" destination="juX-HR-PqD" id="x4D-ki-Lwk"/>
                 <outlet property="statusLabel" destination="205" id="206"/>
+                <outlet property="timeNavigationTitleView" destination="248" id="Ghx-eD-EQA"/>
                 <outlet property="toolbar" destination="256" id="260"/>
                 <outlet property="trackNameLabel" destination="304" id="307"/>
                 <outlet property="trackSwitcherButton" destination="277" id="4wh-dZ-qaR"/>

+ 2 - 0
Sources/VLCMovieViewController.m

@@ -695,6 +695,7 @@ typedef NS_ENUM(NSInteger, VLCPanType) {
     if (_mediaDuration > 0) {
         VLCTime *newPosition = [VLCTime timeWithInt:(int)(sender.value * _mediaDuration)];
         [self.timeNavigationTitleView.timeDisplayButton setTitle:newPosition.stringValue forState:UIControlStateNormal];
+        [self.timeNavigationTitleView setNeedsLayout];
         self.timeNavigationTitleView.timeDisplayButton.accessibilityLabel = [NSString stringWithFormat:@"%@: %@", NSLocalizedString(@"PLAYBACK_POSITION", nil), newPosition.stringValue];
         _positionSet = NO;
     }
@@ -769,6 +770,7 @@ typedef NS_ENUM(NSInteger, VLCPanType) {
         [self.timeNavigationTitleView.timeDisplayButton setTitle:[[mediaPlayer remainingTime] stringValue] forState:UIControlStateNormal];
     else
         [self.timeNavigationTitleView.timeDisplayButton setTitle:[[mediaPlayer time] stringValue] forState:UIControlStateNormal];
+    [self.timeNavigationTitleView setNeedsLayout];
 }
 
 - (void)prepareForMediaPlayback:(VLCPlaybackController *)controller