[vlc-commits] [Git][videolan/vlc][master] 16 commits: macosx: Place pin image and loading indicator together in stack view within main video view

Steve Lhomme (@robUx4) gitlab at videolan.org
Sat Nov 30 17:30:35 UTC 2024



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
4fb75669 by Claudio Cambra at 2024-11-30T17:11:49+00:00
macosx: Place pin image and loading indicator together in stack view within main video view

Signed-off-by: Claudio Cambra <developer at claudiocambra.com>

- - - - -
6db1e71d by Claudio Cambra at 2024-11-30T17:11:49+00:00
macosx: Make outlet properties for main video view controls bar weak

Signed-off-by: Claudio Cambra <developer at claudiocambra.com>

- - - - -
133b9730 by Claudio Cambra at 2024-11-30T17:11:49+00:00
macosx: Add more outlets for main video view constraints relating to central control buttons

Signed-off-by: Claudio Cambra <developer at claudiocambra.com>

- - - - -
c89557b6 by Claudio Cambra at 2024-11-30T17:11:49+00:00
macosx: Add constraint relating to placing central controls button stack view at bottom of main video view

Signed-off-by: Claudio Cambra <developer at claudiocambra.com>

- - - - -
b11d7172 by Claudio Cambra at 2024-11-30T17:11:49+00:00
macosx: Place main controls button stack at bottom of view when showing the audio decorative view

Signed-off-by: Claudio Cambra <developer at claudiocambra.com>

- - - - -
b3ce6fc7 by Claudio Cambra at 2024-11-30T17:11:49+00:00
macosx: Add playback control button size to library ui units

Signed-off-by: Claudio Cambra <developer at claudiocambra.com>

- - - - -
2debe07f by Claudio Cambra at 2024-11-30T17:11:49+00:00
macosx: Keep strong reference to the centerButtonStackInViewConstraint

Signed-off-by: Claudio Cambra <developer at claudiocambra.com>

- - - - -
494ebfa1 by Claudio Cambra at 2024-11-30T17:11:49+00:00
macosx: Ensure deactivation of conflicting constraint before activating

Signed-off-by: Claudio Cambra <developer at claudiocambra.com>

- - - - -
bc1a8449 by Claudio Cambra at 2024-11-30T17:11:49+00:00
macosx: Remove spacing between buttons and bottom bar in audio decorative mode

Signed-off-by: Claudio Cambra <developer at claudiocambra.com>

- - - - -
37ecdeb5 by Claudio Cambra at 2024-11-30T17:11:49+00:00
macosx: Reduce size of playback buttons in audio decorative view mode

Signed-off-by: Claudio Cambra <developer at claudiocambra.com>

- - - - -
dd935c1f by Claudio Cambra at 2024-11-30T17:11:49+00:00
macosx: Ensure foreground audio decorative view does not overlap controls

Signed-off-by: Claudio Cambra <developer at claudiocambra.com>

- - - - -
db8c7f8c by Claudio Cambra at 2024-11-30T17:11:49+00:00
macosx: Add outlet for foreground view top constraint in main video view audio decorative view

Signed-off-by: Claudio Cambra <developer at claudiocambra.com>

- - - - -
b8723043 by Claudio Cambra at 2024-11-30T17:11:49+00:00
macosx: Ensure audio decorative view foreground view is correctly positioned below the fake title bar in main video view

Signed-off-by: Claudio Cambra <developer at claudiocambra.com>

- - - - -
d6beeace by Claudio Cambra at 2024-11-30T17:11:49+00:00
macosx: Extract bottom bar view and cover art foreground view constraint application to separate method

Signed-off-by: Claudio Cambra <developer at claudiocambra.com>

- - - - -
0100fded by Claudio Cambra at 2024-11-30T17:11:49+00:00
macosx: Apply expected constraints on cover art view when coming out of PIP mode

Signed-off-by: Claudio Cambra <developer at claudiocambra.com>

- - - - -
ebcaa966 by Claudio Cambra at 2024-11-30T17:11:49+00:00
macosx: Apply constraint between foreground cover art view and fake title bar view with direct anchors relationship

Signed-off-by: Claudio Cambra <developer at claudiocambra.com>

- - - - -


8 changed files:

- modules/gui/macosx/UI/VLCMainVideoView.xib
- modules/gui/macosx/UI/VLCMainVideoViewAudioMediaDecorativeView.xib
- modules/gui/macosx/library/VLCLibraryUIUnits.h
- modules/gui/macosx/library/VLCLibraryUIUnits.m
- modules/gui/macosx/windows/controlsbar/VLCMainVideoViewControlsBar.h
- modules/gui/macosx/windows/video/VLCMainVideoViewAudioMediaDecorativeView.h
- modules/gui/macosx/windows/video/VLCMainVideoViewController.h
- modules/gui/macosx/windows/video/VLCMainVideoViewController.m


Changes:

=====================================
modules/gui/macosx/UI/VLCMainVideoView.xib
=====================================
@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="22505" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="23504" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
     <dependencies>
         <deployment version="101000" identifier="macosx"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="22505"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="23504"/>
         <capability name="Image references" minToolsVersion="12.0"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
@@ -10,6 +10,7 @@
         <customObject id="-2" userLabel="File's Owner" customClass="VLCMainVideoViewController">
             <connections>
                 <outlet property="bottomBarView" destination="1GA-GG-Sdx" id="0UY-5o-eVD"/>
+                <outlet property="centerButtonStackInViewConstraint" destination="l2Y-IR-aus" id="kLb-Ev-BuY"/>
                 <outlet property="centralControlsStackView" destination="CvV-yX-Nbh" id="zyI-Rb-bem"/>
                 <outlet property="controlsBar" destination="3" id="Mfq-2w-2uR"/>
                 <outlet property="fakeTitleBar" destination="jnw-gL-nrF" id="7lZ-al-c3d"/>
@@ -17,10 +18,13 @@
                 <outlet property="floatOnTopIndicatorImageView" destination="CrW-mq-gge" id="hqR-4Z-a18"/>
                 <outlet property="loadingIndicator" destination="xOQ-YR-iAc" id="CtX-Yo-UX2"/>
                 <outlet property="mainControlsView" destination="D4V-Zd-qvB" id="KwM-ya-ETn"/>
+                <outlet property="nextButtonSizeConstraint" destination="M5n-CD-fd3" id="WIM-QF-IMG"/>
                 <outlet property="overlayView" destination="FGS-tq-54S" id="RSC-7m-N0y"/>
+                <outlet property="playButtonSizeConstraint" destination="OHb-xJ-sqM" id="7Ve-Gd-rEz"/>
                 <outlet property="playQueueButton" destination="Drq-if-dw4" id="BZe-Cr-mzZ"/>
                 <outlet property="playQueueButtonTopConstraint" destination="VyM-t4-y6F" id="V94-GS-KcS"/>
                 <outlet property="playQueueButtonTrailingConstraint" destination="rWa-NJ-Aju" id="tzU-Iz-CXl"/>
+                <outlet property="prevButtonSizeConstraint" destination="XBm-GM-29d" id="8x6-WZ-ydw"/>
                 <outlet property="returnButton" destination="UoQ-34-Pox" id="nyY-OF-9zj"/>
                 <outlet property="returnButtonLeadingConstraint" destination="BkP-RA-uxn" id="CsI-gH-SYp"/>
                 <outlet property="returnButtonTopConstraint" destination="0l2-eC-67c" id="78K-sz-kmV"/>
@@ -54,7 +58,7 @@
                 <outlet property="volumeSlider" destination="fKc-2d-Uu6" id="2pU-fH-Afo"/>
             </connections>
         </customObject>
-        <customView id="WRu-Ic-lQK">
+        <customView appearanceType="darkAqua" id="WRu-Ic-lQK">
             <rect key="frame" x="0.0" y="0.0" width="720" height="480"/>
             <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
             <subviews>
@@ -86,21 +90,6 @@
                             </visualEffectView>
                             <customView translatesAutoresizingMaskIntoConstraints="NO" id="FGS-tq-54S" customClass="VLCMainVideoViewOverlayView">
                                 <rect key="frame" x="0.0" y="0.0" width="720" height="480"/>
-                                <subviews>
-                                    <imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="CrW-mq-gge">
-                                        <rect key="frame" x="344" y="285.5" width="32.5" height="45"/>
-                                        <constraints>
-                                            <constraint firstAttribute="width" constant="32" id="wyi-7y-I1n"/>
-                                            <constraint firstAttribute="height" constant="32" id="yeS-Wi-3sX"/>
-                                        </constraints>
-                                        <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyUpOrDown" id="OcH-tO-P80">
-                                            <imageReference key="image" image="pin.fill" catalog="system" symbolScale="large"/>
-                                        </imageCell>
-                                    </imageView>
-                                </subviews>
-                                <constraints>
-                                    <constraint firstItem="CrW-mq-gge" firstAttribute="centerX" secondItem="FGS-tq-54S" secondAttribute="centerX" id="rPJ-ci-c4T"/>
-                                </constraints>
                             </customView>
                             <customView translatesAutoresizingMaskIntoConstraints="NO" id="1GA-GG-Sdx">
                                 <rect key="frame" x="0.0" y="0.0" width="720" height="132"/>
