[vlc-commits] macosx: open panel: Fix foldable MRL field

David Fuhrmann git at videolan.org
Sat Jul 1 16:51:06 CEST 2017


vlc | branch: master | David Fuhrmann <dfuhrmann at videolan.org> | Sat Jul  1 16:27:06 2017 +0200| [3956d67ebd991f43568e2efeb4ed35ee7c4e7409] | committer: David Fuhrmann

macosx: open panel: Fix foldable MRL field

Integrate MRL view into autolayout hierarchy of the open panel.
Add height constraint to hide the view.

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

 modules/gui/macosx/UI/Open.xib               | 244 +++++++++++++++++----------
 modules/gui/macosx/VLCOpenWindowController.h |   1 +
 modules/gui/macosx/VLCOpenWindowController.m |  29 +---
 3 files changed, 157 insertions(+), 117 deletions(-)

diff --git a/modules/gui/macosx/UI/Open.xib b/modules/gui/macosx/UI/Open.xib
index 4db0d252a4..31584db67d 100644
--- a/modules/gui/macosx/UI/Open.xib
+++ b/modules/gui/macosx/UI/Open.xib
@@ -87,6 +87,7 @@
                 <outlet property="mrlLabel" destination="2835" id="dYM-KV-nw8"/>
                 <outlet property="mrlTextField" destination="2840" id="YtE-PL-EEV"/>
                 <outlet property="mrlView" destination="2837" id="4C3-kA-e1R"/>
+                <outlet property="mrlViewHeightConstraint" destination="M1Q-TC-tLd" id="ctk-fz-NgD"/>
                 <outlet property="netHTTPURLLabel" destination="725" id="V9O-ut-b26"/>
                 <outlet property="netHTTPURLTextField" destination="730" id="L9w-sd-gAb"/>
                 <outlet property="netHelpLabel" destination="2809" id="9o4-Oi-RcV"/>
@@ -146,51 +147,18 @@
         <window title="Open Source" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" visibleAtLaunch="NO" frameAutosaveName="open" animationBehavior="default" id="636" userLabel="OpenTarget" customClass="NSPanel">
             <windowStyleMask key="styleMask" titled="YES"/>
             <windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
-            <rect key="contentRect" x="162" y="354" width="574" height="380"/>
+            <rect key="contentRect" x="162" y="354" width="574" height="426"/>
             <rect key="screenRect" x="0.0" y="0.0" width="1280" height="778"/>
             <value key="minSize" type="size" width="213" height="107"/>
             <view key="contentView" id="637">
-                <rect key="frame" x="0.0" y="0.0" width="574" height="380"/>
+                <rect key="frame" x="0.0" y="0.0" width="574" height="426"/>
                 <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                 <subviews>
-                    <button translatesAutoresizingMaskIntoConstraints="NO" id="929">
-                        <rect key="frame" x="18" y="58" width="113" height="18"/>
-                        <buttonCell key="cell" type="check" title="Stream output:" bezelStyle="regularSquare" imagePosition="left" alignment="left" inset="2" id="2890">
-                            <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
-                            <font key="font" metaFont="system"/>
-                        </buttonCell>
-                        <connections>
-                            <action selector="outputSettings:" target="-2" id="EUk-e1-Lcu"/>
-                        </connections>
-                    </button>
-                    <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="640">
-                        <rect key="frame" x="458" y="12" width="102" height="32"/>
-                        <buttonCell key="cell" type="push" title="Open" bezelStyle="rounded" alignment="center" borderStyle="border" inset="2" id="2867">
-                            <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                            <font key="font" metaFont="system"/>
-                            <string key="keyEquivalent" base64-UTF8="YES">
-DQ
-</string>
-                        </buttonCell>
-                        <connections>
-                            <action selector="panelOk:" target="-2" id="8t9-Gq-Sej"/>
-                        </connections>
-                    </button>
-                    <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="641">
-                        <rect key="frame" x="376" y="12" width="82" height="32"/>
-                        <buttonCell key="cell" type="push" title="Cancel" bezelStyle="rounded" alignment="center" borderStyle="border" inset="2" id="2868">
-                            <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                            <font key="font" metaFont="system"/>
-                            <string key="keyEquivalent" base64-UTF8="YES">
-Gw
-</string>
-                        </buttonCell>
-                        <connections>
-                            <action selector="panelCancel:" target="-2" id="9aG-gu-Abl"/>
-                        </connections>
-                    </button>
-                    <tabView translatesAutoresizingMaskIntoConstraints="NO" id="678">
-                        <rect key="frame" x="13" y="96" width="548" height="278"/>
+                    <tabView identifier="central tab view" translatesAutoresizingMaskIntoConstraints="NO" id="678">
+                        <rect key="frame" x="13" y="142" width="548" height="278"/>
+                        <constraints>
+                            <constraint firstAttribute="height" constant="262" id="XDQ-Ya-06b"/>
+                        </constraints>
                         <font key="font" metaFont="system"/>
                         <tabViewItems>
                             <tabViewItem label="File" identifier="file" id="680">
