[vlc-commits] [Git][videolan/vlc][master] 32 commits: macosx: Reduce opacity of NSBox overlay in VLCMainVideoView

Steve Lhomme (@robUx4) gitlab at videolan.org
Thu Mar 9 06:55:05 UTC 2023



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
1db60797 by Claudio Cambra at 2023-03-09T06:30:52+00:00
macosx: Reduce opacity of NSBox overlay in VLCMainVideoView

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

- - - - -
c78bf82f by Claudio Cambra at 2023-03-09T06:30:52+00:00
macosx: Set main video view controls view to Dark Aqua appearance, setting controls here to dark mode, improving integration with black video background

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

- - - - -
c06d37a7 by Claudio Cambra at 2023-03-09T06:30:52+00:00
macosx: Set bottom bar visual effect material to better full screen UI

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

- - - - -
6a31c1e5 by Claudio Cambra at 2023-03-09T06:30:52+00:00
macosx: Use more clearly clickable recessed button types in main video view

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

- - - - -
cc9ebdc4 by Claudio Cambra at 2023-03-09T06:30:52+00:00
macosx: Fix icon for mute button in main video view, use PDF icon

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

- - - - -
19521426 by Claudio Cambra at 2023-03-09T06:30:52+00:00
macosx: Make video title in bottom bar of main video view bold

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

- - - - -
eb9a288a by Claudio Cambra at 2023-03-09T06:30:52+00:00
macosx: Add shadows to central buttons in main video view to help contrast

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

- - - - -
b42fef5b by Claudio Cambra at 2023-03-09T06:30:52+00:00
macosx: Add VLCMainVideoViewOverlayView

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

- - - - -
ea2d3a84 by Claudio Cambra at 2023-03-09T06:30:52+00:00
macosx: Make insets of main video view bottom bar equal on all sides

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

- - - - -
d1b1a478 by Claudio Cambra at 2023-03-09T06:30:52+00:00
macosx: Improve visibility of top buttons in main video view

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

- - - - -
a7f6d36e by Claudio Cambra at 2023-03-09T06:30:52+00:00
macosx: Provide top main video view buttons with matching insets with bottom bar

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

- - - - -
0564a1e4 by Claudio Cambra at 2023-03-09T06:30:52+00:00
macosx: Add convenience method in VLCMainVideoViewController to get size of window buttons

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

- - - - -
06c62c32 by Claudio Cambra at 2023-03-09T06:30:52+00:00
macosx: Place top library buttons within a fake titlebar

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

- - - - -
802f34cc by Claudio Cambra at 2023-03-09T06:30:52+00:00
macosx: Improve sizing of library buttons when placed in fake toolbar

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

- - - - -
cdd1479b by Claudio Cambra at 2023-03-09T06:30:52+00:00
macosx: Improve leading and trailing spacings of library buttons in main video view

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

- - - - -
72b93a91 by Claudio Cambra at 2023-03-09T06:30:52+00:00
macosx: Work around bug with changing size of toggleable button while it is toggled

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

- - - - -
b6610339 by Claudio Cambra at 2023-03-09T06:30:52+00:00
macosx: Don't do custom redraw if rect hasn't changed in VLCMainVideoViewOverlayView

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

- - - - -
c09c4658 by Claudio Cambra at 2023-03-09T06:30:52+00:00
macosx: Add capability for VLCMainVideoViewOverlayView to draw dark gradient over bottom bar controls

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

- - - - -
5dd7b605 by Claudio Cambra at 2023-03-09T06:30:52+00:00
macosx: Replace visual effect view for main video view bottom bar with normal transparent view

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

- - - - -
8ca7c0d1 by Claudio Cambra at 2023-03-09T06:30:52+00:00
macosx: Add outlets in VLCMainVideoViewController for overlay view and changed bottom bar view

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

- - - - -
339cd9ef by Claudio Cambra at 2023-03-09T06:30:52+00:00
macosx: Add some shadow to the elements of the bottom bar view in VLCMainVideoView

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

- - - - -
803275a4 by Claudio Cambra at 2023-03-09T06:30:52+00:00
macosx: Draw gradient for top library controls in VLCMainVideoView when they are not part of the fake toolbar

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

- - - - -
13028eb5 by Claudio Cambra at 2023-03-09T06:30:52+00:00
macosx: Add a unit to VLCLibraryUIUnits for controls fade in and out animation duration

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

- - - - -
9d9dcc46 by Claudio Cambra at 2023-03-09T06:30:52+00:00
macosx: Fade in main video view controls rather than immediately hide or show them

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

- - - - -
5c727a3e by Claudio Cambra at 2023-03-09T06:30:52+00:00
macosx: Fade in full video view window controls rather than immediately hide or show them

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

- - - - -
2df079f8 by Claudio Cambra at 2023-03-09T06:30:52+00:00
macosx: Make gradient drawing more diffuse, and simplify the drawing procedure

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

- - - - -
d2da8824 by Claudio Cambra at 2023-03-09T06:30:52+00:00
macosx: Make shadows around play/next/prev buttons in main video view more diffuse and less obvious

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

- - - - -
aea4e088 by Claudio Cambra at 2023-03-09T06:30:52+00:00
macosx: Hide VLCMainVideoView controls when video paused

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

- - - - -
51fa969b by Claudio Cambra at 2023-03-09T06:30:52+00:00
macosx: Publically declare hideControls method in VLCMainVideoViewController

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

- - - - -
b735c32d by Claudio Cambra at 2023-03-09T06:30:52+00:00
macosx: Hide controls when moving mouse outside the fullsizevideowindow

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

- - - - -
14845554 by Claudio Cambra at 2023-03-09T06:30:52+00:00
macosx: Don't hide titlebar in full video view window when in native full screen or when video view hidden

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

- - - - -
5fd7deb1 by Claudio Cambra at 2023-03-09T06:30:52+00:00
macosx: Remove redundant control bar code in VLCLibraryWindow

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

- - - - -


12 changed files:

- extras/package/macosx/VLC.xcodeproj/project.pbxproj
- modules/gui/macosx/Makefile.am
- modules/gui/macosx/UI/VLCMainVideoView.xib
- modules/gui/macosx/library/VLCLibraryUIUnits.h
- modules/gui/macosx/library/VLCLibraryUIUnits.m
- modules/gui/macosx/library/VLCLibraryWindow.m
- modules/gui/macosx/windows/mainwindow/VLCControlsBarCommon.m
- modules/gui/macosx/windows/video/VLCFullVideoViewWindow.m
- modules/gui/macosx/windows/video/VLCMainVideoViewController.h
- modules/gui/macosx/windows/video/VLCMainVideoViewController.m
- + modules/gui/macosx/windows/video/VLCMainVideoViewOverlayView.h
- + modules/gui/macosx/windows/video/VLCMainVideoViewOverlayView.m


Changes:

=====================================
extras/package/macosx/VLC.xcodeproj/project.pbxproj
=====================================
@@ -92,6 +92,7 @@
 		536283F9291146BC00640C15 /* VLCLibraryCollectionViewFlowLayout.m in Sources */ = {isa = PBXBuildFile; fileRef = 536283EE291146BC00640C15 /* VLCLibraryCollectionViewFlowLayout.m */; };
 		53628402291147C500640C15 /* VLCBasicView.m in Sources */ = {isa = PBXBuildFile; fileRef = 536283FF291147C500640C15 /* VLCBasicView.m */; };
 		53628403291147C500640C15 /* VLCSubScrollView.m in Sources */ = {isa = PBXBuildFile; fileRef = 53628400291147C500640C15 /* VLCSubScrollView.m */; };