@@ -369,7 +358,7 @@
                                 <rect key="frame" x="260" y="208" width="200" height="64"/>
                                 <subviews>
                                     <button translatesAutoresizingMaskIntoConstraints="NO" id="V9d-hX-iyg" customClass="VLCImageButton">
-                                        <rect key="frame" x="0.0" y="6.5" width="48" height="51"/>
+                                        <rect key="frame" x="0.0" y="6.5" width="48.5" height="51"/>
                                         <shadow key="shadow" blurRadius="20">
                                             <color key="color" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                         </shadow>
@@ -387,7 +376,7 @@
                                         </connections>
                                     </button>
                                     <button translatesAutoresizingMaskIntoConstraints="NO" id="PCC-8a-sVF" customClass="VLCImageButton">
-                                        <rect key="frame" x="68" y="-2" width="64.5" height="68"/>
+                                        <rect key="frame" x="68" y="-1.5" width="64.5" height="68"/>
                                         <shadow key="shadow" blurRadius="30">
                                             <color key="color" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                         </shadow>
@@ -408,7 +397,7 @@
                                         </connections>
                                     </button>
                                     <button translatesAutoresizingMaskIntoConstraints="NO" id="sF5-Z0-bef" customClass="VLCImageButton">
-                                        <rect key="frame" x="152" y="6.5" width="48" height="51"/>
+                                        <rect key="frame" x="152" y="6.5" width="48.5" height="51"/>
                                         <shadow key="shadow" blurRadius="20">
                                             <color key="color" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                         </shadow>
@@ -480,7 +469,6 @@
                             <constraint firstItem="jnw-gL-nrF" firstAttribute="leading" secondItem="1tI-8K-e3c" secondAttribute="leading" id="Z37-TJ-B2D"/>
                             <constraint firstAttribute="trailing" secondItem="1GA-GG-Sdx" secondAttribute="trailing" id="dWk-NI-ekN"/>
                             <constraint firstItem="CvV-yX-Nbh" firstAttribute="centerY" secondItem="1tI-8K-e3c" secondAttribute="centerY" id="l2Y-IR-aus"/>
-                            <constraint firstItem="CrW-mq-gge" firstAttribute="bottom" secondItem="CvV-yX-Nbh" secondAttribute="top" constant="-20" id="mik-2t-Inh"/>
                             <constraint firstAttribute="bottom" secondItem="FGS-tq-54S" secondAttribute="bottom" id="ps4-nL-1Xc"/>
                             <constraint firstItem="FGS-tq-54S" firstAttribute="leading" secondItem="1tI-8K-e3c" secondAttribute="leading" id="qfd-OD-CHv"/>
                             <constraint firstAttribute="trailing" secondItem="Drq-if-dw4" secondAttribute="trailing" constant="20" id="rWa-NJ-Aju"/>
@@ -490,20 +478,42 @@
                     </view>
                     <color key="fillColor" red="0.0" green="0.0" blue="0.0" alpha="0.35060533940397354" colorSpace="custom" customColorSpace="sRGB"/>
                 </box>
