[vlc-commits] macosx: Convert detached video window to auto layout

David Fuhrmann git at videolan.org
Sat Apr 22 16:35:05 CEST 2017


vlc | branch: master | David Fuhrmann <dfuhrmann at videolan.org> | Sat Apr 15 12:53:09 2017 +0200| [36366fa94b48fc8ac8f5d430fa7e86480a5543b6] | committer: David Fuhrmann

macosx: Convert detached video window to auto layout

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

 modules/gui/macosx/UI/DetachedVideoWindow.xib | 257 +++++++++++++++++---------
 modules/gui/macosx/VLCControlsBarCommon.m     |   1 +
 modules/gui/macosx/Windows.m                  |   4 +
 3 files changed, 171 insertions(+), 91 deletions(-)

diff --git a/modules/gui/macosx/UI/DetachedVideoWindow.xib b/modules/gui/macosx/UI/DetachedVideoWindow.xib
index 831b2d908a..d5bb759b51 100644
--- a/modules/gui/macosx/UI/DetachedVideoWindow.xib
+++ b/modules/gui/macosx/UI/DetachedVideoWindow.xib
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="10117" systemVersion="15E65" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none">
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="10117" systemVersion="15G1421" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
     <dependencies>
         <deployment identifier="macosx"/>
         <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="10117"/>
@@ -16,64 +16,118 @@
             <windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
             <windowPositionMask key="initialPositionMask" leftStrut="YES" topStrut="YES"/>
             <rect key="contentRect" x="91" y="467" width="363" height="239"/>
-            <rect key="screenRect" x="0.0" y="0.0" width="2560" height="1417"/>
+            <rect key="screenRect" x="0.0" y="0.0" width="1280" height="777"/>
             <view key="contentView" id="4">
                 <rect key="frame" x="0.0" y="0.0" width="363" height="239"/>
                 <autoresizingMask key="autoresizingMask"/>
                 <subviews>
-                    <customView id="5" customClass="VLCThreePartImageView">
+                    <customView translatesAutoresizingMaskIntoConstraints="NO" id="5" customClass="VLCThreePartImageView">
                         <rect key="frame" x="0.0" y="0.0" width="363" height="36"/>
-                        <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
                         <subviews>
-                            <customView id="65" customClass="VLCDragDropView">
+                            <customView translatesAutoresizingMaskIntoConstraints="NO" id="65" customClass="VLCDragDropView">
                                 <rect key="frame" x="0.0" y="0.0" width="363" height="36"/>
-                                <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
                                 <subviews>