+		536BFD1929B181E100BD0776 /* VLCMainVideoViewOverlayView.m in Sources */ = {isa = PBXBuildFile; fileRef = 536BFD1829B181E100BD0776 /* VLCMainVideoViewOverlayView.m */; };
 		536EFBF5295BCB8300F4CB13 /* VLCLibraryUIUnits.m in Sources */ = {isa = PBXBuildFile; fileRef = 536EFBF4295BCB8300F4CB13 /* VLCLibraryUIUnits.m */; };
 		536EFC39295E521600F4CB13 /* VLCLibraryVideoViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 536EFC38295E521600F4CB13 /* VLCLibraryVideoViewController.m */; };
 		538A7EDA29A63EE40068AD4F /* VLCFullVideoViewWindow.m in Sources */ = {isa = PBXBuildFile; fileRef = 538A7ED929A63EE40068AD4F /* VLCFullVideoViewWindow.m */; };
@@ -281,6 +282,8 @@
 		536283FF291147C500640C15 /* VLCBasicView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VLCBasicView.m; sourceTree = "<group>"; };
 		53628400291147C500640C15 /* VLCSubScrollView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VLCSubScrollView.m; sourceTree = "<group>"; };
 		53628401291147C500640C15 /* VLCSubScrollView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VLCSubScrollView.h; sourceTree = "<group>"; };
+		536BFD1729B181E100BD0776 /* VLCMainVideoViewOverlayView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = VLCMainVideoViewOverlayView.h; sourceTree = "<group>"; };
+		536BFD1829B181E100BD0776 /* VLCMainVideoViewOverlayView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VLCMainVideoViewOverlayView.m; sourceTree = "<group>"; };
 		536EFBF3295BCB8300F4CB13 /* VLCLibraryUIUnits.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = VLCLibraryUIUnits.h; sourceTree = "<group>"; };
 		536EFBF4295BCB8300F4CB13 /* VLCLibraryUIUnits.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VLCLibraryUIUnits.m; sourceTree = "<group>"; };
 		536EFC37295E521600F4CB13 /* VLCLibraryVideoViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = VLCLibraryVideoViewController.h; sourceTree = "<group>"; };
@@ -913,6 +916,8 @@
 			children = (
 				534E8E3829A06325009503F8 /* VLCMainVideoViewController.h */,
 				534E8E3929A06325009503F8 /* VLCMainVideoViewController.m */,
+				536BFD1729B181E100BD0776 /* VLCMainVideoViewOverlayView.h */,
+				536BFD1829B181E100BD0776 /* VLCMainVideoViewOverlayView.m */,
 				1CAC3EE720CD1B3B00613DB2 /* VLCVideoOutputProvider.h */,
 				1CAC3EE620CD1B3B00613DB2 /* VLCVideoOutputProvider.m */,
 				7D2E0EDC20CD206F0033A221 /* VLCVideoWindowCommon.h */,
@@ -1886,6 +1891,7 @@
 				7DE82E7922843781002D341A /* VLCLibraryAlbumTableCellView.m in Sources */,
 				7D67318622C8F4060000AD40 /* VLCMediaSourceCollectionViewItem.m in Sources */,
 				536283F0291146BC00640C15 /* VLCLibraryTableView.m in Sources */,
+				536BFD1929B181E100BD0776 /* VLCMainVideoViewOverlayView.m in Sources */,
 				536283F1291146BC00640C15 /* VLCLibraryAlbumTracksDataSource.m in Sources */,
 				5307A6F52967859F001E0C6A /* NSImage+VLCAdditions.m in Sources */,
 				1CCC89042078A3D500E5626F /* StreamOutput.xib in Sources */,


=====================================
modules/gui/macosx/Makefile.am
=====================================
@@ -343,6 +343,8 @@ libmacosx_plugin_la_SOURCES = \
 	gui/macosx/windows/video/VLCFullVideoViewWindow.m \
 	gui/macosx/windows/video/VLCMainVideoViewController.h \
 	gui/macosx/windows/video/VLCMainVideoViewController.m \
+	gui/macosx/windows/video/VLCMainVideoViewOverlayView.h \
+	gui/macosx/windows/video/VLCMainVideoViewOverlayView.m \
 	gui/macosx/windows/video/VLCVideoOutputProvider.h \
 	gui/macosx/windows/video/VLCVideoOutputProvider.m \
 	gui/macosx/windows/video/VLCVideoWindowCommon.h \


=====================================
modules/gui/macosx/UI/VLCMainVideoView.xib
=====================================
@@ -9,12 +9,18 @@
     <objects>
         <customObject id="-2" userLabel="File's Owner" customClass="VLCMainVideoViewController">
             <connections>
+                <outlet property="bottomBarView" destination="1GA-GG-Sdx" id="0UY-5o-eVD"/>
                 <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"/>
+                <outlet property="fakeTitleBarHeightConstraint" destination="wY4-If-nIp" id="wPt-X4-mgu"/>
                 <outlet property="mainControlsView" destination="D4V-Zd-qvB" id="KwM-ya-ETn"/>
+                <outlet property="overlayView" destination="FGS-tq-54S" id="RSC-7m-N0y"/>
                 <outlet property="playlistButton" destination="Drq-if-dw4" id="BZe-Cr-mzZ"/>
                 <outlet property="playlistButtonTopConstraint" destination="VyM-t4-y6F" id="V94-GS-KcS"/>
+                <outlet property="playlistButtonTrailingConstraint" destination="rWa-NJ-Aju" id="tzU-Iz-CXl"/>
                 <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"/>
                 <outlet property="view" destination="WRu-Ic-lQK" id="B9p-x5-Kd8"/>
                 <outlet property="voutView" destination="mAS-4a-RS8" id="GeX-XO-HYC"/>
@@ -25,7 +31,6 @@
         <customObject id="3" userLabel="Main Video View Controls Bar" customClass="VLCControlsBarCommon">
             <connections>
                 <outlet property="backwardButton" destination="V9d-hX-iyg" id="ZFn-jn-7OB"/>
-                <outlet property="bottomBarView" destination="1GA-GG-Sdx" id="hk1-nG-zqb"/>
                 <outlet property="forwardButton" destination="sF5-Z0-bef" id="H6w-Le-NAK"/>
                 <outlet property="fullscreenButton" destination="dYZ-ri-Kra" id="Cw2-BS-QG9"/>
                 <outlet property="fullscreenButtonWidthConstraint" destination="quS-fD-Od7" id="6hT-nR-yQI"/>
@@ -45,48 +50,26 @@
                 <customView translatesAutoresizingMaskIntoConstraints="NO" id="mAS-4a-RS8" customClass="VLCVoutView">
                     <rect key="frame" x="0.0" y="0.0" width="720" height="480"/>
                 </customView>
-                <box boxType="custom" borderType="none" title="Box" titlePosition="noTitle" translatesAutoresizingMaskIntoConstraints="NO" id="D4V-Zd-qvB">
+                <box appearanceType="darkAqua" boxType="custom" borderType="none" title="Box" titlePosition="noTitle" transparent="YES" translatesAutoresizingMaskIntoConstraints="NO" id="D4V-Zd-qvB">
                     <rect key="frame" x="0.0" y="0.0" width="720" height="480"/>
