[vlc-commits] macosx/sprefs: add the option to disable video resizing to the native size to the video section

Felix Paul Kühne git at videolan.org
Thu May 30 21:50:06 CEST 2019


vlc | branch: master | Felix Paul Kühne <felix at feepk.net> | Thu May 30 21:47:14 2019 +0200| [a80b810bddfee8fbdcbd82ce30bbdf831b97b33f] | committer: Felix Paul Kühne

macosx/sprefs: add the option to disable video resizing to the native size to the video section

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

 modules/gui/macosx/UI/SimplePreferences.xib        | 29 ++++++++++++++++------
 .../macosx/preferences/VLCSimplePrefsController.h  |  1 +
 .../macosx/preferences/VLCSimplePrefsController.m  |  3 +++
 3 files changed, 25 insertions(+), 8 deletions(-)

diff --git a/modules/gui/macosx/UI/SimplePreferences.xib b/modules/gui/macosx/UI/SimplePreferences.xib
index 52262bd68d..3e438814d5 100644
--- a/modules/gui/macosx/UI/SimplePreferences.xib
+++ b/modules/gui/macosx/UI/SimplePreferences.xib
@@ -145,6 +145,7 @@
                 <outlet property="video_nativeFullscreenCheckbox" destination="6mo-Qc-MZV" id="4Qq-ci-Gbl"/>
                 <outlet property="video_onTopCheckbox" destination="2451" id="64h-nw-rQ0"/>
                 <outlet property="video_pauseWhenMinimizedCheckbox" destination="rpy-5O-tek" id="jBe-GO-Iiw"/>
+                <outlet property="video_resizeToNativeSizeCheckbox" destination="4a1-oW-HKH" id="bCd-bh-8FT"/>
                 <outlet property="video_snapBox" destination="2466" id="bQQ-pv-z09"/>
                 <outlet property="video_snap_folderButton" destination="2473" id="c2H-eo-wvH"/>
                 <outlet property="video_snap_folderLabel" destination="2470" id="oBs-TH-xvl"/>
@@ -820,10 +821,10 @@ Gw
             <point key="canvasLocation" x="265.5" y="1003"/>
         </customView>
         <customView translatesAutoresizingMaskIntoConstraints="NO" id="2440" userLabel="Video">
-            <rect key="frame" x="0.0" y="-4" width="582" height="501"/>
+            <rect key="frame" x="0.0" y="0.0" width="582" height="527"/>
             <subviews>
                 <button verticalHuggingPriority="251" mirrorLayoutDirectionWhenInternationalizing="always" translatesAutoresizingMaskIntoConstraints="NO" id="2448">
-                    <rect key="frame" x="18" y="465" width="101" height="18"/>
+                    <rect key="frame" x="18" y="491" width="101" height="18"/>
                     <buttonCell key="cell" type="check" title="Enable Video" bezelStyle="regularSquare" imagePosition="left" alignment="left" inset="2" id="3477">
                         <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
                         <font key="font" metaFont="system"/>
@@ -833,13 +834,13 @@ Gw
                     </connections>
                 </button>
                 <box title="Display" translatesAutoresizingMaskIntoConstraints="NO" id="2449">
-                    <rect key="frame" x="17" y="354" width="548" height="105"/>
+                    <rect key="frame" x="17" y="354" width="548" height="131"/>
                     <view key="contentView" id="eGM-I9-pBb">
-                        <rect key="frame" x="3" y="3" width="542" height="87"/>
+                        <rect key="frame" x="3" y="3" width="542" height="113"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <subviews>
                             <button mirrorLayoutDirectionWhenInternationalizing="always" translatesAutoresizingMaskIntoConstraints="NO" id="2452">
-                                <rect key="frame" x="15" y="61" width="214" height="18"/>
+                                <rect key="frame" x="15" y="87" width="214" height="18"/>
                                 <buttonCell key="cell" type="check" title="Show video within main window" bezelStyle="regularSquare" imagePosition="left" alignment="left" inset="2" id="3479">
                                     <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
                                     <font key="font" metaFont="system"/>