-                                    <button id="12">
-                                        <rect key="frame" x="62" y="6" width="29" height="23"/>
-                                        <autoresizingMask key="autoresizingMask" flexibleMaxX="YES"/>
-                                        <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>
-                                    <button id="11">
-                                        <rect key="frame" x="6" y="6" width="29" height="23"/>
-                                        <autoresizingMask key="autoresizingMask" flexibleMaxX="YES"/>
-                                        <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 id="10">
-                                        <rect key="frame" x="35" y="6" width="27" height="23"/>
-                                        <autoresizingMask key="autoresizingMask" flexibleMaxX="YES"/>
-                                        <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>
-                                    <textField verticalHuggingPriority="750" id="9" customClass="VLCTimeField">
-                                        <rect key="frame" x="269" y="11" width="55" height="13"/>
-                                        <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
+                                    <customView translatesAutoresizingMaskIntoConstraints="NO" id="Vae-cT-EEI" userLabel="Play controls group">
+                                        <rect key="frame" x="6" y="6" 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="width" constant="85" id="Ykg-nF-M2h"/>
+                                            <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>
+                                    <customView translatesAutoresizingMaskIntoConstraints="NO" id="6" customClass="VLCProgressView">
+                                        <rect key="frame" x="96" y="10" width="170" height="14"/>
+                                        <subviews>
+                                            <customView translatesAutoresizingMaskIntoConstraints="NO" id="22" customClass="VLCThreePartImageView">
+                                                <rect key="frame" x="0.0" y="0.0" width="170" height="14"/>
+                                            </customView>
+                                            <progressIndicator hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" maxValue="100" bezeled="NO" indeterminate="YES" controlSize="small" style="bar" translatesAutoresizingMaskIntoConstraints="NO" id="21" userLabel="Buffering bar">
+                                                <rect key="frame" x="0.0" y="1" width="170" height="12"/>
+                                            </progressIndicator>
+                                            <slider hidden="YES" canDrawConcurrently="YES" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="20" customClass="TimeLineSlider">
+                                                <rect key="frame" x="0.0" y="0.0" width="170" height="17"/>
+                                                <sliderCell key="cell" controlSize="small" continuous="YES" state="on" alignment="left" maxValue="10000" doubleValue="3260.3068524096384" tickMarkPosition="above" sliderType="linear" id="23">
+                                                    <font key="font" size="12" name="Helvetica"/>
+                                                </sliderCell>
+                                                <connections>
+                                                    <action selector="timeSliderAction:" target="3" id="46"/>
+                                                </connections>
+                                            </slider>
+                                            <customView hidden="YES" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="19" customClass="VLCThreePartImageView">
+                                                <rect key="frame" x="1" y="1" width="60" height="12"/>
+                                            </customView>
+                                        </subviews>
+                                        <constraints>
+                                            <constraint firstItem="21" firstAttribute="left" secondItem="6" secondAttribute="left" id="45y-XZ-FLX"/>
+                                            <constraint firstAttribute="height" constant="14" id="KKv-wd-vvV"/>
+                                            <constraint firstAttribute="bottom" secondItem="22" secondAttribute="bottom" id="KQg-pN-jCz"/>
+                                            <constraint firstAttribute="right" secondItem="20" secondAttribute="right" id="Qh6-UD-SRF"/>
+                                            <constraint firstAttribute="right" secondItem="21" secondAttribute="right" id="Ssh-Nl-Rmt"/>
+                                            <constraint firstItem="20" firstAttribute="centerY" secondItem="6" secondAttribute="centerY" constant="-1" id="X9R-F6-nBb"/>
+                                            <constraint firstItem="22" firstAttribute="top" secondItem="6" secondAttribute="top" id="azQ-Cs-Kbk"/>
+                                            <constraint firstItem="22" firstAttribute="left" secondItem="6" secondAttribute="left" id="p2J-jh-4Ae"/>
+                                            <constraint firstAttribute="right" secondItem="22" secondAttribute="right" id="pak-7k-GGR"/>
+                                            <constraint firstItem="20" firstAttribute="left" secondItem="6" secondAttribute="left" id="x4b-hb-HtV"/>
+                                            <constraint firstItem="21" firstAttribute="centerY" secondItem="6" secondAttribute="centerY" id="xFv-KZ-9if"/>
+                                        </constraints>
+                                    </customView>
+                                    <textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="9" customClass="VLCTimeField">
+                                        <rect key="frame" x="268" y="11" width="56" height="13"/>
+                                        <constraints>
+                                            <constraint firstAttribute="width" relation="greaterThanOrEqual" constant="52" 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>
-                                    <button id="8">
+                                    <button translatesAutoresizingMaskIntoConstraints="NO" id="8">
                                         <rect key="frame" x="327" y="6" width="29" height="23"/>
-                                        <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
+                                        <constraints>
+                                            <constraint firstAttribute="height" constant="23" id="fNg-pN-oQw"/>
+                                        </constraints>
                                         <buttonCell key="cell" type="bevel" bezelStyle="regularSquare" image="fullscreen-double-buttons" imagePosition="only" alignment="center" alternateImage="fullscreen-double-buttons-pressed" id="17">
                                             <behavior key="behavior" pushIn="YES" changeContents="YES" lightByContents="YES"/>
                                             <font key="font" metaFont="label"/>
@@ -82,48 +136,47 @@
                                             <action selector="fullscreen:" target="3" id="37"/>
                                         </connections>
                                     </button>
-                                    <imageView id="7" customClass="VLCResizeControl">
-                                        <rect key="frame" x="349" y="0.0" width="14" height="14"/>
-                                        <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
+                                    <imageView translatesAutoresizingMaskIntoConstraints="NO" id="7" customClass="VLCResizeControl">
+                                        <rect key="frame" x="351" y="0.0" width="12" height="12"/>
                                         <imageCell key="cell" continuous="YES" refusesFirstResponder="YES" alignment="left" image="window-resize" id="18"/>
                                     </imageView>