-                    <view key="contentView" id="1tI-8K-e3c">
+                    <view key="contentView" wantsLayer="YES" id="1tI-8K-e3c">
                         <rect key="frame" x="0.0" y="0.0" width="720" height="480"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <subviews>
-                            <button translatesAutoresizingMaskIntoConstraints="NO" id="UoQ-34-Pox">
-                                <rect key="frame" x="7" y="434" width="38" height="39"/>
+                            <visualEffectView blendingMode="withinWindow" material="titlebar" state="followsWindowActiveState" translatesAutoresizingMaskIntoConstraints="NO" id="jnw-gL-nrF">
+                                <rect key="frame" x="0.0" y="480" width="720" height="0.0"/>
                                 <constraints>
-                                    <constraint firstAttribute="width" secondItem="UoQ-34-Pox" secondAttribute="height" multiplier="1:1" id="Mvu-rV-2bc"/>
-                                    <constraint firstAttribute="width" constant="32" id="cjt-DQ-vMP"/>
+                                    <constraint firstAttribute="height" id="wY4-If-nIp"/>
                                 </constraints>
-                                <buttonCell key="cell" type="bevel" bezelStyle="regularSquare" imagePosition="overlaps" alignment="center" borderStyle="border" imageScaling="proportionallyUpOrDown" inset="2" id="CU4-UE-tsW">
-                                    <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                                    <font key="font" metaFont="system"/>
-                                    <imageReference key="image" image="arrow.backward" catalog="system" symbolScale="small"/>
-                                </buttonCell>
-                                <color key="bezelColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
-                                <connections>
-                                    <action selector="returnToLibrary:" target="-2" id="rnL-S1-zSR"/>
-                                </connections>
-                            </button>
-                            <button translatesAutoresizingMaskIntoConstraints="NO" id="Drq-if-dw4">
-                                <rect key="frame" x="675" y="434" width="38" height="39"/>
-                                <constraints>
-                                    <constraint firstAttribute="width" constant="32" id="9vC-fK-tZu"/>
-                                    <constraint firstAttribute="width" secondItem="Drq-if-dw4" secondAttribute="height" multiplier="1:1" id="cVK-cW-Opa"/>
-                                </constraints>
-                                <buttonCell key="cell" type="bevel" bezelStyle="regularSquare" image="music.note.list" catalog="system" imagePosition="overlaps" borderStyle="border" inset="2" id="VDP-ql-lW8">
-                                    <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES" changeBackground="YES" changeGray="YES"/>
-                                    <font key="font" metaFont="system"/>
-                                </buttonCell>
-                                <color key="bezelColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
-                                <connections>
-                                    <action selector="togglePlaylist:" target="-2" id="WrP-vg-etw"/>
-                                </connections>
-                            </button>
-                            <visualEffectView blendingMode="withinWindow" material="titlebar" state="followsWindowActiveState" translatesAutoresizingMaskIntoConstraints="NO" id="1GA-GG-Sdx" customClass="VLCBottomBarView">
-                                <rect key="frame" x="0.0" y="0.0" width="720" height="91"/>
+                            </visualEffectView>
+                            <customView translatesAutoresizingMaskIntoConstraints="NO" id="FGS-tq-54S" customClass="VLCMainVideoViewOverlayView">
+                                <rect key="frame" x="0.0" y="0.0" width="720" height="480"/>
+                            </customView>
+                            <customView translatesAutoresizingMaskIntoConstraints="NO" id="1GA-GG-Sdx">
+                                <rect key="frame" x="0.0" y="0.0" width="720" height="107"/>
                                 <subviews>
                                     <textField wantsLayer="YES" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="f4v-2z-dQ1" customClass="VLCTimeField">
-                                        <rect key="frame" x="623" y="10" width="79" height="14"/>
+                                        <rect key="frame" x="623" y="20" width="79" height="14"/>
                                         <constraints>
                                             <constraint firstAttribute="width" constant="75" id="8Zz-X6-yY1"/>
                                         </constraints>
@@ -97,15 +80,15 @@
                                         </textFieldCell>
                                     </textField>
                                     <textField wantsLayer="YES" verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="lEW-MN-FFU" customClass="VLCWrappableTextField">
-                                        <rect key="frame" x="18" y="49" width="503" height="32"/>
+                                        <rect key="frame" x="18" y="59" width="495" height="28"/>
                                         <textFieldCell key="cell" controlSize="small" lineBreakMode="truncatingTail" allowsUndo="NO" sendsActionOnEndEditing="YES" alignment="left" placeholderString="Nothing Playing" usesSingleLineMode="YES" id="8l0-zS-fOa">
-                                            <font key="font" textStyle="largeTitle" name=".SFNS-Regular"/>
+                                            <font key="font" metaFont="systemBold" size="24"/>
                                             <color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
                                             <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
                                         </textFieldCell>
                                     </textField>
                                     <slider verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="qNZ-Fh-W8i" customClass="VLCSlider">
-                                        <rect key="frame" x="18" y="27" width="684" height="19"/>
+                                        <rect key="frame" x="18" y="37" width="684" height="19"/>
                                         <constraints>
                                             <constraint firstAttribute="height" constant="15" id="xm6-li-LpC"/>
                                         </constraints>
@@ -115,19 +98,19 @@
                                         </connections>
                                     </slider>
                                     <stackView distribution="fill" orientation="horizontal" alignment="centerY" spacing="20" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="sJu-ZK-5QH">
-                                        <rect key="frame" x="539" y="49" width="161" height="32"/>
+                                        <rect key="frame" x="531" y="59" width="169" height="32"/>
                                         <subviews>
                                             <stackView distribution="fill" orientation="horizontal" alignment="centerY" spacing="5" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Y8F-hr-iaW">
-                                                <rect key="frame" x="0.0" y="4" width="109" height="24"/>
+                                                <rect key="frame" x="0.0" y="0.0" width="117" height="32"/>
                                                 <subviews>
-                                                    <button translatesAutoresizingMaskIntoConstraints="NO" id="tVB-Xs-sJJ" customClass="VLCImageButton">
-                                                        <rect key="frame" x="0.0" y="-3" width="24" height="30"/>
+                                                    <button wantsLayer="YES" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="tVB-Xs-sJJ" customClass="VLCImageButton">
+                                                        <rect key="frame" x="0.0" y="-1" width="32" height="33"/>
                                                         <constraints>
-                                                            <constraint firstAttribute="width" constant="24" id="PGL-rL-Qcp"/>
+                                                            <constraint firstAttribute="width" constant="32" id="PGL-rL-Qcp"/>
                                                             <constraint firstAttribute="width" secondItem="tVB-Xs-sJJ" secondAttribute="height" multiplier="1:1" id="qTO-ie-xwE"/>
                                                         </constraints>
-                                                        <buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" image="volume.3.fill" catalog="system" imagePosition="only" alignment="center" alternateImage="volume.fill" imageScaling="proportionallyUpOrDown" inset="2" id="skE-5H-zgX">
-                                                            <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
+                                                        <buttonCell key="cell" type="recessed" bezelStyle="recessed" image="volume.3.fill" catalog="system" imagePosition="only" alignment="center" controlSize="large" borderStyle="border" imageScaling="proportionallyUpOrDown" inset="2" id="skE-5H-zgX">
+                                                            <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES" changeBackground="YES" changeGray="YES"/>
                                                             <font key="font" metaFont="system"/>
                                                         </buttonCell>
                                                         <connections>