-                <progressIndicator maxValue="100" indeterminate="YES" style="spinning" translatesAutoresizingMaskIntoConstraints="NO" id="xOQ-YR-iAc">
-                    <rect key="frame" x="344" y="156" width="32" height="32"/>
-                </progressIndicator>
+                <stackView distribution="fill" orientation="horizontal" alignment="top" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="CjJ-z0-ITu">
+                    <rect key="frame" x="324" y="292" width="72" height="32"/>
+                    <subviews>
+                        <progressIndicator maxValue="100" indeterminate="YES" style="spinning" translatesAutoresizingMaskIntoConstraints="NO" id="xOQ-YR-iAc">
+                            <rect key="frame" x="0.0" y="0.0" width="32" height="32"/>
+                        </progressIndicator>
+                        <imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="CrW-mq-gge">
+                            <rect key="frame" x="40" y="-6.5" width="32.5" height="45"/>
+                            <constraints>
+                                <constraint firstAttribute="width" constant="32" id="wyi-7y-I1n"/>
+                                <constraint firstAttribute="height" constant="32" id="yeS-Wi-3sX"/>
+                            </constraints>
+                            <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyUpOrDown" id="OcH-tO-P80">
+                                <imageReference key="image" image="pin.fill" catalog="system" symbolScale="large"/>
+                            </imageCell>
+                        </imageView>
+                    </subviews>
+                    <visibilityPriorities>
+                        <integer value="1000"/>
+                        <integer value="1000"/>
+                    </visibilityPriorities>
+                    <customSpacing>
+                        <real value="3.4028234663852886e+38"/>
+                        <real value="3.4028234663852886e+38"/>
+                    </customSpacing>
+                </stackView>
             </subviews>
             <constraints>
                 <constraint firstItem="D4V-Zd-qvB" firstAttribute="leading" secondItem="WRu-Ic-lQK" secondAttribute="leading" id="0vg-TG-O1c"/>
                 <constraint firstItem="MTR-ds-I8o" firstAttribute="top" secondItem="WRu-Ic-lQK" secondAttribute="top" id="2cq-kJ-XAR"/>
                 <constraint firstAttribute="bottom" secondItem="D4V-Zd-qvB" secondAttribute="bottom" id="D7Y-ck-iZE"/>
                 <constraint firstAttribute="trailing" secondItem="MTR-ds-I8o" secondAttribute="trailing" id="E2t-0S-hdB"/>
-                <constraint firstItem="xOQ-YR-iAc" firstAttribute="top" secondItem="CvV-yX-Nbh" secondAttribute="bottom" constant="20" id="S0Y-3b-Ibd"/>
+                <constraint firstItem="CvV-yX-Nbh" firstAttribute="top" secondItem="CjJ-z0-ITu" secondAttribute="bottom" constant="20" id="R49-bc-DdH"/>
                 <constraint firstItem="MTR-ds-I8o" firstAttribute="leading" secondItem="WRu-Ic-lQK" secondAttribute="leading" id="TJ3-v0-eiw"/>
                 <constraint firstAttribute="trailing" secondItem="D4V-Zd-qvB" secondAttribute="trailing" id="XP7-9K-6UE"/>
-                <constraint firstItem="xOQ-YR-iAc" firstAttribute="centerX" secondItem="WRu-Ic-lQK" secondAttribute="centerX" id="enR-Xo-ume"/>
-                <constraint firstItem="1GA-GG-Sdx" firstAttribute="top" relation="greaterThanOrEqual" secondItem="xOQ-YR-iAc" secondAttribute="bottom" constant="20" id="jM9-dz-8jm"/>
+                <constraint firstItem="CjJ-z0-ITu" firstAttribute="centerX" secondItem="CvV-yX-Nbh" secondAttribute="centerX" id="i8u-sK-BUl"/>
                 <constraint firstAttribute="bottom" secondItem="MTR-ds-I8o" secondAttribute="bottom" id="mbp-Lj-iuX"/>
                 <constraint firstItem="D4V-Zd-qvB" firstAttribute="top" secondItem="WRu-Ic-lQK" secondAttribute="top" id="n1X-TQ-EW3"/>
             </constraints>


=====================================
modules/gui/macosx/UI/VLCMainVideoViewAudioMediaDecorativeView.xib
=====================================
@@ -44,12 +44,13 @@
                 <constraint firstItem="D1e-fS-bwO" firstAttribute="top" secondItem="WRu-Ic-lQK" secondAttribute="top" id="eDP-U6-Qt6"/>
                 <constraint firstAttribute="bottom" secondItem="D1e-fS-bwO" secondAttribute="bottom" id="toU-5j-lin"/>
                 <constraint firstAttribute="trailing" secondItem="cDv-dn-65H" secondAttribute="trailing" id="vEl-zP-vj9"/>
-                <constraint firstItem="40P-sL-Mzq" firstAttribute="centerY" secondItem="WRu-Ic-lQK" secondAttribute="centerY" id="yFl-gc-ITT"/>
+                <constraint firstItem="40P-sL-Mzq" firstAttribute="centerY" secondItem="WRu-Ic-lQK" secondAttribute="centerY" priority="250" id="yFl-gc-ITT"/>
             </constraints>
             <connections>
                 <outlet property="backgroundCoverArtView" destination="cDv-dn-65H" id="bw2-8i-Xg6"/>
                 <outlet property="backgroundVisualEffectView" destination="D1e-fS-bwO" id="Jkh-ep-Wyn"/>
                 <outlet property="foregroundCoverArtView" destination="40P-sL-Mzq" id="nVl-ga-BoM"/>