-                                    <customView id="6" customClass="VLCProgressView">
-                                        <rect key="frame" x="96" y="10" width="171" height="14"/>
-                                        <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
-                                        <subviews>
-                                            <customView id="22" customClass="VLCThreePartImageView">
-                                                <rect key="frame" x="0.0" y="0.0" width="171" height="14"/>
-                                                <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
-                                            </customView>
-                                            <progressIndicator hidden="YES" verticalHuggingPriority="750" maxValue="100" bezeled="NO" indeterminate="YES" controlSize="small" style="bar" id="21">
-                                                <rect key="frame" x="0.0" y="2" width="171" height="12"/>
-                                                <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
-                                            </progressIndicator>
-                                            <slider hidden="YES" canDrawConcurrently="YES" verticalHuggingPriority="750" id="20" customClass="TimeLineSlider">
-                                                <rect key="frame" x="1" y="0.0" width="168" height="15"/>
-                                                <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
-                                                <sliderCell key="cell" controlSize="small" continuous="YES" state="on" alignment="left" maxValue="10000" doubleValue="3260.3068524096384" tickMarkPosition="above" sliderType="linear" id="23">
-                                                    <font key="font" size="12" name="Helvetica"/>
-                                                </sliderCell>
-                                                <connections>
-                                                    <action selector="timeSliderAction:" target="3" id="46"/>
-                                                </connections>
-                                            </slider>
-                                            <customView hidden="YES" id="19" customClass="VLCThreePartImageView">
-                                                <rect key="frame" x="1" y="1" width="60" height="12"/>
-                                                <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
-                                            </customView>
-                                        </subviews>
-                                    </customView>
                                 </subviews>
+                                <constraints>
+                                    <constraint firstItem="9" firstAttribute="centerY" secondItem="6" secondAttribute="centerY" id="7ZU-On-ZZb"/>
+                                    <constraint firstItem="6" firstAttribute="leading" secondItem="Vae-cT-EEI" secondAttribute="trailing" constant="5" id="GU7-gS-983"/>
+                                    <constraint firstItem="8" firstAttribute="centerY" secondItem="9" secondAttribute="centerY" id="IBe-RR-daQ"/>
+                                    <constraint firstAttribute="trailing" secondItem="8" secondAttribute="trailing" constant="7" id="Kfi-X6-dCb"/>
+                                    <constraint firstItem="Vae-cT-EEI" firstAttribute="centerY" secondItem="65" secondAttribute="centerY" id="L8J-t8-eZg"/>
+                                    <constraint firstItem="9" firstAttribute="leading" secondItem="6" secondAttribute="trailing" constant="4" id="P5c-gH-8J6"/>
+                                    <constraint firstItem="6" firstAttribute="centerY" secondItem="Vae-cT-EEI" secondAttribute="centerY" id="cvI-P6-Eda"/>
+                                    <constraint firstAttribute="bottom" secondItem="7" secondAttribute="bottom" id="eiE-5I-gND"/>
+                                    <constraint firstAttribute="trailing" secondItem="7" secondAttribute="trailing" id="ixf-mR-2yO"/>
+                                    <constraint firstItem="Vae-cT-EEI" firstAttribute="leading" secondItem="65" secondAttribute="leading" constant="6" id="ju1-w7-CzH"/>
+                                    <constraint firstItem="8" firstAttribute="leading" secondItem="9" secondAttribute="trailing" constant="5" id="qs6-O2-pGr"/>
+                                </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="36" id="z2X-5w-wme"/>
+                        </constraints>
                     </customView>
-                    <customView id="63" customClass="VLCVoutView">
-                        <rect key="frame" x="0.0" y="36" width="363" height="204"/>
-                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                    <customView translatesAutoresizingMaskIntoConstraints="NO" id="63" customClass="VLCVoutView">
+                        <rect key="frame" x="0.0" y="36" width="363" height="203"/>
                     </customView>
                 </subviews>
+                <constraints>
+                    <constraint firstItem="5" firstAttribute="leading" secondItem="4" secondAttribute="leading" id="9Ml-c7-Mey"/>
+                    <constraint firstItem="63" firstAttribute="top" secondItem="4" secondAttribute="top" id="SR5-da-lz7"/>
+                    <constraint firstItem="5" firstAttribute="top" secondItem="63" secondAttribute="bottom" id="VbV-nq-qDN"/>
+                    <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"/>
+                </constraints>
             </view>
             <connections>
                 <outlet property="controlsBar" destination="3" id="69"/>
@@ -135,9 +188,12 @@
             <rect key="frame" x="0.0" y="0.0" width="400" height="22"/>
             <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
             <subviews>
-                <button id="24" customClass="VLCCustomWindowCloseButton">
+                <button translatesAutoresizingMaskIntoConstraints="NO" id="24" customClass="VLCCustomWindowCloseButton">
                     <rect key="frame" x="7" y="3" width="14" height="16"/>