@@ -135,7 +118,7 @@
                                                         </connections>
                                                     </button>
                                                     <slider verticalHuggingPriority="750" horizontalCompressionResistancePriority="800" translatesAutoresizingMaskIntoConstraints="NO" id="lyY-Zo-4aH" customClass="VLCVolumeSlider">
-                                                        <rect key="frame" x="27" y="4" width="84" height="17"/>
+                                                        <rect key="frame" x="35" y="8" width="84" height="17"/>
                                                         <constraints>
                                                             <constraint firstAttribute="width" constant="80" id="SeC-cP-5Dr"/>
                                                         </constraints>
@@ -154,14 +137,14 @@
                                                     <real value="3.4028234663852886e+38"/>
                                                 </customSpacing>
                                             </stackView>
-                                            <button translatesAutoresizingMaskIntoConstraints="NO" id="dYZ-ri-Kra" customClass="VLCImageButton">
-                                                <rect key="frame" x="129" y="-3" width="32" height="38"/>
+                                            <button wantsLayer="YES" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="dYZ-ri-Kra" customClass="VLCImageButton">
+                                                <rect key="frame" x="137" y="-1" width="32" height="33"/>
                                                 <constraints>
                                                     <constraint firstAttribute="width" secondItem="dYZ-ri-Kra" secondAttribute="height" multiplier="1:1" id="cHQ-Fu-L8k"/>
                                                     <constraint firstAttribute="width" constant="32" id="quS-fD-Od7"/>
                                                 </constraints>
-                                                <buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" image="NSEnterFullScreenTemplate" imagePosition="only" alignment="center" imageScaling="proportionallyUpOrDown" inset="2" id="Z8g-js-0W6">
-                                                    <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
+                                                <buttonCell key="cell" type="recessed" bezelStyle="recessed" image="NSEnterFullScreenTemplate" imagePosition="only" alignment="center" controlSize="large" borderStyle="border" imageScaling="proportionallyUpOrDown" inset="2" id="Z8g-js-0W6">
+                                                    <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES" changeBackground="YES" changeGray="YES"/>
                                                     <font key="font" metaFont="system"/>
                                                 </buttonCell>
                                                 <connections>
@@ -179,7 +162,7 @@
                                         </customSpacing>
                                     </stackView>
                                     <textField wantsLayer="YES" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="3ri-8b-8mw" customClass="VLCTimeField">
-                                        <rect key="frame" x="18" y="10" width="79" height="14"/>
+                                        <rect key="frame" x="18" y="20" width="79" height="14"/>
                                         <constraints>
                                             <constraint firstAttribute="width" constant="75" id="S9v-aM-nfL"/>
                                         </constraints>
@@ -192,7 +175,7 @@
                                 </subviews>
                                 <constraints>
                                     <constraint firstItem="f4v-2z-dQ1" firstAttribute="trailing" secondItem="qNZ-Fh-W8i" secondAttribute="trailing" id="0DA-7x-5iR"/>
-                                    <constraint firstAttribute="bottom" secondItem="3ri-8b-8mw" secondAttribute="bottom" constant="10" id="2r5-04-JeD"/>
+                                    <constraint firstAttribute="bottom" secondItem="3ri-8b-8mw" secondAttribute="bottom" constant="20" id="2r5-04-JeD"/>
                                     <constraint firstItem="sJu-ZK-5QH" firstAttribute="trailing" secondItem="qNZ-Fh-W8i" secondAttribute="trailing" id="A0O-Nw-jLo"/>
                                     <constraint firstItem="f4v-2z-dQ1" firstAttribute="top" secondItem="qNZ-Fh-W8i" secondAttribute="bottom" constant="5" id="CT6-59-4xB"/>
                                     <constraint firstItem="lEW-MN-FFU" firstAttribute="trailing" secondItem="sJu-ZK-5QH" secondAttribute="leading" constant="-20" id="DXE-mO-c4m"/>
@@ -200,14 +183,17 @@
                                     <constraint firstItem="sJu-ZK-5QH" firstAttribute="top" relation="greaterThanOrEqual" secondItem="1GA-GG-Sdx" secondAttribute="top" constant="10" id="Vjf-YQ-NXR"/>
                                     <constraint firstItem="3ri-8b-8mw" firstAttribute="leading" secondItem="qNZ-Fh-W8i" secondAttribute="leading" id="WfQ-8B-O7I"/>
                                     <constraint firstAttribute="trailing" secondItem="qNZ-Fh-W8i" secondAttribute="trailing" constant="20" id="YDi-aH-oOI"/>
-                                    <constraint firstItem="lEW-MN-FFU" firstAttribute="top" secondItem="1GA-GG-Sdx" secondAttribute="top" constant="10" id="aCc-Gf-kqc"/>
+                                    <constraint firstItem="lEW-MN-FFU" firstAttribute="top" secondItem="1GA-GG-Sdx" secondAttribute="top" constant="20" id="aCc-Gf-kqc"/>
                                     <constraint firstItem="lEW-MN-FFU" firstAttribute="bottom" secondItem="qNZ-Fh-W8i" secondAttribute="top" constant="-5" id="dxq-b6-tct"/>
                                     <constraint firstItem="qNZ-Fh-W8i" firstAttribute="leading" secondItem="1GA-GG-Sdx" secondAttribute="leading" constant="20" id="gYg-Ig-cLg"/>
                                     <constraint firstItem="3ri-8b-8mw" firstAttribute="top" secondItem="qNZ-Fh-W8i" secondAttribute="bottom" constant="5" id="jze-EU-1TL"/>
                                     <constraint firstItem="sJu-ZK-5QH" firstAttribute="bottom" secondItem="qNZ-Fh-W8i" secondAttribute="top" constant="-5" id="xsM-6a-gdn"/>
                                 </constraints>
-                            </visualEffectView>
-                            <stackView distribution="fill" orientation="horizontal" alignment="centerY" spacing="20" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="CvV-yX-Nbh">
+                                <shadow key="shadow" blurRadius="2">
+                                    <color key="color" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                </shadow>
+                            </customView>
+                            <stackView wantsLayer="YES" distribution="fill" orientation="horizontal" alignment="centerY" spacing="20" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="CvV-yX-Nbh">
                                 <rect key="frame" x="260" y="208" width="200" height="64"/>
                                 <subviews>
                                     <button translatesAutoresizingMaskIntoConstraints="NO" id="V9d-hX-iyg" customClass="VLCImageButton">
@@ -216,11 +202,14 @@
                                             <constraint firstAttribute="width" constant="48" id="XBm-GM-29d"/>
                                             <constraint firstAttribute="width" secondItem="V9d-hX-iyg" secondAttribute="height" multiplier="1:1" id="mjk-wN-72b"/>
                                         </constraints>
+                                        <shadow key="shadow" blurRadius="20">
+                                            <color key="color" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                        </shadow>
                                         <buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" image="backward.fill" catalog="system" imagePosition="only" alignment="center" continuous="YES" imageScaling="proportionallyUpOrDown" inset="2" id="fFm-ZG-R1p">
                                             <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
                                             <font key="font" metaFont="system"/>
                                         </buttonCell>