@@ -859,7 +860,7 @@ Gw
                                 </connections>
                             </button>
                             <button mirrorLayoutDirectionWhenInternationalizing="always" translatesAutoresizingMaskIntoConstraints="NO" id="rpy-5O-tek">
-                                <rect key="frame" x="15" y="36" width="278" height="18"/>
+                                <rect key="frame" x="15" y="62" width="278" height="18"/>
                                 <buttonCell key="cell" type="check" title="Pause the video playback when minimized" bezelStyle="regularSquare" imagePosition="left" alignment="left" inset="2" id="v2U-aI-gRI">
                                     <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
                                     <font key="font" metaFont="system"/>
@@ -868,6 +869,16 @@ Gw
                                     <action selector="videoSettingChanged:" target="-2" id="sk0-pw-9AE"/>
                                 </connections>
                             </button>
+                            <button mirrorLayoutDirectionWhenInternationalizing="always" translatesAutoresizingMaskIntoConstraints="NO" id="4a1-oW-HKH">
+                                <rect key="frame" x="15" y="36" width="263" height="18"/>
+                                <buttonCell key="cell" type="check" title="Resize interface to the native video size" bezelStyle="regularSquare" imagePosition="left" alignment="left" inset="2" id="rNV-hL-qNL">
+                                    <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
+                                    <font key="font" metaFont="system"/>
+                                </buttonCell>
+                                <connections>
+                                    <action selector="videoSettingChanged:" target="-2" id="Thc-PT-O88"/>
+                                </connections>
+                            </button>
                             <button mirrorLayoutDirectionWhenInternationalizing="always" translatesAutoresizingMaskIntoConstraints="NO" id="3728">
                                 <rect key="frame" x="269" y="10" width="146" height="18"/>
                                 <buttonCell key="cell" type="check" title="Window decorations" bezelStyle="regularSquare" imagePosition="left" alignment="left" inset="2" id="3729">
@@ -880,8 +891,10 @@ Gw
                             </button>
                         </subviews>
                         <constraints>
+                            <constraint firstItem="4a1-oW-HKH" firstAttribute="top" secondItem="rpy-5O-tek" secondAttribute="bottom" constant="12" id="3nN-jE-RrJ"/>
                             <constraint firstItem="3728" firstAttribute="centerY" secondItem="2451" secondAttribute="centerY" id="5ha-iW-rt3"/>
                             <constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="rpy-5O-tek" secondAttribute="trailing" constant="17" id="B4h-FQ-7aL"/>
+                            <constraint firstItem="2451" firstAttribute="top" secondItem="4a1-oW-HKH" secondAttribute="bottom" constant="12" id="DId-Tv-O07"/>
                             <constraint firstItem="rpy-5O-tek" firstAttribute="leading" secondItem="2452" secondAttribute="leading" id="KNc-3N-uYy"/>
                             <constraint firstItem="2451" firstAttribute="leading" secondItem="rpy-5O-tek" secondAttribute="leading" id="O89-st-t01"/>
                             <constraint firstItem="2452" firstAttribute="top" secondItem="eGM-I9-pBb" secondAttribute="top" constant="10" id="Zf8-Vt-ftS"/>
@@ -891,7 +904,7 @@ Gw
                             <constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="3728" secondAttribute="trailing" constant="17" id="rDL-Im-FxZ"/>
                             <constraint firstItem="rpy-5O-tek" firstAttribute="top" secondItem="2452" secondAttribute="bottom" constant="11" id="rH1-SK-emj"/>
                             <constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="2452" secondAttribute="trailing" constant="17" id="tZx-bu-85x"/>