-                    <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
+                    <constraints>
+                        <constraint firstAttribute="height" constant="16" id="HAp-cx-URj"/>
+                        <constraint firstAttribute="width" constant="14" id="LNf-Qy-TG9"/>
+                    </constraints>
                     <buttonCell key="cell" type="bevel" bezelStyle="regularSquare" imagePosition="only" alignment="left" imageScaling="axesIndependently" inset="2" id="33" customClass="VLCWindowButtonCell">
                         <behavior key="behavior" lightByContents="YES"/>
                         <font key="font" metaFont="system"/>
@@ -146,9 +202,12 @@
                         <action selector="buttonAction:" target="1" id="53"/>
                     </connections>
                 </button>
-                <button id="25" customClass="VLCCustomWindowMinimizeButton">
+                <button translatesAutoresizingMaskIntoConstraints="NO" id="25" customClass="VLCCustomWindowMinimizeButton">
                     <rect key="frame" x="27" y="3" width="14" height="16"/>
-                    <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
+                    <constraints>
+                        <constraint firstAttribute="height" constant="16" id="4re-Vn-YFb"/>
+                        <constraint firstAttribute="width" constant="14" id="PBv-gC-vlV"/>
+                    </constraints>
                     <buttonCell key="cell" type="bevel" bezelStyle="regularSquare" imagePosition="only" alignment="left" imageScaling="axesIndependently" inset="2" id="32" customClass="VLCWindowButtonCell">
                         <behavior key="behavior" lightByContents="YES"/>
                         <font key="font" metaFont="system"/>
@@ -157,9 +216,12 @@
                         <action selector="buttonAction:" target="1" id="38"/>
                     </connections>
                 </button>
-                <button id="26" customClass="VLCCustomWindowZoomButton">
+                <button translatesAutoresizingMaskIntoConstraints="NO" id="26" customClass="VLCCustomWindowZoomButton">
                     <rect key="frame" x="47" y="3" width="14" height="16"/>
-                    <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
+                    <constraints>
+                        <constraint firstAttribute="height" constant="16" id="2tY-4g-xst"/>
+                        <constraint firstAttribute="width" constant="14" id="YKz-Lu-TFt"/>
+                    </constraints>
                     <buttonCell key="cell" type="bevel" bezelStyle="regularSquare" imagePosition="only" alignment="left" imageScaling="axesIndependently" inset="2" id="31" customClass="VLCWindowButtonCell">
                         <behavior key="behavior" lightByContents="YES"/>
                         <font key="font" metaFont="system"/>
@@ -168,9 +230,11 @@
                         <action selector="buttonAction:" target="1" id="52"/>
                     </connections>
                 </button>
-                <button id="27" customClass="VLCCustomWindowFullscreenButton">
-                    <rect key="frame" x="384" y="3" width="12" height="15"/>
-                    <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES"/>
+                <button translatesAutoresizingMaskIntoConstraints="NO" id="27" customClass="VLCCustomWindowFullscreenButton">
+                    <rect key="frame" x="382" y="3" width="14" height="15"/>
+                    <constraints>
+                        <constraint firstAttribute="width" constant="14" id="dit-fr-XIj"/>
+                    </constraints>
                     <buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" alignment="center" state="on" inset="2" id="30" customClass="VLCWindowButtonCell">
                         <behavior key="behavior" lightByContents="YES"/>
                         <font key="font" metaFont="system"/>
@@ -179,9 +243,8 @@
                         <action selector="buttonAction:" target="1" id="55"/>
                     </connections>
                 </button>
-                <textField verticalHuggingPriority="750" id="28" customClass="VLCWindowTitleTextField">
-                    <rect key="frame" x="65" y="3" width="263" height="17"/>
-                    <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
+                <textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="28" customClass="VLCWindowTitleTextField">
+                    <rect key="frame" x="65" y="3" width="261" height="17"/>
                     <textFieldCell key="cell" lineBreakMode="truncatingTail" sendsActionOnEndEditing="YES" alignment="center" title="VLC media player" allowsEditingTextAttributes="YES" usesSingleLineMode="YES" id="29">
                         <font key="font" metaFont="system"/>
                         <color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
@@ -189,6 +252,19 @@
                     </textFieldCell>
                 </textField>
             </subviews>