@@ -266,6 +234,9 @@ Gw
                                                     <constraint firstItem="3478" firstAttribute="leading" secondItem="3473" secondAttribute="trailing" constant="7" id="uVS-I1-xUH"/>
                                                 </constraints>
                                             </view>
+                                            <constraints>
+                                                <constraint firstAttribute="height" constant="41" id="Pjd-9n-xU7"/>
+                                            </constraints>
                                         </box>
                                         <textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="3342">
                                             <rect key="frame" x="54" y="193" width="96" height="17"/>
@@ -551,49 +522,124 @@ Gw
                             <outlet property="delegate" destination="-2" id="xqg-Fo-ETa"/>
                         </connections>
                     </tabView>
-                    <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="1256">
-                        <rect key="frame" x="458" y="49" width="102" height="32"/>
-                        <buttonCell key="cell" type="push" title="Settings..." bezelStyle="rounded" alignment="center" enabled="NO" borderStyle="border" inset="2" id="2891">
-                            <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
+                    <button identifier="mrl button" horizontalHuggingPriority="750" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="2836">
+                        <rect key="frame" x="20" y="131" width="13" height="13"/>
+                        <buttonCell key="cell" type="disclosureTriangle" bezelStyle="disclosure" image="1F3D5BE8-1854-49AC-9658-089829738770" imagePosition="above" alignment="center" borderStyle="border" inset="2" id="2893">
+                            <behavior key="behavior" pushIn="YES" changeBackground="YES" changeGray="YES" lightByContents="YES"/>
                             <font key="font" metaFont="system"/>
                         </buttonCell>
                         <connections>
-                            <action selector="outputSettings:" target="-2" id="hbB-87-Udf"/>
+                            <action selector="expandMRLfieldAction:" target="-2" id="xIA-tD-1dw"/>
                         </connections>
                     </button>
-                    <textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="2835" customClass="VLCOpenTextField">
-                        <rect key="frame" x="38" y="85" width="166" height="14"/>
+                    <textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="2835">
+                        <rect key="frame" x="38" y="131" width="166" height="14"/>
                         <textFieldCell key="cell" sendsActionOnEndEditing="YES" alignment="left" title="Media Resource Locator (MRL)" id="2892">
                             <font key="font" metaFont="smallSystem"/>
                             <color key="textColor" white="0.25" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
                             <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
                         </textFieldCell>
                     </textField>