-                                        <color key="contentTintColor" red="0.99999600649999998" green="1" blue="1" alpha="0.70445365650000002" colorSpace="custom" customColorSpace="sRGB"/>
+                                        <color key="contentTintColor" red="0.99999600649999998" green="1" blue="1" alpha="0.85338267140000001" colorSpace="custom" customColorSpace="sRGB"/>
                                         <connections>
                                             <action selector="bwd:" target="3" id="nDS-qm-Htv"/>
                                         </connections>
@@ -231,11 +220,14 @@
                                             <constraint firstAttribute="width" secondItem="PCC-8a-sVF" secondAttribute="height" multiplier="1:1" id="2jF-Y0-kn3"/>
                                             <constraint firstAttribute="width" constant="64" id="OHb-xJ-sqM"/>
                                         </constraints>
+                                        <shadow key="shadow" blurRadius="30">
+                                            <color key="color" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                        </shadow>
                                         <buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" image="play.fill" catalog="system" imagePosition="overlaps" alignment="center" alternateImage="VLCPauseTemplate" imageScaling="proportionallyUpOrDown" inset="2" id="Jk0-sw-EOp">
                                             <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
                                             <font key="font" metaFont="system"/>
                                         </buttonCell>
-                                        <color key="contentTintColor" red="0.99999600649999998" green="1" blue="1" alpha="0.70445365646258506" colorSpace="custom" customColorSpace="sRGB"/>
+                                        <color key="contentTintColor" red="0.99999600649999998" green="1" blue="1" alpha="0.85338267136324741" colorSpace="custom" customColorSpace="sRGB"/>
                                         <userDefinedRuntimeAttributes>
                                             <userDefinedRuntimeAttribute type="boolean" keyPath="toggle" value="YES"/>
                                         </userDefinedRuntimeAttributes>
@@ -249,11 +241,14 @@
                                             <constraint firstAttribute="width" constant="48" id="M5n-CD-fd3"/>
                                             <constraint firstAttribute="width" secondItem="sF5-Z0-bef" secondAttribute="height" multiplier="1:1" id="b5c-td-Idb"/>
                                         </constraints>
+                                        <shadow key="shadow" blurRadius="20">
+                                            <color key="color" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                        </shadow>
                                         <buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" image="forward.fill" catalog="system" imagePosition="only" alignment="center" continuous="YES" imageScaling="proportionallyUpOrDown" inset="2" id="I4n-VO-oYa">
                                             <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
                                             <font key="font" metaFont="system"/>
                                         </buttonCell>
-                                        <color key="contentTintColor" red="0.99999600649999998" green="1" blue="1" alpha="0.70445365650000002" colorSpace="custom" customColorSpace="sRGB"/>
+                                        <color key="contentTintColor" red="0.99999600649999998" green="1" blue="1" alpha="0.85338267140000001" colorSpace="custom" customColorSpace="sRGB"/>
                                         <connections>
                                             <action selector="fwd:" target="3" id="uPX-Xa-CwO"/>
                                         </connections>
@@ -270,20 +265,57 @@
                                     <real value="3.4028234663852886e+38"/>
                                 </customSpacing>
                             </stackView>
+                            <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="UoQ-34-Pox">
+                                <rect key="frame" x="20" y="431" width="22" height="29"/>
+                                <shadow key="shadow" blurRadius="2">
+                                    <color key="color" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                </shadow>
+                                <buttonCell key="cell" type="recessed" bezelStyle="recessed" imagePosition="only" controlSize="large" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="CU4-UE-tsW">
+                                    <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
+                                    <font key="font" metaFont="system"/>
+                                    <imageReference key="image" image="NSLeftFacingTriangleTemplate" symbolScale="large"/>
+                                </buttonCell>
+                                <color key="contentTintColor" red="0.99999600649999998" green="1" blue="1" alpha="0.85338267140000001" colorSpace="custom" customColorSpace="sRGB"/>
+                                <connections>
+                                    <action selector="returnToLibrary:" target="-2" id="rnL-S1-zSR"/>
+                                </connections>
+                            </button>
+                            <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Drq-if-dw4">
+                                <rect key="frame" x="669" y="431" width="31" height="29"/>
+                                <shadow key="shadow" blurRadius="2">
+                                    <color key="color" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                </shadow>
+                                <buttonCell key="cell" type="recessed" bezelStyle="recessed" imagePosition="only" controlSize="large" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="VDP-ql-lW8">
+                                    <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES" changeBackground="YES" changeGray="YES"/>
+                                    <font key="font" metaFont="system"/>
+                                    <imageReference key="image" image="NSListViewTemplate" symbolScale="large"/>
+                                </buttonCell>
+                                <color key="contentTintColor" red="0.99999600649999998" green="1" blue="1" alpha="0.85338267140000001" colorSpace="custom" customColorSpace="sRGB"/>
+                                <connections>
+                                    <action selector="togglePlaylist:" target="-2" id="WrP-vg-etw"/>
+                                </connections>
+                            </button>
                         </subviews>
                         <constraints>
-                            <constraint firstItem="UoQ-34-Pox" firstAttribute="top" secondItem="1tI-8K-e3c" secondAttribute="top" constant="10" id="0l2-eC-67c"/>
-                            <constraint firstItem="UoQ-34-Pox" firstAttribute="leading" secondItem="1tI-8K-e3c" secondAttribute="leading" constant="10" id="BkP-RA-uxn"/>
+                            <constraint firstItem="UoQ-34-Pox" firstAttribute="top" secondItem="1tI-8K-e3c" secondAttribute="top" constant="20" id="0l2-eC-67c"/>
+                            <constraint firstItem="UoQ-34-Pox" firstAttribute="leading" secondItem="1tI-8K-e3c" secondAttribute="leading" constant="20" id="BkP-RA-uxn"/>
+                            <constraint firstItem="FGS-tq-54S" firstAttribute="top" secondItem="jnw-gL-nrF" secondAttribute="bottom" id="Doc-Mq-oOI"/>
                             <constraint firstAttribute="bottom" secondItem="1GA-GG-Sdx" secondAttribute="bottom" id="KQN-vk-oha"/>
                             <constraint firstItem="1GA-GG-Sdx" firstAttribute="leading" secondItem="1tI-8K-e3c" secondAttribute="leading" id="Qn0-ts-S0d"/>
-                            <constraint firstItem="Drq-if-dw4" firstAttribute="top" secondItem="1tI-8K-e3c" secondAttribute="top" constant="10" id="VyM-t4-y6F"/>
+                            <constraint firstAttribute="trailing" secondItem="jnw-gL-nrF" secondAttribute="trailing" id="SDl-7h-q9o"/>
+                            <constraint firstItem="Drq-if-dw4" firstAttribute="top" secondItem="1tI-8K-e3c" secondAttribute="top" constant="20" id="VyM-t4-y6F"/>
                             <constraint firstItem="CvV-yX-Nbh" firstAttribute="centerX" secondItem="1tI-8K-e3c" secondAttribute="centerX" id="YMh-Zl-NSA"/>