+                <outlet property="foregroundViewTopConstraint" destination="TVt-Xt-aoo" id="OFh-5C-XZF"/>
             </connections>
             <point key="canvasLocation" x="66" y="-232"/>
         </customView>


=====================================
modules/gui/macosx/library/VLCLibraryUIUnits.h
=====================================
@@ -76,6 +76,10 @@ NS_ASSUME_NONNULL_BEGIN
 @property (class, readonly) const CGFloat libraryWindowNavSidebarMaxWidth;
 @property (class, readonly) const CGFloat libraryWindowPlayQueueSidebarMaxWidth;
 
+ at property (class, readonly) const CGFloat largePlaybackControlButtonSize;
+ at property (class, readonly) const CGFloat mediumPlaybackControlButtonSize;
+ at property (class, readonly) const CGFloat smallPlaybackControlButtonSize;
+
 @property (class, readonly) const CGFloat sliderTickThickness;
 
 + (const NSSize)adjustedCollectionViewItemSizeForCollectionView:(NSCollectionView *)collectionView


=====================================
modules/gui/macosx/library/VLCLibraryUIUnits.m
=====================================
@@ -246,6 +246,21 @@
     return 400.;
 }
 
++ (const CGFloat)largePlaybackControlButtonSize
+{
+    return 64.;
+}
+
++ (const CGFloat)mediumPlaybackControlButtonSize
+{
+    return 48.;
+}
+
++ (const CGFloat)smallPlaybackControlButtonSize
+{
+    return 32.;
+}
+
 + (const CGFloat)sliderTickThickness
 {
     return 1.;


=====================================
modules/gui/macosx/windows/controlsbar/VLCMainVideoViewControlsBar.h
=====================================
@@ -26,11 +26,11 @@ NS_ASSUME_NONNULL_BEGIN
 
 @interface VLCMainVideoViewControlsBar : VLCControlsBarCommon
 
- at property (readwrite, strong) IBOutlet NSButton *bookmarksButton;
- at property (readwrite, strong) IBOutlet NSButton *subtitlesButton;
- at property (readwrite, strong) IBOutlet NSButton *audioButton;
- at property (readwrite, strong) IBOutlet NSButton *videoButton;
- at property (readwrite, strong) IBOutlet NSButton *floatOnTopButton;
+ at property (readwrite, weak) IBOutlet NSButton *bookmarksButton;
+ at property (readwrite, weak) IBOutlet NSButton *subtitlesButton;
+ at property (readwrite, weak) IBOutlet NSButton *audioButton;
+ at property (readwrite, weak) IBOutlet NSButton *videoButton;
+ at property (readwrite, weak) IBOutlet NSButton *floatOnTopButton;
 
 - (IBAction)openBookmarks:(id)sender;
 - (IBAction)openSubtitlesMenu:(id)sender;


=====================================
modules/gui/macosx/windows/video/VLCMainVideoViewAudioMediaDecorativeView.h
=====================================
@@ -31,6 +31,7 @@ NS_ASSUME_NONNULL_BEGIN
 @property (readwrite, strong) IBOutlet NSImageView *foregroundCoverArtView;
 @property (readwrite, strong) IBOutlet NSImageView *backgroundCoverArtView;
 @property (readwrite, strong) IBOutlet NSVisualEffectView *backgroundVisualEffectView;
+ at property (readwrite, strong) IBOutlet NSLayoutConstraint *foregroundViewTopConstraint;
 
 @end
 


=====================================
modules/gui/macosx/windows/video/VLCMainVideoViewController.h
=====================================
@@ -31,6 +31,7 @@
 NS_ASSUME_NONNULL_BEGIN
 
 @interface VLCMainVideoViewController : NSViewController
+
 @property (readwrite, strong) IBOutlet NSView *voutContainingView;
 
 @property (readwrite, strong) IBOutlet VLCVoutView *voutView;
@@ -50,6 +51,13 @@ NS_ASSUME_NONNULL_BEGIN
 @property (readwrite, strong) IBOutlet NSProgressIndicator *loadingIndicator;
 @property (readwrite, strong) IBOutlet NSImageView *floatOnTopIndicatorImageView;
 
+ at property (readwrite, weak) IBOutlet NSLayoutConstraint *playButtonSizeConstraint;
+ at property (readwrite, weak) IBOutlet NSLayoutConstraint *prevButtonSizeConstraint;
+ at property (readwrite, weak) IBOutlet NSLayoutConstraint *nextButtonSizeConstraint;
+
+ at property (readwrite, strong) IBOutlet NSLayoutConstraint *centerButtonStackInViewConstraint;
+ at property (readonly) NSLayoutConstraint *bottomButtonStackViewConstraint;
+
 @property (readonly, strong) VLCMainVideoViewAudioMediaDecorativeView *audioDecorativeView;
 @property (readwrite, nonatomic) BOOL autohideControls;
 @property (readwrite, nonatomic) BOOL displayLibraryControls;


=====================================
modules/gui/macosx/windows/video/VLCMainVideoViewController.m
=====================================
@@ -137,6 +137,10 @@
 {
     _audioDecorativeView = [VLCMainVideoViewAudioMediaDecorativeView fromNibWithOwner:self];
     _audioDecorativeView.translatesAutoresizingMaskIntoConstraints = NO;
+
+    _bottomButtonStackViewConstraint =
+        [self.bottomBarView.topAnchor constraintEqualToAnchor:self.centralControlsStackView.bottomAnchor];
+
     VLCPlayerController * const controller =
         VLCMain.sharedInstance.playQueueController.playerController;
     [self updateDecorativeViewVisibilityOnControllerChange:controller];
@@ -203,11 +207,35 @@
 
     if (decorativeViewVisible) {
         [self setAutohideControls:NO];
+        self.centerButtonStackInViewConstraint.active = NO;
+        self.bottomButtonStackViewConstraint.active = YES;
+        self.prevButtonSizeConstraint.constant = VLCLibraryUIUnits.smallPlaybackControlButtonSize;
+        self.playButtonSizeConstraint.constant = VLCLibraryUIUnits.smallPlaybackControlButtonSize;
+        self.nextButtonSizeConstraint.constant = VLCLibraryUIUnits.smallPlaybackControlButtonSize;
+        [self applyAudioDecorativeViewForegroundCoverArtViewConstraints];
     } else {
         [self setAutohideControls:YES];
+        self.bottomButtonStackViewConstraint.active = NO;
+        self.centerButtonStackInViewConstraint.active = YES;
+        self.prevButtonSizeConstraint.constant = VLCLibraryUIUnits.mediumPlaybackControlButtonSize;
+        self.playButtonSizeConstraint.constant = VLCLibraryUIUnits.largePlaybackControlButtonSize;
+        self.nextButtonSizeConstraint.constant = VLCLibraryUIUnits.mediumPlaybackControlButtonSize;
     }
 }
 
+- (void)applyAudioDecorativeViewForegroundCoverArtViewConstraints
+{
+    if (![self.voutContainingView.subviews containsObject:self.audioDecorativeView]) {
+        return;
+    }
+
+    NSView * const foregroundCoverArtView = self.audioDecorativeView.foregroundCoverArtView;
+    [NSLayoutConstraint activateConstraints:@[
+        [self.centralControlsStackView.topAnchor constraintGreaterThanOrEqualToAnchor:foregroundCoverArtView.bottomAnchor constant:VLCLibraryUIUnits.largeSpacing],
+        [self.fakeTitleBar.bottomAnchor constraintLessThanOrEqualToAnchor:foregroundCoverArtView.topAnchor constant:-VLCLibraryUIUnits.largeSpacing]
+    ]];
+}
+
 - (void)playerCurrentMediaItemChanged:(NSNotification *)notification
 {
     NSParameterAssert(notification);
@@ -556,6 +584,7 @@
                relativeTo:self.mainControlsView];
     [self.voutContainingView applyConstraintsToFillSuperview];
     _voutViewController = nil;
+    [self applyAudioDecorativeViewForegroundCoverArtViewConstraints];
 }
 
 - (void)pipActionPlay:(PIPViewController *)pip
@@ -576,7 +605,8 @@
     [controller pause];
 }
 
-- (void)pipActionPause:(PIPViewController *)pip {
+- (void)pipActionPause:(PIPViewController *)pip
+{
     VLCPlayerController * const controller =
         VLCMain.sharedInstance.playQueueController.playerController;
     [controller pause];



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/e6c229b1e4d13008e68b52457a38cb39e26f2dc1...ebcaa966816a2da1c2a73c05988e1c07ca6f7e93

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/e6c229b1e4d13008e68b52457a38cb39e26f2dc1...ebcaa966816a2da1c2a73c05988e1c07ca6f7e93
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list