-                    <button horizontalHuggingPriority="750" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="2836">
-                        <rect key="frame" x="20" y="85" width="13" height="13"/>
-                        <buttonCell key="cell" type="disclosureTriangle" bezelStyle="disclosure" imagePosition="above" alignment="left" borderStyle="border" inset="2" id="2893">
-                            <behavior key="behavior" pushIn="YES" changeBackground="YES" changeGray="YES" lightByContents="YES"/>
+                    <customView identifier="mrl view" translatesAutoresizingMaskIntoConstraints="NO" id="2837">
+                        <rect key="frame" x="35" y="90" width="504" height="39"/>
+                        <subviews>
+                            <box title="Media Resource Locator (MRL)" titlePosition="noTitle" translatesAutoresizingMaskIntoConstraints="NO" id="2838">
+                                <rect key="frame" x="-3" y="-4" width="510" height="45"/>
+                                <view key="contentView" id="U10-hR-gJf">
+                                    <rect key="frame" x="2" y="2" width="506" height="41"/>
+                                    <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                                    <subviews>
+                                        <textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="2840">
+                                            <rect key="frame" x="16" y="11" width="474" height="19"/>
+                                            <textFieldCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" selectable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" alignment="left" drawsBackground="YES" id="2990">
+                                                <font key="font" metaFont="smallSystem"/>
+                                                <color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
+                                                <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
+                                            </textFieldCell>
+                                        </textField>
+                                    </subviews>
+                                    <constraints>
+                                        <constraint firstAttribute="trailing" secondItem="2840" secondAttribute="trailing" constant="16" id="6v4-pS-Tri"/>
+                                        <constraint firstItem="2840" firstAttribute="centerY" secondItem="U10-hR-gJf" secondAttribute="centerY" id="p1T-M5-PFx"/>
+                                        <constraint firstItem="2840" firstAttribute="leading" secondItem="U10-hR-gJf" secondAttribute="leading" constant="16" id="zdh-2x-BHr"/>
+                                    </constraints>
+                                </view>
+                                <font key="titleFont" metaFont="system"/>
+                            </box>
+                        </subviews>
+                        <constraints>
+                            <constraint firstItem="2838" firstAttribute="leading" secondItem="2837" secondAttribute="leading" id="EOY-rR-cY6"/>
+                            <constraint firstItem="2838" firstAttribute="top" secondItem="2837" secondAttribute="top" id="JE5-xJ-rhM"/>
+                            <constraint firstAttribute="height" constant="39" id="M1Q-TC-tLd"/>
+                            <constraint firstAttribute="trailing" secondItem="2838" secondAttribute="trailing" id="Obx-pi-FTg"/>
+                            <constraint firstAttribute="bottom" secondItem="2838" secondAttribute="bottom" id="WSf-2D-V8S"/>
+                            <constraint firstItem="2838" firstAttribute="centerY" secondItem="2837" secondAttribute="centerY" id="fJw-W6-omc"/>
+                        </constraints>
+                    </customView>
+                    <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="929">
+                        <rect key="frame" x="18" y="58" width="113" height="18"/>
+                        <buttonCell key="cell" type="check" title="Stream output:" bezelStyle="regularSquare" imagePosition="left" alignment="left" inset="2" id="2890">
+                            <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
                             <font key="font" metaFont="system"/>
                         </buttonCell>
                         <connections>
-                            <action selector="expandMRLfieldAction:" target="-2" id="xIA-tD-1dw"/>
+                            <action selector="outputSettings:" target="-2" id="EUk-e1-Lcu"/>
+                        </connections>
+                    </button>
+                    <button identifier="settings button" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="1256">
+                        <rect key="frame" x="458" y="49" width="102" height="32"/>
+                        <buttonCell key="cell" type="push" title="Settings..." bezelStyle="rounded" alignment="center" enabled="NO" borderStyle="border" inset="2" id="2891">
+                            <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
+                            <font key="font" metaFont="system"/>
+                        </buttonCell>
+                        <connections>
+                            <action selector="outputSettings:" target="-2" id="hbB-87-Udf"/>
+                        </connections>
+                    </button>
+                    <button identifier="open button" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="640">
+                        <rect key="frame" x="458" y="12" width="102" height="32"/>
+                        <buttonCell key="cell" type="push" title="Open" bezelStyle="rounded" alignment="center" borderStyle="border" inset="2" id="2867">
+                            <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
+                            <font key="font" metaFont="system"/>
+                            <string key="keyEquivalent" base64-UTF8="YES">
+DQ
+</string>
+                        </buttonCell>
+                        <connections>
+                            <action selector="panelOk:" target="-2" id="8t9-Gq-Sej"/>
+                        </connections>
+                    </button>
+                    <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="641">
+                        <rect key="frame" x="376" y="12" width="82" height="32"/>
+                        <buttonCell key="cell" type="push" title="Cancel" bezelStyle="rounded" alignment="center" borderStyle="border" inset="2" id="2868">
+                            <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
+                            <font key="font" metaFont="system"/>
+                            <string key="keyEquivalent" base64-UTF8="YES">
+Gw
+</string>
+                        </buttonCell>
+                        <connections>
+                            <action selector="panelCancel:" target="-2" id="9aG-gu-Abl"/>
                         </connections>
                     </button>
                 </subviews>
                 <constraints>
