[vlc-commits] macosx/detached audio window: add close button and animations

Felix Paul Kühne git at videolan.org
Sun Nov 3 19:32:46 CET 2019


vlc | branch: master | Felix Paul Kühne <felix at feepk.net> | Sun Nov  3 19:13:43 2019 +0100| [62c62bac312e3c1606325f683a90b1589e7ead8b] | committer: Felix Paul Kühne

macosx/detached audio window: add close button and animations

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=62c62bac312e3c1606325f683a90b1589e7ead8b
---

 .../package/macosx/VLC.xcodeproj/project.pbxproj   |  32 ++++
 modules/gui/macosx/UI/VLCDetachedAudioWindow.xib   | 198 ++++++++++++---------
 .../gui/macosx/windows/VLCDetachedAudioWindow.h    |   1 +
 .../gui/macosx/windows/VLCDetachedAudioWindow.m    |  15 +-
 4 files changed, 157 insertions(+), 89 deletions(-)

diff --git a/extras/package/macosx/VLC.xcodeproj/project.pbxproj b/extras/package/macosx/VLC.xcodeproj/project.pbxproj
index c6a4fde941..76c85cb66d 100644
--- a/extras/package/macosx/VLC.xcodeproj/project.pbxproj
+++ b/extras/package/macosx/VLC.xcodeproj/project.pbxproj
@@ -500,6 +500,18 @@
 		7D5678EF1D5BA397002698F3 /* VLCMainWindowControlsBar.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VLCMainWindowControlsBar.m; sourceTree = "<group>"; };
 		7D61DCE2236C1937008133CF /* VLCCustomWindowButton.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = VLCCustomWindowButton.h; sourceTree = "<group>"; };
 		7D61DCE3236C1937008133CF /* VLCCustomWindowButton.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VLCCustomWindowButton.m; sourceTree = "<group>"; };
+		7D61DCE7236C6A3D008133CF /* window-close.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "window-close.png"; path = "Button-Icons/window-close.png"; sourceTree = "<group>"; };
+		7D61DCE8236C6A3D008133CF /* window-close-on-graphite at 2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "window-close-on-graphite at 2x.png"; path = "Button-Icons/window-close-on-graphite at 2x.png"; sourceTree = "<group>"; };
+		7D61DCE9236C6A3D008133CF /* window-close-over-graphite.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "window-close-over-graphite.png"; path = "Button-Icons/window-close-over-graphite.png"; sourceTree = "<group>"; };
+		7D61DCEA236C6A3D008133CF /* window-close-over at 2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "window-close-over at 2x.png"; path = "Button-Icons/window-close-over at 2x.png"; sourceTree = "<group>"; };
+		7D61DCEB236C6A3D008133CF /* window-close-on-graphite.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "window-close-on-graphite.png"; path = "Button-Icons/window-close-on-graphite.png"; sourceTree = "<group>"; };
+		7D61DCEC236C6A3D008133CF /* window-close-on at 2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "window-close-on at 2x.png"; path = "Button-Icons/window-close-on at 2x.png"; sourceTree = "<group>"; };
+		7D61DCED236C6A3D008133CF /* window-close-graphite at 2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "window-close-graphite at 2x.png"; path = "Button-Icons/window-close-graphite at 2x.png"; sourceTree = "<group>"; };
+		7D61DCEE236C6A3D008133CF /* window-close-on.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "window-close-on.png"; path = "Button-Icons/window-close-on.png"; sourceTree = "<group>"; };
+		7D61DCEF236C6A3D008133CF /* window-close-over-graphite at 2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "window-close-over-graphite at 2x.png"; path = "Button-Icons/window-close-over-graphite at 2x.png"; sourceTree = "<group>"; };
+		7D61DCF0236C6A3D008133CF /* window-close-over.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "window-close-over.png"; path = "Button-Icons/window-close-over.png"; sourceTree = "<group>"; };
+		7D61DCF1236C6A3D008133CF /* window-close at 2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "window-close at 2x.png"; path = "Button-Icons/window-close at 2x.png"; sourceTree = "<group>"; };
+		7D61DCF2236C6A3D008133CF /* window-close-graphite.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "window-close-graphite.png"; path = "Button-Icons/window-close-graphite.png"; sourceTree = "<group>"; };
 		7D66D4342200BC340040D04A /* VLCClickerManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = VLCClickerManager.h; sourceTree = "<group>"; };
 		7D66D4352200BC340040D04A /* VLCClickerManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VLCClickerManager.m; sourceTree = "<group>"; };
 		7D66D4372200C5B80040D04A /* VLCVideoFilterHelper.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = VLCVideoFilterHelper.h; sourceTree = "<group>"; };
@@ -1378,6 +1390,25 @@
 			name = "Library Window";
 			sourceTree = "<group>";
 		};
+		7D61DCE6236C6A26008133CF /* Window Button Images */ = {
+			isa = PBXGroup;
+			children = (
+				7D61DCF2236C6A3D008133CF /* window-close-graphite.png */,
+				7D61DCED236C6A3D008133CF /* window-close-graphite at 2x.png */,
+				7D61DCEB236C6A3D008133CF /* window-close-on-graphite.png */,
+				7D61DCE8236C6A3D008133CF /* window-close-on-graphite at 2x.png */,
+				7D61DCEE236C6A3D008133CF /* window-close-on.png */,
+				7D61DCEC236C6A3D008133CF /* window-close-on at 2x.png */,
+				7D61DCE9236C6A3D008133CF /* window-close-over-graphite.png */,
+				7D61DCEF236C6A3D008133CF /* window-close-over-graphite at 2x.png */,
+				7D61DCF0236C6A3D008133CF /* window-close-over.png */,
+				7D61DCEA236C6A3D008133CF /* window-close-over at 2x.png */,
+				7D61DCE7236C6A3D008133CF /* window-close.png */,
+				7D61DCF1236C6A3D008133CF /* window-close at 2x.png */,
+			);
+			name = "Window Button Images";
+			sourceTree = "<group>";
+		};
 		7D903EB4224393C700917358 /* core dependencies */ = {
 			isa = PBXGroup;
 			children = (
@@ -1462,6 +1493,7 @@
 		CC0430EE13B2461A00D7D52E /* UI Graphics */ = {
 			isa = PBXGroup;
 			children = (
+				7D61DCE6236C6A26008133CF /* Window Button Images */,
 				7D28E63C2275C80E0098D30E /* Library Window */,
 				6B82255A1E4D2BE400833BE1 /* Main Window */,
 				6B8229CB1E4D2D2C00833BE1 /* Sidebar Icons */,
diff --git a/modules/gui/macosx/UI/VLCDetachedAudioWindow.xib b/modules/gui/macosx/UI/VLCDetachedAudioWindow.xib
index 33bc611e3d..b0e989f5b0 100644
--- a/modules/gui/macosx/UI/VLCDetachedAudioWindow.xib
+++ b/modules/gui/macosx/UI/VLCDetachedAudioWindow.xib
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="15400" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="15505" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
     <dependencies>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="15400"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="15505"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <objects>
@@ -12,8 +12,8 @@
         </customObject>
         <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
         <customObject id="-3" userLabel="Application" customClass="NSObject"/>
-        <window title="VLC media player" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" restorable="NO" releasedWhenClosed="NO" visibleAtLaunch="NO" frameAutosaveName="detachedaudiowindow" animationBehavior="default" id="2" userLabel="Detached Audio Window" customClass="VLCDetachedAudioWindow">
-            <windowStyleMask key="styleMask" closable="YES" resizable="YES" fullSizeContentView="YES"/>
+        <window title="VLC media player" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" restorable="NO" releasedWhenClosed="NO" visibleAtLaunch="NO" frameAutosaveName="detachedaudiowindow" animationBehavior="default" titleVisibility="hidden" id="2" userLabel="Detached Audio Window" customClass="VLCDetachedAudioWindow">
+            <windowStyleMask key="styleMask" resizable="YES" fullSizeContentView="YES"/>
             <windowPositionMask key="initialPositionMask" leftStrut="YES" topStrut="YES"/>
             <rect key="contentRect" x="91" y="467" width="239" height="239"/>
             <rect key="screenRect" x="0.0" y="0.0" width="1920" height="1177"/>
@@ -28,107 +28,130 @@
                             <constraint firstAttribute="width" secondItem="63" secondAttribute="height" multiplier="1:1" id="RxG-T1-BEQ"/>
                         </constraints>
                     </customView>
-                    <customView translatesAutoresizingMaskIntoConstraints="NO" id="5" customClass="VLCBottomBarView">
-                        <rect key="frame" x="0.0" y="0.0" width="239" height="65"/>
+                    <customView hidden="YES" translatesAutoresizingMaskIntoConstraints="NO" id="s7h-2z-AKB">
+                        <rect key="frame" x="0.0" y="0.0" width="239" height="233"/>
                         <subviews>
-                            <customView translatesAutoresizingMaskIntoConstraints="NO" id="65" customClass="VLCDragDropView">
+                            <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="F6N-G1-ay4" customClass="VLCCustomWindowCloseButton">
+                                <rect key="frame" x="8" y="217" width="14" height="16"/>
+                                <constraints>
+                                    <constraint firstAttribute="height" constant="16" id="h5F-zc-xQI"/>
+                                    <constraint firstAttribute="width" constant="14" id="u5l-1z-YIF"/>
+                                </constraints>
+                                <buttonCell key="cell" type="bevel" bezelStyle="rounded" image="window-close" imagePosition="only" alignment="center" imageScaling="proportionallyDown" inset="2" id="WwK-DC-6gz" customClass="VLCWindowButtonCell">
+                                    <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
+                                    <font key="font" metaFont="system"/>
+                                </buttonCell>
+                            </button>
+                            <customView translatesAutoresizingMaskIntoConstraints="NO" id="5" customClass="VLCBottomBarView">
                                 <rect key="frame" x="0.0" y="0.0" width="239" height="65"/>
                                 <subviews>
-                                    <customView translatesAutoresizingMaskIntoConstraints="NO" id="Vae-cT-EEI" userLabel="Play controls group">
-                                        <rect key="frame" x="77" y="10" width="85" height="23"/>
+                                    <customView translatesAutoresizingMaskIntoConstraints="NO" id="65" customClass="VLCDragDropView">
+                                        <rect key="frame" x="0.0" y="0.0" width="239" height="65"/>
                                         <subviews>
-                                            <button translatesAutoresizingMaskIntoConstraints="NO" id="11">
-                                                <rect key="frame" x="0.0" y="0.0" width="29" height="23"/>
-                                                <buttonCell key="cell" type="bevel" bezelStyle="regularSquare" image="backward-3btns" imagePosition="only" alignment="center" alternateImage="backward-3btns-pressed" continuous="YES" enabled="NO" id="14">
-                                                    <behavior key="behavior" lightByContents="YES"/>
-                                                    <font key="font" metaFont="label"/>
-                                                </buttonCell>
+                                            <customView translatesAutoresizingMaskIntoConstraints="NO" id="Vae-cT-EEI" userLabel="Play controls group">
+                                                <rect key="frame" x="77" y="10" width="85" height="23"/>
+                                                <subviews>
+                                                    <button translatesAutoresizingMaskIntoConstraints="NO" id="11">
+                                                        <rect key="frame" x="0.0" y="0.0" width="29" height="23"/>
+                                                        <buttonCell key="cell" type="bevel" bezelStyle="regularSquare" image="backward-3btns" imagePosition="only" alignment="center" alternateImage="backward-3btns-pressed" continuous="YES" enabled="NO" id="14">
+                                                            <behavior key="behavior" lightByContents="YES"/>
+                                                            <font key="font" metaFont="label"/>
+                                                        </buttonCell>
+                                                        <connections>
+                                                            <action selector="bwd:" target="3" id="56"/>
+                                                        </connections>
+                                                    </button>
+                                                    <button translatesAutoresizingMaskIntoConstraints="NO" id="10">
+                                                        <rect key="frame" x="29" y="0.0" width="27" height="23"/>
+                                                        <buttonCell key="cell" type="bevel" bezelStyle="regularSquare" image="play" imagePosition="only" alignment="center" alternateImage="play-pressed" id="15">
+                                                            <behavior key="behavior" lightByContents="YES"/>
+                                                            <font key="font" metaFont="titleBar" size="12"/>
+                                                        </buttonCell>
+                                                        <connections>
+                                                            <action selector="play:" target="3" id="39"/>
+                                                        </connections>
+                                                    </button>
+                                                    <button translatesAutoresizingMaskIntoConstraints="NO" id="12">
+                                                        <rect key="frame" x="56" y="0.0" width="29" height="23"/>
+                                                        <buttonCell key="cell" type="bevel" bezelStyle="regularSquare" image="forward-3btns" imagePosition="only" alignment="center" alternateImage="forward-3btns-pressed" continuous="YES" enabled="NO" id="13">
+                                                            <behavior key="behavior" lightByContents="YES"/>
+                                                            <font key="font" metaFont="label"/>
+                                                        </buttonCell>
+                                                        <connections>
+                                                            <action selector="fwd:" target="3" id="51"/>
+                                                        </connections>
+                                                    </button>
+                                                </subviews>
+                                                <constraints>
+                                                    <constraint firstItem="11" firstAttribute="top" secondItem="Vae-cT-EEI" secondAttribute="top" id="11i-jS-o5W"/>
+                                                    <constraint firstItem="10" firstAttribute="left" secondItem="11" secondAttribute="right" id="496-Ip-nTd"/>
+                                                    <constraint firstItem="10" firstAttribute="top" secondItem="Vae-cT-EEI" secondAttribute="top" id="9Kr-xx-Ssf"/>
+                                                    <constraint firstAttribute="right" secondItem="12" secondAttribute="right" id="KOc-oW-4iH"/>
+                                                    <constraint firstAttribute="height" constant="23" id="bN7-k9-7Iy"/>
+                                                    <constraint firstAttribute="bottom" secondItem="11" secondAttribute="bottom" id="fFe-7J-ver"/>
+                                                    <constraint firstItem="12" firstAttribute="top" secondItem="Vae-cT-EEI" secondAttribute="top" id="gwB-yN-SK0"/>
+                                                    <constraint firstAttribute="bottom" secondItem="12" secondAttribute="bottom" id="l2h-EI-MAG"/>
+                                                    <constraint firstItem="12" firstAttribute="left" secondItem="10" secondAttribute="right" id="mOu-KM-Uo8"/>
+                                                    <constraint firstItem="11" firstAttribute="left" secondItem="Vae-cT-EEI" secondAttribute="left" id="rI6-bN-oCM"/>
+                                                    <constraint firstAttribute="bottom" secondItem="10" secondAttribute="bottom" id="yGM-Jx-9fD"/>
+                                                </constraints>
+                                            </customView>
+                                            <slider hidden="YES" horizontalHuggingPriority="200" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="20" customClass="VLCSlider">
+                                                <rect key="frame" x="10" y="42" width="172" height="16"/>
+                                                <constraints>
+                                                    <constraint firstAttribute="height" constant="14" id="MYp-CS-yPe"/>
+                                                </constraints>
+                                                <sliderCell key="cell" controlSize="small" continuous="YES" state="on" alignment="left" maxValue="1" doubleValue="0.32600000000000001" tickMarkPosition="above" sliderType="linear" id="23" customClass="VLCSliderCell">
+                                                    <font key="font" size="12" name="Helvetica"/>
+                                                </sliderCell>
                                                 <connections>
-                                                    <action selector="bwd:" target="3" id="56"/>
+                                                    <action selector="timeSliderAction:" target="3" id="46"/>
                                                 </connections>
-                                            </button>
-                                            <button translatesAutoresizingMaskIntoConstraints="NO" id="10">
-                                                <rect key="frame" x="29" y="0.0" width="27" height="23"/>
-                                                <buttonCell key="cell" type="bevel" bezelStyle="regularSquare" image="play" imagePosition="only" alignment="center" alternateImage="play-pressed" id="15">
-                                                    <behavior key="behavior" lightByContents="YES"/>
-                                                    <font key="font" metaFont="titleBar" size="12"/>
-                                                </buttonCell>
-                                                <connections>
-                                                    <action selector="play:" target="3" id="39"/>
-                                                </connections>
-                                            </button>
-                                            <button translatesAutoresizingMaskIntoConstraints="NO" id="12">
-                                                <rect key="frame" x="56" y="0.0" width="29" height="23"/>
-                                                <buttonCell key="cell" type="bevel" bezelStyle="regularSquare" image="forward-3btns" imagePosition="only" alignment="center" alternateImage="forward-3btns-pressed" continuous="YES" enabled="NO" id="13">
-                                                    <behavior key="behavior" lightByContents="YES"/>
+                                            </slider>
+                                            <textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="9" customClass="VLCTimeField">
+                                                <rect key="frame" x="185" y="44" width="46" height="13"/>
+                                                <constraints>
+                                                    <constraint firstAttribute="width" relation="greaterThanOrEqual" constant="42" id="EvZ-Sy-m25"/>
+                                                    <constraint firstAttribute="height" constant="13" id="LYT-Sd-Gf6"/>
+                                                </constraints>
+                                                <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" state="on" alignment="center" title="00:00" id="16">
                                                     <font key="font" metaFont="label"/>
-                                                </buttonCell>
-                                                <connections>
-                                                    <action selector="fwd:" target="3" id="51"/>
-                                                </connections>
-                                            </button>
+                                                    <color key="textColor" white="0.25" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
+                                                    <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
+                                                </textFieldCell>
+                                            </textField>
                                         </subviews>
                                         <constraints>
-                                            <constraint firstItem="11" firstAttribute="top" secondItem="Vae-cT-EEI" secondAttribute="top" id="11i-jS-o5W"/>
-                                            <constraint firstItem="10" firstAttribute="left" secondItem="11" secondAttribute="right" id="496-Ip-nTd"/>
-                                            <constraint firstItem="10" firstAttribute="top" secondItem="Vae-cT-EEI" secondAttribute="top" id="9Kr-xx-Ssf"/>
-                                            <constraint firstAttribute="right" secondItem="12" secondAttribute="right" id="KOc-oW-4iH"/>
-                                            <constraint firstAttribute="height" constant="23" id="bN7-k9-7Iy"/>
-                                            <constraint firstAttribute="bottom" secondItem="11" secondAttribute="bottom" id="fFe-7J-ver"/>
-                                            <constraint firstItem="12" firstAttribute="top" secondItem="Vae-cT-EEI" secondAttribute="top" id="gwB-yN-SK0"/>
-                                            <constraint firstAttribute="bottom" secondItem="12" secondAttribute="bottom" id="l2h-EI-MAG"/>
-                                            <constraint firstItem="12" firstAttribute="left" secondItem="10" secondAttribute="right" id="mOu-KM-Uo8"/>
-                                            <constraint firstItem="11" firstAttribute="left" secondItem="Vae-cT-EEI" secondAttribute="left" id="rI6-bN-oCM"/>
-                                            <constraint firstAttribute="bottom" secondItem="10" secondAttribute="bottom" id="yGM-Jx-9fD"/>
+                                            <constraint firstItem="20" firstAttribute="leading" secondItem="65" secondAttribute="leading" constant="10" id="KrJ-x3-HIr"/>
+                                            <constraint firstItem="Vae-cT-EEI" firstAttribute="centerX" secondItem="65" secondAttribute="centerX" id="Rf0-0E-Wiz"/>
+                                            <constraint firstItem="9" firstAttribute="centerY" secondItem="20" secondAttribute="centerY" id="SW9-5i-MQL"/>
+                                            <constraint firstAttribute="bottom" secondItem="Vae-cT-EEI" secondAttribute="bottom" constant="10" id="T6V-Vf-TOT"/>
+                                            <constraint firstItem="9" firstAttribute="leading" secondItem="20" secondAttribute="trailing" constant="5" id="gyE-0N-u6t"/>
+                                            <constraint firstAttribute="trailing" secondItem="9" secondAttribute="trailing" constant="10" id="p5i-nM-pBs"/>
+                                            <constraint firstItem="Vae-cT-EEI" firstAttribute="top" secondItem="20" secondAttribute="bottom" constant="10" id="pfB-W2-CWB"/>
                                         </constraints>
                                     </customView>
-                                    <slider hidden="YES" horizontalHuggingPriority="200" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="20" customClass="VLCSlider">
-                                        <rect key="frame" x="10" y="42" width="172" height="16"/>
-                                        <constraints>
-                                            <constraint firstAttribute="height" constant="14" id="MYp-CS-yPe"/>
-                                        </constraints>
-                                        <sliderCell key="cell" controlSize="small" continuous="YES" state="on" alignment="left" maxValue="1" doubleValue="0.32600000000000001" tickMarkPosition="above" sliderType="linear" id="23" customClass="VLCSliderCell">
-                                            <font key="font" size="12" name="Helvetica"/>
-                                        </sliderCell>
-                                        <connections>
-                                            <action selector="timeSliderAction:" target="3" id="46"/>
-                                        </connections>
-                                    </slider>
-                                    <textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="9" customClass="VLCTimeField">
-                                        <rect key="frame" x="185" y="44" width="46" height="13"/>
-                                        <constraints>
-                                            <constraint firstAttribute="width" relation="greaterThanOrEqual" constant="42" id="EvZ-Sy-m25"/>
-                                            <constraint firstAttribute="height" constant="13" id="LYT-Sd-Gf6"/>
-                                        </constraints>
-                                        <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" state="on" alignment="center" title="00:00" id="16">
-                                            <font key="font" metaFont="label"/>
-                                            <color key="textColor" white="0.25" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
-                                            <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
-                                        </textFieldCell>
-                                    </textField>
                                 </subviews>
                                 <constraints>
-                                    <constraint firstItem="20" firstAttribute="leading" secondItem="65" secondAttribute="leading" constant="10" id="KrJ-x3-HIr"/>
-                                    <constraint firstItem="Vae-cT-EEI" firstAttribute="centerX" secondItem="65" secondAttribute="centerX" id="Rf0-0E-Wiz"/>
-                                    <constraint firstItem="9" firstAttribute="centerY" secondItem="20" secondAttribute="centerY" id="SW9-5i-MQL"/>
-                                    <constraint firstAttribute="bottom" secondItem="Vae-cT-EEI" secondAttribute="bottom" constant="10" id="T6V-Vf-TOT"/>
-                                    <constraint firstItem="9" firstAttribute="leading" secondItem="20" secondAttribute="trailing" constant="5" id="gyE-0N-u6t"/>
-                                    <constraint firstAttribute="trailing" secondItem="9" secondAttribute="trailing" constant="10" id="p5i-nM-pBs"/>
-                                    <constraint firstItem="Vae-cT-EEI" firstAttribute="top" secondItem="20" secondAttribute="bottom" constant="10" id="pfB-W2-CWB"/>
+                                    <constraint firstAttribute="trailing" secondItem="65" secondAttribute="trailing" id="1uG-1s-rI0"/>
+                                    <constraint firstItem="65" firstAttribute="leading" secondItem="5" secondAttribute="leading" id="84j-is-ZZ4"/>
+                                    <constraint firstAttribute="bottom" secondItem="65" secondAttribute="bottom" id="WrS-PS-vpi"/>
+                                    <constraint firstItem="65" firstAttribute="top" secondItem="5" secondAttribute="top" id="ecn-UJ-dvK"/>
+                                    <constraint firstAttribute="height" constant="65" id="z2X-5w-wme"/>
                                 </constraints>
                             </customView>
                         </subviews>
                         <constraints>
-                            <constraint firstAttribute="trailing" secondItem="65" secondAttribute="trailing" id="1uG-1s-rI0"/>
-                            <constraint firstItem="65" firstAttribute="leading" secondItem="5" secondAttribute="leading" id="84j-is-ZZ4"/>
-                            <constraint firstAttribute="bottom" secondItem="65" secondAttribute="bottom" id="WrS-PS-vpi"/>
-                            <constraint firstItem="65" firstAttribute="top" secondItem="5" secondAttribute="top" id="ecn-UJ-dvK"/>
-                            <constraint firstAttribute="height" constant="65" id="z2X-5w-wme"/>
+                            <constraint firstItem="F6N-G1-ay4" firstAttribute="top" secondItem="s7h-2z-AKB" secondAttribute="top" id="3fm-nY-Pva"/>
+                            <constraint firstItem="F6N-G1-ay4" firstAttribute="leading" secondItem="s7h-2z-AKB" secondAttribute="leading" constant="8" id="DxB-T0-68G"/>
+                            <constraint firstAttribute="trailing" secondItem="5" secondAttribute="trailing" id="Vh6-w4-RpJ"/>
+                            <constraint firstItem="5" firstAttribute="leading" secondItem="s7h-2z-AKB" secondAttribute="leading" id="aOM-Yt-uR4"/>
+                            <constraint firstAttribute="bottom" secondItem="5" secondAttribute="bottom" id="sVp-W4-nlt"/>
                         </constraints>
                     </customView>
                 </subviews>
                 <constraints>
-                    <constraint firstItem="5" firstAttribute="leading" secondItem="4" secondAttribute="leading" id="9Ml-c7-Mey"/>
+                    <constraint firstItem="s7h-2z-AKB" firstAttribute="leading" secondItem="4" secondAttribute="leading" id="GSE-Q6-p8X"/>
                     <constraint firstItem="63" firstAttribute="top" secondItem="4" secondAttribute="top" id="SR5-da-lz7">
                         <attributedString key="userComments">
                             <fragment content="Optional constraint if no titlebar">
@@ -142,14 +165,16 @@
                     <constraint firstAttribute="bottom" secondItem="63" secondAttribute="bottom" priority="750" id="Xml-gb-MF1"/>
                     <constraint firstItem="63" firstAttribute="leading" secondItem="4" secondAttribute="leading" id="b8K-0j-YLT"/>
                     <constraint firstAttribute="trailing" secondItem="63" secondAttribute="trailing" id="b8X-Kc-BfD"/>
-                    <constraint firstAttribute="trailing" secondItem="5" secondAttribute="trailing" id="jZw-zr-cck"/>
-                    <constraint firstAttribute="bottom" secondItem="5" secondAttribute="bottom" id="mhi-VL-aFb"/>
+                    <constraint firstAttribute="bottom" secondItem="s7h-2z-AKB" secondAttribute="bottom" id="d58-lr-6o8"/>
+                    <constraint firstAttribute="trailing" secondItem="s7h-2z-AKB" secondAttribute="trailing" id="dB2-xi-SzA"/>
+                    <constraint firstItem="s7h-2z-AKB" firstAttribute="top" secondItem="4" secondAttribute="top" constant="6" id="plq-T3-bmm"/>
                 </constraints>
             </view>
             <connections>
                 <outlet property="bottomBarView" destination="5" id="xZs-ha-Bmg"/>
                 <outlet property="controlsBar" destination="3" id="69"/>
                 <outlet property="imageView" destination="63" id="xYd-xT-wUa"/>
+                <outlet property="wrapperView" destination="s7h-2z-AKB" id="Vze-9X-Oxo"/>
             </connections>
             <point key="canvasLocation" x="138.5" y="146.5"/>
         </window>
@@ -171,5 +196,6 @@
         <image name="forward-3btns-pressed" width="29" height="23"/>
         <image name="play" width="27" height="23"/>
         <image name="play-pressed" width="27" height="23"/>
+        <image name="window-close" width="14" height="16"/>
     </resources>
 </document>
diff --git a/modules/gui/macosx/windows/VLCDetachedAudioWindow.h b/modules/gui/macosx/windows/VLCDetachedAudioWindow.h
index 938b5710f9..92031641ec 100644
--- a/modules/gui/macosx/windows/VLCDetachedAudioWindow.h
+++ b/modules/gui/macosx/windows/VLCDetachedAudioWindow.h
@@ -31,6 +31,7 @@ NS_ASSUME_NONNULL_BEGIN
 
 @interface VLCDetachedAudioWindow : VLCWindow
 
+ at property (nonatomic, weak) IBOutlet NSView *wrapperView;
 @property (nonatomic, weak) IBOutlet VLCImageView *imageView;
 @property (nonatomic, weak) IBOutlet VLCControlsBarCommon *controlsBar;
 @property (nonatomic, weak) IBOutlet VLCBottomBarView *bottomBarView;
diff --git a/modules/gui/macosx/windows/VLCDetachedAudioWindow.m b/modules/gui/macosx/windows/VLCDetachedAudioWindow.m
index 616af24e36..92df65fd24 100644
--- a/modules/gui/macosx/windows/VLCDetachedAudioWindow.m
+++ b/modules/gui/macosx/windows/VLCDetachedAudioWindow.m
@@ -43,11 +43,12 @@
 - (void)awakeFromNib
 {
     self.title = @"";
+    self.imageView.cropsImagesToRoundedCorners = NO;
 
     _playerController = [[[VLCMain sharedInstance] playlistController] playerController];
     VLCTrackingView *trackingView = self.contentView;
-    trackingView.viewToHide = self.bottomBarView;
-    self.bottomBarView.hidden = YES;
+    trackingView.viewToHide = self.wrapperView;
+    trackingView.animatesTransition = YES;
 
     NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter];
     [notificationCenter addObserver:self selector:@selector(inputItemChanged:) name:VLCPlayerCurrentMediaItemChanged object:nil];
@@ -68,7 +69,6 @@
     } else {
         [self.imageView setImage:[NSImage imageNamed:@"noart.png"]];
     }
-
 }
 
 - (BOOL)canBecomeKeyWindow
@@ -86,4 +86,13 @@
     return YES;
 }
 
+- (BOOL)performKeyEquivalent:(NSEvent *)event
+{
+    if (event.modifierFlags & NSEventModifierFlagCommand && event.keyCode == 13) {
+        [self closeAndAnimate:YES];
+        return YES;
+    }
+    return [super performKeyEquivalent:event];
+}
+
 @end



More information about the vlc-commits mailing list