+                            <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 firstAttribute="trailing" secondItem="Drq-if-dw4" secondAttribute="trailing" constant="10" id="rWa-NJ-Aju"/>
+                            <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"/>
+                            <constraint firstItem="jnw-gL-nrF" firstAttribute="top" secondItem="1tI-8K-e3c" secondAttribute="top" id="t6W-5p-Vgt"/>
+                            <constraint firstAttribute="trailing" secondItem="FGS-tq-54S" secondAttribute="trailing" id="t7T-OV-bf0"/>
                         </constraints>
                     </view>
-                    <color key="fillColor" red="0.0" green="0.0" blue="0.0" alpha="0.60225340136054417" colorSpace="custom" customColorSpace="sRGB"/>
+                    <color key="fillColor" red="0.0" green="0.0" blue="0.0" alpha="0.35060533940397354" colorSpace="custom" customColorSpace="sRGB"/>
                 </box>
             </subviews>
             <constraints>
@@ -301,13 +333,12 @@
     </objects>
     <resources>
         <image name="NSEnterFullScreenTemplate" width="20" height="18"/>
+        <image name="NSLeftFacingTriangleTemplate" width="12" height="16"/>
+        <image name="NSListViewTemplate" width="21" height="14"/>
         <image name="VLCPauseTemplate" width="128" height="128"/>
-        <image name="arrow.backward" catalog="system" width="12" height="10"/>
         <image name="backward.fill" catalog="system" width="20" height="12"/>
         <image name="forward.fill" catalog="system" width="20" height="12"/>
-        <image name="music.note.list" catalog="system" width="17" height="15"/>
         <image name="play.fill" catalog="system" width="12" height="13"/>
         <image name="volume.3.fill" catalog="system" width="22" height="15"/>
-        <image name="volume.fill" catalog="system" width="13" height="14"/>
     </resources>
 </document>


=====================================
modules/gui/macosx/library/VLCLibraryUIUnits.h
=====================================
@@ -61,6 +61,8 @@ NS_ASSUME_NONNULL_BEGIN
 + (const NSEdgeInsets)libraryViewScrollViewContentInsets;
 + (const NSEdgeInsets)libraryViewScrollViewScrollerInsets;
 
++ (const CGFloat)controlsFadeAnimationDuration;
+
 @end
 
 NS_ASSUME_NONNULL_END


=====================================
modules/gui/macosx/library/VLCLibraryUIUnits.m
=====================================
@@ -165,4 +165,9 @@
                             -contentInsets.right);
 }
 
++ (const CGFloat)controlsFadeAnimationDuration
+{
+    return 0.4f;
+}
+
 @end


=====================================
modules/gui/macosx/library/VLCLibraryWindow.m
=====================================
@@ -814,11 +814,6 @@ static void addShadow(NSImageView *__unsafe_unretained imageView)
     // And repurpose it to hide the video view
     [self.backwardsNavigationButton setEnabled:YES];
 
-    if (self.isInNativeFullscreen && [self hasActiveVideo] && [self fullscreen]) {
-        [self hideControlsBar];
-        [self.videoViewController showControls];
-    }
-
     [self enableVideoTitleBarMode];
     [self hideControlsBar];
     [self.videoViewController showControls];
@@ -844,10 +839,6 @@ static void addShadow(NSImageView *__unsafe_unretained imageView)
 
     [self setViewForSelectedSegment];
 
-    if (self.isInNativeFullscreen) {
-        [self showControlsBar];
-    }
-
     [self disableVideoTitleBarMode];
     [self showControlsBar];
 }


=====================================
modules/gui/macosx/windows/mainwindow/VLCControlsBarCommon.m
=====================================
@@ -403,7 +403,7 @@
 - (void)updateMuteVolumeButtonImage
 {
     _muteVolumeButton.image = _playerController.mute ?
-        imageFromRes(@"volume-low") : imageFromRes(@"volume-high");
+        imageFromRes(@"VLCVolumeOffTemplate") : imageFromRes(@"VLCVolumeOnTemplate");
 }
 
 - (void)playerStateUpdated:(NSNotification *)aNotification


=====================================
modules/gui/macosx/windows/video/VLCFullVideoViewWindow.m
=====================================
@@ -24,6 +24,8 @@
 
 #import "VLCMainVideoViewController.h"
 
+#import "library/VLCLibraryUIUnits.h"
+
 #import "main/VLCMain.h"
 
 #import "playlist/VLCPlaylistController.h"
@@ -33,6 +35,7 @@
 {
     BOOL _autohideTitlebar;
     NSTimer *_hideTitlebarTimer;
+    BOOL _isFadingIn;
 }
 @end
 
@@ -50,6 +53,8 @@
                              object:nil];
 
     self.titleVisibility = NSWindowTitleHidden;
+    self.ignoresMouseEvents = NO;
+    self.acceptsMouseMovedEvents = YES;
 }
 
 - (void)stopTitlebarAutohideTimer
@@ -78,16 +83,21 @@
 {
     [self stopTitlebarAutohideTimer];
 
-    NSView *titlebarView =  [self standardWindowButton:NSWindowCloseButton].superview;
-    if (!titlebarView.hidden && !_autohideTitlebar) {
+    NSView *titlebarView = [self standardWindowButton:NSWindowCloseButton].superview;
+
+    if (!_autohideTitlebar) {
+        titlebarView.alphaValue = 1.0f;
         return;
     }
 
-    titlebarView.hidden = NO;
-
-    if (_autohideTitlebar) {
+    [NSAnimationContext runAnimationGroup:^(NSAnimationContext * _Nonnull context) {
+        self->_isFadingIn = YES;
+        [context setDuration:[VLCLibraryUIUnits controlsFadeAnimationDuration]];
+        [titlebarView.animator setAlphaValue:1.0f];
+    } completionHandler:^{
+        self->_isFadingIn = NO;
         [self startTitlebarAutohideTimer];
-    }
+    }];
 }
 
 - (void)hideTitleBar:(id)sender
@@ -95,12 +105,20 @@
     [self stopTitlebarAutohideTimer];
 
     if (self.videoViewController.mouseOnControls ||
-        VLCMain.sharedInstance.playlistController.playerController.playerState == VLC_PLAYER_STATE_PAUSED) {
+        !_autohideTitlebar ||
+        self.isInNativeFullscreen ||
+        self.videoViewController.view.hidden) {
+
         [self showTitleBar];
         return;
     }
 
-    [self standardWindowButton:NSWindowCloseButton].superview.hidden = YES;
+    NSView *titlebarView = [self standardWindowButton:NSWindowCloseButton].superview;
+
+    [NSAnimationContext runAnimationGroup:^(NSAnimationContext * _Nonnull context) {
+        [context setDuration:[VLCLibraryUIUnits controlsFadeAnimationDuration]];
+        [titlebarView.animator setAlphaValue:0.0f];
+    } completionHandler:nil];
 }
 
 - (void)enableVideoTitleBarMode
@@ -128,4 +146,21 @@
     [self showTitleBar];
 }
 
+- (void)mouseMoved:(NSEvent *)event
+{
+    [super mouseExited:event];
+
+    NSPoint mouseLocation = [event locationInWindow];
+
+    BOOL mouseOutsideWindow = ![self.contentView mouse:mouseLocation inRect:self.contentView.frame];
+
+    if (_autohideTitlebar && mouseOutsideWindow) {
+        [self hideTitleBar:self];
+    }
+
+    if (self.videoViewController.autohideControls && mouseOutsideWindow) {
+        [self.videoViewController hideControls];
+    }
+}
+
 @end