+                    <constraint firstItem="2837" firstAttribute="top" secondItem="2836" secondAttribute="bottom" constant="2" id="1Zn-W0-Q4C"/>
                     <constraint firstItem="2836" firstAttribute="leading" secondItem="678" secondAttribute="leading" id="23O-ir-xvo"/>
-                    <constraint firstItem="2835" firstAttribute="top" secondItem="678" secondAttribute="bottom" constant="7" id="3Zj-ya-V1c"/>
                     <constraint firstItem="640" firstAttribute="top" secondItem="1256" secondAttribute="bottom" constant="16" id="4qd-10-LcF"/>
                     <constraint firstItem="2835" firstAttribute="leading" secondItem="2836" secondAttribute="trailing" constant="7" id="D4Y-0l-5IH"/>
+                    <constraint firstItem="2835" firstAttribute="baseline" secondItem="2836" secondAttribute="baseline" constant="5" id="IIG-7j-y4U"/>
                     <constraint firstItem="678" firstAttribute="leading" secondItem="637" secondAttribute="leading" constant="20" symbolic="YES" id="M6M-zD-ejl"/>
                     <constraint firstItem="2836" firstAttribute="top" secondItem="678" secondAttribute="bottom" constant="8" symbolic="YES" id="MKs-LN-9kf"/>
+                    <constraint firstItem="2837" firstAttribute="leading" secondItem="678" secondAttribute="leading" constant="15" id="Qo9-5e-hpg"/>
                     <constraint firstItem="641" firstAttribute="centerY" secondItem="640" secondAttribute="centerY" id="UVS-ZX-oI1"/>
                     <constraint firstAttribute="trailing" secondItem="678" secondAttribute="trailing" constant="20" symbolic="YES" id="VQr-tH-iXh"/>
+                    <constraint firstItem="929" firstAttribute="top" secondItem="2837" secondAttribute="bottom" constant="16" id="bnV-jE-1yz"/>
                     <constraint firstAttribute="trailing" secondItem="1256" secondAttribute="trailing" constant="20" id="cUM-b1-5Ge"/>
+                    <constraint firstItem="2837" firstAttribute="trailing" secondItem="678" secondAttribute="trailing" constant="-15" id="erI-Pi-xqK"/>
                     <constraint firstAttribute="trailing" secondItem="640" secondAttribute="trailing" constant="20" id="fwB-4h-Xua"/>
                     <constraint firstItem="929" firstAttribute="leading" secondItem="678" secondAttribute="leading" id="gPB-5G-X6T"/>
                     <constraint firstItem="929" firstAttribute="centerY" secondItem="1256" secondAttribute="centerY" id="jRR-ho-Y62"/>
-                    <constraint firstAttribute="bottom" secondItem="678" secondAttribute="bottom" constant="106" id="pDE-n6-2wP"/>
                     <constraint firstItem="640" firstAttribute="leading" secondItem="641" secondAttribute="trailing" constant="12" id="pzg-l3-etg"/>
                     <constraint firstItem="640" firstAttribute="width" secondItem="1256" secondAttribute="width" id="qIY-Fe-KNM"/>
                     <constraint firstItem="678" firstAttribute="top" secondItem="637" secondAttribute="top" constant="12" symbolic="YES" id="tdK-0j-cuC"/>