+            <constraints>
+                <constraint firstAttribute="trailing" secondItem="27" secondAttribute="trailing" constant="4" id="EUa-A3-U77"/>
+                <constraint firstItem="26" firstAttribute="leading" secondItem="25" secondAttribute="trailing" constant="6" id="EgY-Oe-oRg"/>
+                <constraint firstItem="28" firstAttribute="centerY" secondItem="1" secondAttribute="centerY" id="FVC-gH-9JQ"/>
+                <constraint firstItem="25" firstAttribute="leading" secondItem="24" secondAttribute="trailing" constant="6" id="JgK-vs-BrQ"/>
+                <constraint firstItem="25" firstAttribute="centerY" secondItem="1" secondAttribute="centerY" id="Lw5-nW-6lW"/>
+                <constraint firstItem="24" firstAttribute="leading" secondItem="1" secondAttribute="leading" constant="7" id="NvG-rV-YhY"/>
+                <constraint firstItem="27" firstAttribute="centerY" secondItem="1" secondAttribute="centerY" id="YIS-Te-ToL"/>
+                <constraint firstItem="24" firstAttribute="centerY" secondItem="1" secondAttribute="centerY" id="aUJ-zT-GaH"/>
+                <constraint firstItem="27" firstAttribute="leading" secondItem="28" secondAttribute="trailing" constant="58" id="pUY-UB-1Wm"/>
+                <constraint firstItem="26" firstAttribute="centerY" secondItem="1" secondAttribute="centerY" id="rKd-Tw-gjS"/>
+                <constraint firstItem="28" firstAttribute="leading" secondItem="26" secondAttribute="trailing" constant="6" id="uRA-WS-6cJ"/>
+            </constraints>
             <connections>
                 <outlet property="fullscreenButton" destination="27" id="Q7Q-c7-2mT"/>
                 <outlet property="greenButton" destination="26" id="ene-pt-Lib"/>
@@ -204,7 +280,6 @@
                 <outlet property="dropView" destination="65" id="9kL-XQ-Akn"/>
                 <outlet property="forwardButton" destination="12" id="f7L-YR-p1H"/>
                 <outlet property="fullscreenButton" destination="8" id="HTb-D0-BTG"/>
-                <outlet property="o_progress_view" destination="6" id="42"/>
                 <outlet property="playButton" destination="10" id="Gsq-tx-qf3"/>
                 <outlet property="progressBar" destination="21" id="lME-my-FW0"/>
                 <outlet property="progressView" destination="6" id="Z9X-x2-mTB"/>
diff --git a/modules/gui/macosx/VLCControlsBarCommon.m b/modules/gui/macosx/VLCControlsBarCommon.m
index 02bc764476..7ff193d504 100644
--- a/modules/gui/macosx/VLCControlsBarCommon.m
+++ b/modules/gui/macosx/VLCControlsBarCommon.m
@@ -130,6 +130,7 @@
     [self.timeField setRemainingIdentifier:@"DisplayTimeAsTimeRemaining"];
 
     // prepare time slider fance gradient view
+    self.timeSliderGradientView.translatesAutoresizingMaskIntoConstraints = YES;
     if (!_darkInterface) {
         NSRect frame;
         frame = [self.timeSliderGradientView frame];
diff --git a/modules/gui/macosx/Windows.m b/modules/gui/macosx/Windows.m
index 4b34e64198..6850ce14b9 100644
--- a/modules/gui/macosx/Windows.m
+++ b/modules/gui/macosx/Windows.m
@@ -833,6 +833,7 @@
         /* Make sure video view gets visible in case the playlist was visible before */
         b_video_view_was_hidden = [_videoView isHidden];
         [_videoView setHidden: NO];
+        _videoView.translatesAutoresizingMaskIntoConstraints = YES;
 
         if (!b_animation) {
             /* We don't animate if we are not visible, instead we
@@ -849,6 +850,7 @@
             [o_temp_view setFrame:[_videoView frame]];
             [[o_fullscreen_window contentView] addSubview:_videoView];
             [_videoView setFrame: [[o_fullscreen_window contentView] frame]];
+            [_videoView setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable];
             NSEnableScreenUpdates();
 
             [screen setFullscreenPresentationOptions];
@@ -876,6 +878,8 @@
         [o_temp_view setFrame:[_videoView frame]];
         [[o_fullscreen_window contentView] addSubview:_videoView];
         [_videoView setFrame: [[o_fullscreen_window contentView] frame]];
+        [_videoView setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable];
+
         [o_fullscreen_window makeKeyAndOrderFront:self];
         NSEnableScreenUpdates();
     }



More information about the vlc-commits mailing list