=====================================
modules/gui/macosx/windows/video/VLCMainVideoViewController.h
=====================================
@@ -25,24 +25,33 @@
 #import <windows/mainwindow/VLCControlsBarCommon.h>
 #import <windows/video/VLCVoutView.h>
 
+ at class VLCMainVideoViewOverlayView;
+
 NS_ASSUME_NONNULL_BEGIN
 
 @interface VLCMainVideoViewController : NSViewController
 
 @property (readwrite, strong) IBOutlet VLCVoutView *voutView;
 @property (readwrite, strong) IBOutlet NSBox *mainControlsView;
+ at property (readwrite, strong) IBOutlet VLCMainVideoViewOverlayView *overlayView;
+ at property (readwrite, strong) IBOutlet NSView *bottomBarView;
 @property (readwrite, strong) IBOutlet NSStackView *centralControlsStackView;
 @property (readwrite, strong) IBOutlet VLCControlsBarCommon *controlsBar;
 @property (readwrite, strong) IBOutlet NSButton *returnButton;
 @property (readwrite, strong) IBOutlet NSButton *playlistButton;
 @property (readwrite, strong) IBOutlet NSLayoutConstraint *returnButtonTopConstraint;
+ at property (readwrite, strong) IBOutlet NSLayoutConstraint *returnButtonLeadingConstraint;
 @property (readwrite, strong) IBOutlet NSLayoutConstraint *playlistButtonTopConstraint;
+ at property (readwrite, strong) IBOutlet NSLayoutConstraint *playlistButtonTrailingConstraint;
+ at property (readwrite, strong) IBOutlet NSVisualEffectView *fakeTitleBar;
+ at property (readwrite, strong) IBOutlet NSLayoutConstraint *fakeTitleBarHeightConstraint;
 
 @property (readwrite, nonatomic) BOOL autohideControls;
 @property (readwrite, nonatomic) BOOL displayLibraryControls;
 @property (readonly) BOOL mouseOnControls;
 
 - (void)showControls;
+- (void)hideControls;
 
 - (IBAction)togglePlaylist:(id)sender;
 - (IBAction)returnToLibrary:(id)sender;


=====================================
modules/gui/macosx/windows/video/VLCMainVideoViewController.m
=====================================
@@ -32,6 +32,7 @@
 
 #import "views/VLCBottomBarView.h"
 
+#import "windows/video/VLCMainVideoViewOverlayView.h"
 #import "windows/video/VLCVideoWindowCommon.h"
 
 #import <vlc_common.h>
@@ -39,6 +40,10 @@
 @interface VLCMainVideoViewController()
 {
     NSTimer *_hideControlsTimer;
+    NSLayoutConstraint *_returnButtonBottomConstraint;
+    NSLayoutConstraint *_playlistButtonBottomConstraint;
+
+    BOOL _isFadingIn;
 }
 @end
 
@@ -57,13 +62,31 @@
 
     [self setDisplayLibraryControls:NO];
     [self updatePlaylistToggleState];
-    [self updateLibraryControlsTopConstraint];
+    [self updateLibraryControls];
 
     NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter];
     [notificationCenter addObserver:self
                            selector:@selector(shouldShowControls:)
                                name:VLCVideoWindowShouldShowFullscreenController
                              object:nil];
+
+    _returnButtonBottomConstraint = [NSLayoutConstraint constraintWithItem:_returnButton
+                                                                 attribute:NSLayoutAttributeBottom
+                                                                 relatedBy:NSLayoutRelationEqual
+                                                                    toItem:_fakeTitleBar
+                                                                 attribute:NSLayoutAttributeBottom
+                                                                multiplier:1.
+                                                                  constant:0];
+    _playlistButtonBottomConstraint = [NSLayoutConstraint constraintWithItem:_playlistButton
+                                                                   attribute:NSLayoutAttributeBottom
+                                                                   relatedBy:NSLayoutRelationEqual
+                                                                      toItem:_fakeTitleBar
+                                                                   attribute:NSLayoutAttributeBottom
+                                                                  multiplier:1.
+                                                                    constant:0];
+
+    _returnButtonBottomConstraint.active = NO;
+    _playlistButtonBottomConstraint.active = NO;
 }
 
 - (BOOL)mouseOnControls
@@ -93,24 +116,31 @@
 
     _hideControlsTimer = [NSTimer scheduledTimerWithTimeInterval:timeToKeepVisibleInSec
                                                           target:self
-                                                        selector:@selector(hideControls:)
+                                                        selector:@selector(shouldHideControls:)
                                                         userInfo:nil
                                                          repeats:NO];
 }
 
-- (void)hideControls:(id)sender
+- (void)shouldHideControls:(id)sender
+{
+    [self hideControls];
+}
+
+- (void)hideControls
 {
     [self stopAutohideTimer];
 
     NSPoint mousePos = [self.view.window mouseLocationOutsideOfEventStream];
 
-    if ([self mouseOnControls] ||
-        VLCMain.sharedInstance.playlistController.playerController.playerState == VLC_PLAYER_STATE_PAUSED) {
+    if ([self mouseOnControls]) {
         [self showControls];
         return;
     }
 
-    _mainControlsView.hidden = YES;
+    [NSAnimationContext runAnimationGroup:^(NSAnimationContext * _Nonnull context) {
+        [context setDuration:[VLCLibraryUIUnits controlsFadeAnimationDuration]];
+        [self->_mainControlsView.animator setAlphaValue:0.0f];
+    } completionHandler:nil];
 }
 
 - (void)setAutohideControls:(BOOL)autohide
@@ -137,17 +167,21 @@
 {
     [self stopAutohideTimer];
     [self updatePlaylistToggleState];
-    [self updateLibraryControlsTopConstraint];
+    [self updateLibraryControls];
 
-    if (!_mainControlsView.hidden && !_autohideControls) {
+    if (!_autohideControls) {
+        _mainControlsView.alphaValue = 1.0f;
         return;
     }
 
-    _mainControlsView.hidden = NO;
-
-    if (_autohideControls) {
+    [NSAnimationContext runAnimationGroup:^(NSAnimationContext * _Nonnull context) {
+        self->_isFadingIn = YES;
+        [context setDuration:[VLCLibraryUIUnits controlsFadeAnimationDuration]];
+        [self->_mainControlsView.animator setAlphaValue:1.0f];
+    } completionHandler:^{
+        self->_isFadingIn = NO;
         [self startAutohideTimer];
-    }
+    }];
 }
 
 - (void)setDisplayLibraryControls:(BOOL)displayLibraryControls
@@ -167,7 +201,30 @@
     }
 }
 