@@ -1478,45 +1524,6 @@ To open a stream using a different protocol, just press Cancel to close this she
             </view>
             <point key="canvasLocation" x="537" y="757.5"/>
         </window>
-        <customView id="2837" userLabel="MRL Field">
-            <rect key="frame" x="0.0" y="0.0" width="553" height="52"/>
-            <autoresizingMask key="autoresizingMask"/>
-            <subviews>
-                <box title="Media Resource Locator (MRL)" titlePosition="noTitle" translatesAutoresizingMaskIntoConstraints="NO" id="2838">
-                    <rect key="frame" x="38" y="3" width="498" height="45"/>
-                    <view key="contentView" id="U10-hR-gJf">
-                        <rect key="frame" x="2" y="2" width="494" height="41"/>
-                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-                        <subviews>
-                            <textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="2840">
-                                <rect key="frame" x="16" y="11" width="462" height="19"/>
-                                <constraints>
-                                    <constraint firstAttribute="width" constant="462" id="2HJ-Ov-r89"/>
-                                </constraints>
-                                <textFieldCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" selectable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" alignment="left" drawsBackground="YES" id="2990">
-                                    <font key="font" metaFont="smallSystem"/>
-                                    <color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
-                                    <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
-                                </textFieldCell>
-                            </textField>
-                        </subviews>
-                        <constraints>
-                            <constraint firstItem="2840" firstAttribute="centerX" secondItem="U10-hR-gJf" secondAttribute="centerX" id="G9F-Jx-Sl8"/>
-                            <constraint firstItem="2840" firstAttribute="centerY" secondItem="U10-hR-gJf" secondAttribute="centerY" id="p1T-M5-PFx"/>
-                        </constraints>
-                    </view>
-                    <constraints>
-                        <constraint firstAttribute="height" constant="39" id="ObB-cH-JCA"/>
-                    </constraints>
-                    <font key="titleFont" metaFont="system"/>
-                </box>
-            </subviews>
-            <constraints>
-                <constraint firstAttribute="trailing" secondItem="2838" secondAttribute="trailing" constant="20" id="6Gk-pb-yhZ"/>
-                <constraint firstItem="2838" firstAttribute="centerY" secondItem="2837" secondAttribute="centerY" id="fJw-W6-omc"/>
-                <constraint firstItem="2838" firstAttribute="leading" secondItem="2837" secondAttribute="leading" constant="41" id="iFK-Hl-F9Z"/>
-            </constraints>
-        </customView>
         <customView id="3080" userLabel="Audio CD">
             <rect key="frame" x="0.0" y="0.0" width="295" height="205"/>
             <autoresizingMask key="autoresizingMask"/>
@@ -1884,6 +1891,57 @@ To open a stream using a different protocol, just press Cancel to close this she
         <userDefaultsController representsSharedInstance="YES" id="3521"/>
     </objects>
     <resources>
+        <image name="1F3D5BE8-1854-49AC-9658-089829738770" width="1" height="1">
+            <mutableData key="keyedArchiveRepresentation">
+YnBsaXN0MDDUAQIDBAUGPT5YJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3ASAAGGoK4HCBMU
+GR4fIyQrLjE3OlUkbnVsbNUJCgsMDQ4PEBESVk5TU2l6ZVYkY2xhc3NcTlNJbWFnZUZsYWdzVk5TUmVw
+c1dOU0NvbG9ygAK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NfEBBOU0JpdG1hcEltYWdlUmVwoycpKlpOU0ltYWdlUmVwWE5TT2JqZWN00iUmLC1XTlNB
+cnJheaIsKtIlJi8wXk5TTXV0YWJsZUFycmF5oy8sKtMyMwo0NTZXTlNXaGl0ZVxOU0NvbG9yU3BhY2VE
+MCAwABADgAzSJSY4OVdOU0NvbG9yojgq0iUmOzxXTlNJbWFnZaI7Kl8QD05TS2V5ZWRBcmNoaXZlctE/
+QFRyb290gAEACAARABoAIwAtADIANwBGAEwAVwBeAGUAcgB5AIEAgwCFAIoAjACOAJUAmgClAKcAqQCr
+ALAAswC1ALcAuQC7AMAA1wDZANsJiwmQCZsJpAm3CbsJxgnPCdQJ3AnfCeQJ8wn3Cf4KBgoTChgKGgoc
+CiEKKQosCjEKOQo8Ck4KUQpWAAAAAAAAAgEAAAAAAAAAQQAAAAAAAAAAAAAAAAAAClg
+</mutableData>
+        </image>
         <image name="generic" width="512" height="512"/>
     </resources>
 </document>