-                            <constraint firstItem="2451" firstAttribute="top" secondItem="rpy-5O-tek" secondAttribute="bottom" constant="12" id="y3H-yC-OW5"/>
+                            <constraint firstItem="4a1-oW-HKH" firstAttribute="leading" secondItem="rpy-5O-tek" secondAttribute="leading" id="vPv-oH-IkT"/>
                         </constraints>
                     </view>
                 </box>
@@ -1172,7 +1185,7 @@ Gw
                     </view>
                 </box>
                 <customView hidden="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Hrj-mH-eqd" userLabel="half size helper view">
-                    <rect key="frame" x="291" y="463" width="271" height="23"/>
+                    <rect key="frame" x="291" y="489" width="271" height="23"/>
                     <constraints>
                         <constraint firstAttribute="height" constant="23" id="5d3-4W-bXj"/>
                     </constraints>
diff --git a/modules/gui/macosx/preferences/VLCSimplePrefsController.h b/modules/gui/macosx/preferences/VLCSimplePrefsController.h
index f27e62f039..27224e6648 100644
--- a/modules/gui/macosx/preferences/VLCSimplePrefsController.h
+++ b/modules/gui/macosx/preferences/VLCSimplePrefsController.h
@@ -179,6 +179,7 @@
 @property (readwrite, weak) IBOutlet NSButton *video_pauseWhenMinimizedCheckbox;
 @property (readwrite, weak) IBOutlet NSButton *video_onTopCheckbox;
 @property (readwrite, weak) IBOutlet NSButton *video_videodecoCheckbox;
+ at property (readwrite, weak) IBOutlet NSButton *video_resizeToNativeSizeCheckbox;
 
 // video pane - fullscreen box
 @property (readwrite, weak) IBOutlet NSBox *video_fullscreenBox;
diff --git a/modules/gui/macosx/preferences/VLCSimplePrefsController.m b/modules/gui/macosx/preferences/VLCSimplePrefsController.m
index 56ea056a87..756e0a5312 100644
--- a/modules/gui/macosx/preferences/VLCSimplePrefsController.m
+++ b/modules/gui/macosx/preferences/VLCSimplePrefsController.m
@@ -409,6 +409,7 @@ create_toolbar_item(NSString *itemIdent, NSString *name, NSString *desc, NSStrin
     [_video_displayBox setTitle: _NS("Display")];
     [_video_embeddedCheckbox setTitle: _NS("Show video within the main window")];
     [_video_pauseWhenMinimizedCheckbox setTitle:_NS("Pause the video playback when minimized")];
+    [_video_resizeToNativeSizeCheckbox setTitle:_NS("Resize interface to the native video size")];
     [_video_onTopCheckbox setTitle: _NS("Float on Top")];
     [_video_videodecoCheckbox setTitle: _NS("Window decorations")];
 
@@ -699,6 +700,7 @@ static inline const char * __config_GetLabel(vlc_object_t *p_this, const char *p
     [self setupButton:_video_blackScreenCheckbox forBoolValue: "macosx-black"];
     [self setupButton:_video_videodecoCheckbox forBoolValue: "video-deco"];
     [self setupButton:_video_pauseWhenMinimizedCheckbox forBoolValue: "macosx-pause-minimized"];
+    [self setupButton:_video_resizeToNativeSizeCheckbox forBoolValue: "macosx-video-autoresize"];
 
     [_video_devicePopup removeAllItems];
     i = 0;
@@ -1019,6 +1021,7 @@ static inline void save_string_list(intf_thread_t * p_intf, id object, const cha
         config_PutInt("macosx-black", [_video_blackScreenCheckbox state]);
 
         config_PutInt("macosx-pause-minimized", [_video_pauseWhenMinimizedCheckbox state]);
+        config_PutInt("macosx-video-autoresize", [_video_resizeToNativeSizeCheckbox state]);
 
         config_PutInt("embedded-video", [_video_embeddedCheckbox state]);
         config_PutInt("macosx-nativefullscreenmode", [_video_nativeFullscreenCheckbox state]);



More information about the vlc-commits mailing list