-- (void)updateLibraryControlsTopConstraint
+- (NSRect)windowButtonsRect
+{
+    NSWindow * const window = self.view.window;
+    NSRect buttonBox = NSZeroRect;
+
+    NSButton * const closeButton = [window standardWindowButton:NSWindowCloseButton];
+    if (closeButton) {
+        buttonBox = NSUnionRect(buttonBox, closeButton.frame);
+    }
+
+    NSButton * const minimizeButton = [window standardWindowButton:NSWindowMiniaturizeButton];
+    if (minimizeButton) {
+        buttonBox = NSUnionRect(buttonBox, minimizeButton.frame);
+    }
+
+    NSButton * const zoomButton = [window standardWindowButton:NSWindowZoomButton];
+    if (zoomButton) {
+        buttonBox = NSUnionRect(buttonBox, zoomButton.frame);
+    }
+
+    return buttonBox;
+}
+
+- (void)updateLibraryControls
 {
     if (!_displayLibraryControls) {
         return;
@@ -177,20 +234,56 @@
     const NSView * const titlebarView = [viewWindow standardWindowButton:NSWindowCloseButton].superview;
     const CGFloat windowTitlebarHeight = titlebarView.frame.size.height;
 
-    const BOOL windowFullscreen = [(VLCWindow*)viewWindow isInNativeFullscreen] || [(VLCWindow*)viewWindow fullscreen];
-    const CGFloat spaceToTitlebar = viewWindow.titlebarAppearsTransparent ? [VLCLibraryUIUnits smallSpacing] : [VLCLibraryUIUnits mediumSpacing];
-    const CGFloat topSpaceWithTitlebar = windowTitlebarHeight + spaceToTitlebar;
+    const BOOL windowFullscreen = [(VLCWindow*)viewWindow isInNativeFullscreen] ||
+                                  [(VLCWindow*)viewWindow fullscreen];
+    const BOOL placeInFakeToolbar = viewWindow.titlebarAppearsTransparent &&
+                                    !windowFullscreen;
+
+    const CGFloat buttonTopSpace = placeInFakeToolbar ? 0 : [VLCLibraryUIUnits largeSpacing];
+
+    _fakeTitleBarHeightConstraint.constant = windowFullscreen ? 0 : windowTitlebarHeight;
+
+    _returnButtonTopConstraint.constant = buttonTopSpace;
+    _playlistButtonTopConstraint.constant = buttonTopSpace;
+    _returnButtonBottomConstraint.active = placeInFakeToolbar;
+    _playlistButtonBottomConstraint.active = placeInFakeToolbar;
+
+    NSControlSize buttonSize = NSControlSizeRegular;
+
+    if (@available(macOS 11.0, *)) {
+        if (!placeInFakeToolbar) {
+            buttonSize = NSControlSizeLarge;
+        } else if (viewWindow.toolbarStyle != NSWindowToolbarStyleUnified) {
+            buttonSize = NSControlSizeMini;
+        }
+    } else if (placeInFakeToolbar) {
+        buttonSize = NSControlSizeMini;
+    }
+
+    NSControlSize previousButtonSize = _playlistButton.controlSize;
+    _returnButton.controlSize = buttonSize;
+    _playlistButton.controlSize = buttonSize;
+
+    // HACK: Upon changing the control size the actual highlight of toggled/hovered buttons doesn't change
+    // properly, at least for recessed buttons. This is most obvious on the toggleable playlist button.
+    // So reset the state and then retoggle once done.
+    if (previousButtonSize != buttonSize) {
+        NSControlStateValue returnButtonControlState = _returnButton.state;
+        NSControlStateValue playlistButtonControlState = _playlistButton.state;
+        _returnButton.state = NSControlStateValueOff;
+        _playlistButton.state = NSControlStateValueOff;
+        _returnButton.state = returnButtonControlState;
+        _playlistButton.state = playlistButtonControlState;
+    }
+
+    const CGFloat realButtonSpace = (windowTitlebarHeight - _playlistButton.cell.cellSize.height) / 2;
+    const NSRect windowButtonBox = [self windowButtonsRect];
 
-    // Since the close/maximise/minimise buttons go on the left, we want to make sure the return
-    // button does not overlap. But for the playlist button, as long as the toolbar and titlebar
-    // appears fully transparent, it looks nicer to leave it at the top
-    const CGFloat returnButtonTopSpace = titlebarView.hidden || windowFullscreen ?
-        [VLCLibraryUIUnits mediumSpacing] : topSpaceWithTitlebar;
-    const CGFloat playlistButtonTopSpace = viewWindow.toolbar.visible && viewWindow.titlebarAppearsTransparent && !windowFullscreen ?
-        topSpaceWithTitlebar : [VLCLibraryUIUnits mediumSpacing];
+    _returnButtonLeadingConstraint.constant = placeInFakeToolbar ? windowButtonBox.size.width + [VLCLibraryUIUnits mediumSpacing] + realButtonSpace : [VLCLibraryUIUnits largeSpacing];
+    _playlistButtonTrailingConstraint.constant = placeInFakeToolbar ? realButtonSpace: [VLCLibraryUIUnits largeSpacing];
 
-    _returnButtonTopConstraint.constant = returnButtonTopSpace;
-    _playlistButtonTopConstraint.constant = playlistButtonTopSpace;
+    _overlayView.drawGradientForTopControls = !placeInFakeToolbar;
+    [_overlayView drawRect:_overlayView.frame];
 }
 
 - (IBAction)togglePlaylist:(id)sender


=====================================
modules/gui/macosx/windows/video/VLCMainVideoViewOverlayView.h
=====================================
@@ -0,0 +1,35 @@
+/*****************************************************************************
+ * VLCMainVideoViewOverlayView.h: MacOS X interface module
+ *****************************************************************************
+ * Copyright (C) 2023 VLC authors and VideoLAN
+ *
+ * Authors: Claudio Cambra <developer at claudiocambra.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ *****************************************************************************/
+
+#import <Cocoa/Cocoa.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+/* Adds darkening gradients in the VLCMainVideoView to make controls more visible.
+ * NOTE: Needs to occupy the entirety, and exactly, the area of the VLCMainVideoView */
+ at interface VLCMainVideoViewOverlayView : NSView
+
+ at property (readwrite, assign) BOOL drawGradientForTopControls;
+
+ at end
+
+NS_ASSUME_NONNULL_END


=====================================
modules/gui/macosx/windows/video/VLCMainVideoViewOverlayView.m
=====================================
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ * VLCMainVideoViewOverlayView.m: MacOS X interface module
+ *****************************************************************************
+ * Copyright (C) 2023 VLC authors and VideoLAN
+ *
+ * Authors: Claudio Cambra <developer at claudiocambra.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ *****************************************************************************/
+
+#import "VLCMainVideoViewOverlayView.h"
+
+ at implementation VLCMainVideoViewOverlayView
+
+- (void)drawRect:(NSRect)dirtyRect {
+    [super drawRect:dirtyRect];
+
+    // Drawing code here.
+    NSColor *_darkestGradientColor = [NSColor colorWithWhite:0 alpha:0.4];
+
+    NSGradient *gradient;
+
+    if (_drawGradientForTopControls) {
+        gradient = [[NSGradient alloc] initWithColorsAndLocations:_darkestGradientColor, 0.,
+                    [NSColor clearColor], 0.5,
+                    _darkestGradientColor, 1.,
+                    nil];
+    } else {
+        gradient = [[NSGradient alloc] initWithColorsAndLocations:_darkestGradientColor, 0,
+                    [NSColor clearColor], 1.,
+                    nil];
+    }
+
+    // Draws bottom-up
+    [gradient drawInRect:self.frame angle:90];
+}
+
+ at end



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/bc1e6cefba3afb2b14f78be478c61b855f20b81c...5fd7deb1ed80c53395531642a5d04a22141f7572

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/bc1e6cefba3afb2b14f78be478c61b855f20b81c...5fd7deb1ed80c53395531642a5d04a22141f7572
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