diff --git a/modules/gui/macosx/VLCOpenWindowController.h b/modules/gui/macosx/VLCOpenWindowController.h
index 233dd34f2c..e2174c3832 100644
--- a/modules/gui/macosx/VLCOpenWindowController.h
+++ b/modules/gui/macosx/VLCOpenWindowController.h
@@ -33,6 +33,7 @@
 @property (readwrite, weak) IBOutlet NSView *mrlView;
 @property (readwrite, weak) IBOutlet NSButton *mrlButton;
 @property (readwrite, weak) IBOutlet NSTabView *tabView;
+ at property (readwrite, weak) IBOutlet NSLayoutConstraint *mrlViewHeightConstraint;
 
 @property (readwrite, weak) IBOutlet NSButton *okButton;
 @property (readwrite, weak) IBOutlet NSButton *cancelButton;
diff --git a/modules/gui/macosx/VLCOpenWindowController.m b/modules/gui/macosx/VLCOpenWindowController.m
index 5ca3d5f3f8..882d35d3f6 100644
--- a/modules/gui/macosx/VLCOpenWindowController.m
+++ b/modules/gui/macosx/VLCOpenWindowController.m
@@ -217,6 +217,9 @@ static NSString *kCaptureTabViewId  = @"capture";
     [_fileStartTimeTextField setFormatter:[[PositionFormatter alloc] init]];
     [_fileStopTimeTextField setFormatter:[[PositionFormatter alloc] init]];
 
+    // Auto collapse MRL field
+    self.mrlViewHeightConstraint.constant = 0;
+
     [self updateQTKVideoDevices];
     [_qtkVideoDevicePopup removeAllItems];
     msg_Dbg(getIntf(), "Found %lu video capture devices", _avvideoDevices.count);
@@ -570,33 +573,11 @@ static NSString *kCaptureTabViewId  = @"capture";
 
 - (IBAction)expandMRLfieldAction:(id)sender
 {
-    NSRect windowRect = [self.window frame];
-    NSRect viewRect = [_mrlView frame];
-
     if ([_mrlButton state] == NSOffState) {
-        /* we need to collaps, restore the panel size */
-        windowRect.size.height = windowRect.size.height - viewRect.size.height;
-        windowRect.origin.y = (windowRect.origin.y + viewRect.size.height) - viewRect.size.height;
-
-        /* remove the MRL view */
-        [_mrlView removeFromSuperview];
+        self.mrlViewHeightConstraint.animator.constant = 0;
     } else {
-        /* we need to expand */
-        [_mrlView setFrame: NSMakeRect(0,
-                                       [_mrlButton frame].origin.y,
-                                       viewRect.size.width,
-                                       viewRect.size.height)];
-        [_mrlView setNeedsDisplay: NO];
-        [_mrlView setAutoresizesSubviews: YES];
-
-        /* enlarge panel size for MRL view */
-        windowRect.size.height = windowRect.size.height + viewRect.size.height;
+        self.mrlViewHeightConstraint.animator.constant = 39;
     }
-
-    [[self.window animator] setFrame: windowRect display:YES];
-
-    if ([_mrlButton state] == NSOnState)
-        [[self.window contentView] addSubview: _mrlView];
 }
 
 - (void)openFileGeneric



More information about the vlc-commits mailing list