[vlc-commits] macosx: Add missing layout constraints for "apply profile" chkboxes
David Fuhrmann
git at videolan.org
Sun Jul 30 20:56:46 CEST 2017
vlc | branch: master | David Fuhrmann <dfuhrmann at videolan.org> | Sun Jul 30 18:38:25 2017 +0200| [58f68b62f84a73d5ac7b6d05385dcbcea2db06db] | committer: David Fuhrmann
macosx: Add missing layout constraints for "apply profile" chkboxes
Adds some layout constraints + priorities to fix position beneath
the popup box. Adds HUD cell subclasses and correct font so that
it looks the same as the other checkboxes.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=58f68b62f84a73d5ac7b6d05385dcbcea2db06db
---
modules/gui/macosx/UI/AudioEffects.xib | 92 +++++++++++++++++-----------------
modules/gui/macosx/UI/VideoEffects.xib | 67 +++++++++++++------------
2 files changed, 81 insertions(+), 78 deletions(-)
diff --git a/modules/gui/macosx/UI/AudioEffects.xib b/modules/gui/macosx/UI/AudioEffects.xib
index 5153370c00..56c3ff101b 100644
--- a/modules/gui/macosx/UI/AudioEffects.xib
+++ b/modules/gui/macosx/UI/AudioEffects.xib
@@ -93,6 +93,27 @@
<rect key="frame" x="0.0" y="0.0" width="409" height="255"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
+ <segmentedControl verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Jb1-f1-iF3">
+ <rect key="frame" x="48" y="228" width="314" height="24"/>
+ <segmentedCell key="cell" borderStyle="border" alignment="left" style="rounded" trackingMode="selectOne" id="ZdJ-0F-LWH" customClass="VLCHUDSegmentedCell">
+ <font key="font" metaFont="system"/>
+ <segments>
+ <segment label="Equalizer" selected="YES"/>
+ <segment label="Compressor" tag="1"/>
+ <segment label="Spatializer" tag="2"/>
+ <segment label="Filter" tag="3"/>
+ </segments>
+ </segmentedCell>
+ <connections>
+ <action selector="takeSelectedTabViewItemFromSender:" target="80" id="NRc-hG-ZR6"/>
+ </connections>
+ </segmentedControl>
+ <box verticalHuggingPriority="750" boxType="separator" translatesAutoresizingMaskIntoConstraints="NO" id="EuA-vb-mSS">
+ <rect key="frame" x="0.0" y="220" width="409" height="5"/>
+ <constraints>
+ <constraint firstAttribute="height" constant="1" id="3Ct-NZ-Azh"/>
+ </constraints>
+ </box>
<tabView drawsBackground="NO" type="noTabsNoBorder" initialItem="81" translatesAutoresizingMaskIntoConstraints="NO" id="80">
<rect key="frame" x="-8" y="35" width="425" height="189"/>
<font key="font" metaFont="system"/>
@@ -673,7 +694,7 @@
</textField>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="621">
<rect key="frame" x="359" y="151" width="39" height="17"/>
- <buttonCell key="cell" type="roundRect" title="Reset" bezelStyle="roundedRect" image="A676079A-9DD6-4E5F-AFE2-377CBEDF6200" imagePosition="overlaps" alignment="center" controlSize="mini" borderStyle="border" inset="2" id="622" customClass="VLCHUDButtonCell">
+ <buttonCell key="cell" type="roundRect" title="Reset" bezelStyle="roundedRect" image="20A2CD53-3C79-47D9-970B-DB16D0175EF5" imagePosition="overlaps" alignment="center" controlSize="mini" borderStyle="border" inset="2" id="622" customClass="VLCHUDButtonCell">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="miniSystem"/>
</buttonCell>
@@ -779,7 +800,7 @@
<subviews>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="618">
<rect key="frame" x="351" y="145" width="39" height="17"/>
- <buttonCell key="cell" type="roundRect" title="Reset" bezelStyle="roundedRect" image="8CA0F5B3-0A34-4969-9EEF-735FB0ACB80D" imagePosition="overlaps" alignment="center" controlSize="mini" borderStyle="border" inset="2" id="619" customClass="VLCHUDButtonCell">
+ <buttonCell key="cell" type="roundRect" title="Reset" bezelStyle="roundedRect" image="FE02FB57-922F-4AD2-BC53-03C973975F99" imagePosition="overlaps" alignment="center" controlSize="mini" borderStyle="border" inset="2" id="619" customClass="VLCHUDButtonCell">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="miniSystem"/>
</buttonCell>
@@ -1079,42 +1100,14 @@
</tabViewItem>
</tabViewItems>
</tabView>
- <box verticalHuggingPriority="750" fixedFrame="YES" boxType="separator" translatesAutoresizingMaskIntoConstraints="NO" id="EuA-vb-mSS">
- <rect key="frame" x="0.0" y="221" width="409" height="5"/>
- </box>
- <segmentedControl verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Jb1-f1-iF3">
- <rect key="frame" x="48" y="228" width="314" height="24"/>
- <segmentedCell key="cell" borderStyle="border" alignment="left" style="rounded" trackingMode="selectOne" id="ZdJ-0F-LWH" customClass="VLCHUDSegmentedCell">
- <font key="font" metaFont="system"/>
- <segments>
- <segment label="Equalizer" selected="YES"/>
- <segment label="Compressor" tag="1"/>
- <segment label="Spatializer" tag="2"/>
- <segment label="Filter" tag="3"/>
- </segments>
- </segmentedCell>
- <connections>
- <action selector="takeSelectedTabViewItemFromSender:" target="80" id="NRc-hG-ZR6"/>
- </connections>
- </segmentedControl>
- <button fixedFrame="YES" mirrorLayoutDirectionWhenInternationalizing="always" translatesAutoresizingMaskIntoConstraints="NO" id="Dqv-cc-ZvK">
- <rect key="frame" x="233" y="9" width="158" height="18"/>
- <buttonCell key="cell" type="check" title="Apply profile at launch" bezelStyle="regularSquare" imagePosition="left" state="on" inset="2" id="fiO-IL-qum">
- <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
- <font key="font" metaFont="system"/>
- </buttonCell>
- <connections>
- <action selector="applyProfileCheckboxChanged:" target="-1" id="i9T-ah-Bfc"/>
- </connections>
- </button>
- <popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="701">
- <rect key="frame" x="47" y="6" width="68" height="22"/>
- <popUpButtonCell key="cell" type="push" title="Item 1" bezelStyle="rounded" alignment="left" controlSize="small" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" inset="2" selectedItem="706" id="702" customClass="VLCHUDPopUpButtonCell">
+ <popUpButton verticalHuggingPriority="750" horizontalCompressionResistancePriority="400" translatesAutoresizingMaskIntoConstraints="NO" id="701">
+ <rect key="frame" x="17" y="6" width="175" height="22"/>
+ <popUpButtonCell key="cell" type="push" bezelStyle="rounded" alignment="left" controlSize="small" lineBreakMode="truncatingTail" borderStyle="borderAndBezel" inset="2" id="702" customClass="VLCHUDPopUpButtonCell">
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="smallSystem"/>
<menu key="menu" title="OtherViews" id="703">
<items>
- <menuItem title="Item 1" state="on" id="706"/>
+ <menuItem title="Duplicate current profile ..." id="706"/>
<menuItem title="Item 2" id="705"/>
<menuItem title="Item 3" id="704"/>
</items>
@@ -1124,33 +1117,40 @@
<action selector="profileSelectorAction:" target="-2" id="uTq-Bz-2S2"/>
</connections>
</popUpButton>
+ <button horizontalHuggingPriority="200" mirrorLayoutDirectionWhenInternationalizing="always" translatesAutoresizingMaskIntoConstraints="NO" id="Dqv-cc-ZvK">
+ <rect key="frame" x="197" y="8" width="194" height="18"/>
+ <buttonCell key="cell" type="check" title="Apply profile at launch" bezelStyle="regularSquare" imagePosition="left" state="on" inset="2" id="fiO-IL-qum" customClass="VLCHUDCheckboxCell">
+ <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
+ <font key="font" metaFont="smallSystem"/>
+ </buttonCell>
+ <connections>
+ <action selector="applyProfileCheckboxChanged:" target="-1" id="i9T-ah-Bfc"/>
+ </connections>
+ </button>
</subviews>
<constraints>
+ <constraint firstItem="EuA-vb-mSS" firstAttribute="top" secondItem="Jb1-f1-iF3" secondAttribute="bottom" constant="7" id="1Dk-Se-O9n"/>
+ <constraint firstAttribute="trailing" secondItem="EuA-vb-mSS" secondAttribute="trailing" id="3DD-Mz-rx9"/>
<constraint firstItem="80" firstAttribute="leading" secondItem="2" secondAttribute="leading" constant="-8" id="IMR-wz-4Ly"/>
+ <constraint firstItem="701" firstAttribute="baseline" secondItem="Dqv-cc-ZvK" secondAttribute="baseline" id="Ing-Bb-jrf"/>
<constraint firstAttribute="bottom" secondItem="701" secondAttribute="bottom" constant="9" id="J0K-xv-xsb"/>
+ <constraint firstItem="EuA-vb-mSS" firstAttribute="leading" secondItem="2" secondAttribute="leading" id="JCm-1Y-Vhz"/>
<constraint firstAttribute="trailing" secondItem="80" secondAttribute="trailing" constant="-8" id="KUJ-ZT-T77"/>
<constraint firstAttribute="bottom" secondItem="80" secondAttribute="bottom" constant="35" id="OVV-Za-fCZ"/>
<constraint firstItem="Jb1-f1-iF3" firstAttribute="top" secondItem="2" secondAttribute="top" constant="4" id="ZTA-69-Rbc"/>
<constraint firstItem="80" firstAttribute="top" secondItem="2" secondAttribute="top" constant="31" id="cgf-qG-2Pl"/>
- <constraint firstItem="701" firstAttribute="leading" secondItem="2" secondAttribute="leading" constant="50" id="d4T-xa-vp3"/>
+ <constraint firstItem="701" firstAttribute="leading" secondItem="2" secondAttribute="leading" constant="20" id="d4T-xa-vp3"/>
<constraint firstItem="Jb1-f1-iF3" firstAttribute="centerX" secondItem="2" secondAttribute="centerX" id="iYo-cU-P4u"/>
+ <constraint firstItem="Dqv-cc-ZvK" firstAttribute="leading" secondItem="701" secondAttribute="trailing" constant="10" id="q0h-dX-1Mx"/>
+ <constraint firstAttribute="trailing" secondItem="Dqv-cc-ZvK" secondAttribute="trailing" constant="20" id="zuf-TG-8LG"/>
</constraints>
</view>
<point key="canvasLocation" x="138.5" y="162.5"/>
</window>
<userDefaultsController representsSharedInstance="YES" id="350"/>
- <button id="fcU-Hc-rUX">
- <rect key="frame" x="0.0" y="0.0" width="61" height="18"/>
- <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
- <buttonCell key="cell" type="check" title="Check" bezelStyle="regularSquare" imagePosition="left" state="on" inset="2" id="Bf3-XK-VMa">
- <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
- <font key="font" metaFont="system"/>
- </buttonCell>
- <point key="canvasLocation" x="288.5" y="277"/>
- </button>
</objects>
<resources>
- <image name="8CA0F5B3-0A34-4969-9EEF-735FB0ACB80D" width="1" height="1">
+ <image name="20A2CD53-3C79-47D9-970B-DB16D0175EF5" width="1" height="1">
<mutableData key="keyedArchiveRepresentation">
YnBsaXN0MDDUAQIDBAUGPT5YJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3ASAAGGoK4HCBMU
GR4fIyQrLjE3OlUkbnVsbNUJCgsMDQ4PEBESVk5TU2l6ZVYkY2xhc3NcTlNJbWFnZUZsYWdzVk5TUmVw
@@ -1191,7 +1191,7 @@ B04HVwdcB2QHZwdsB3sHfweGB44HmwegB6IHpAepB7EHtAe5B8EHxAfWB9kH3gAAAAAAAAIBAAAAAAAA
AEEAAAAAAAAAAAAAAAAAAAfgA
</mutableData>
</image>
- <image name="A676079A-9DD6-4E5F-AFE2-377CBEDF6200" width="1" height="1">
+ <image name="FE02FB57-922F-4AD2-BC53-03C973975F99" width="1" height="1">
<mutableData key="keyedArchiveRepresentation">
YnBsaXN0MDDUAQIDBAUGPT5YJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3ASAAGGoK4HCBMU
GR4fIyQrLjE3OlUkbnVsbNUJCgsMDQ4PEBESVk5TU2l6ZVYkY2xhc3NcTlNJbWFnZUZsYWdzVk5TUmVw
diff --git a/modules/gui/macosx/UI/VideoEffects.xib b/modules/gui/macosx/UI/VideoEffects.xib
index c5082f620c..656ddbf2d2 100644
--- a/modules/gui/macosx/UI/VideoEffects.xib
+++ b/modules/gui/macosx/UI/VideoEffects.xib
@@ -127,6 +127,31 @@
<rect key="frame" x="0.0" y="0.0" width="642" height="274"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
+ <segmentedControl verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="PmS-HT-UdA">
+ <rect key="frame" x="147" y="246" width="352" height="24"/>
+ <constraints>
+ <constraint firstAttribute="height" constant="21" id="9aO-Gu-WkU"/>
+ </constraints>
+ <segmentedCell key="cell" borderStyle="border" alignment="left" style="rounded" trackingMode="selectOne" id="l7E-0O-cd7" customClass="VLCHUDSegmentedCell">
+ <font key="font" metaFont="system"/>
+ <segments>
+ <segment label="Basic" selected="YES"/>
+ <segment label="Crop" tag="1"/>
+ <segment label="Geometry" tag="2"/>
+ <segment label="Color" tag="3"/>
+ <segment label="Miscellaneous" tag="4"/>
+ </segments>
+ </segmentedCell>
+ <connections>
+ <action selector="takeSelectedTabViewItemFromSender:" target="3" id="lDP-xP-F9v"/>
+ </connections>
+ </segmentedControl>
+ <box verticalHuggingPriority="750" boxType="separator" translatesAutoresizingMaskIntoConstraints="NO" id="jys-n2-OlJ">
+ <rect key="frame" x="0.0" y="238" width="642" height="5"/>
+ <constraints>
+ <constraint firstAttribute="height" constant="1" id="La9-tY-5he"/>
+ </constraints>
+ </box>
<tabView drawsBackground="NO" type="noTabsNoBorder" translatesAutoresizingMaskIntoConstraints="NO" id="3">
<rect key="frame" x="-1" y="35" width="644" height="197"/>
<font key="font" metaFont="system"/>
@@ -1738,13 +1763,13 @@
</tabViewItems>
</tabView>
<popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="720">
- <rect key="frame" x="287" y="6" width="68" height="22"/>
- <popUpButtonCell key="cell" type="push" title="Item 1" bezelStyle="rounded" alignment="left" controlSize="small" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" inset="2" selectedItem="723" id="721" customClass="VLCHUDPopUpButtonCell">
+ <rect key="frame" x="234" y="6" width="175" height="22"/>
+ <popUpButtonCell key="cell" type="push" bezelStyle="rounded" alignment="left" controlSize="small" lineBreakMode="truncatingTail" borderStyle="borderAndBezel" inset="2" id="721" customClass="VLCHUDPopUpButtonCell">
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="smallSystem"/>
<menu key="menu" title="OtherViews" id="722">
<items>
- <menuItem title="Item 1" state="on" id="723"/>
+ <menuItem title="Duplicate current profile ..." id="723"/>
<menuItem title="Item 2" id="724"/>
<menuItem title="Item 3" id="725"/>
</items>
@@ -1754,36 +1779,11 @@
<action selector="profileSelectorAction:" target="-2" id="Kw0-Rg-y67"/>
</connections>
</popUpButton>
- <segmentedControl verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="PmS-HT-UdA">
- <rect key="frame" x="147" y="246" width="352" height="24"/>
- <constraints>
- <constraint firstAttribute="height" constant="21" id="9aO-Gu-WkU"/>
- </constraints>
- <segmentedCell key="cell" borderStyle="border" alignment="left" style="rounded" trackingMode="selectOne" id="l7E-0O-cd7" customClass="VLCHUDSegmentedCell">
- <font key="font" metaFont="system"/>
- <segments>
- <segment label="Basic" selected="YES"/>
- <segment label="Crop" tag="1"/>
- <segment label="Geometry" tag="2"/>
- <segment label="Color" tag="3"/>
- <segment label="Miscellaneous" tag="4"/>
- </segments>
- </segmentedCell>
- <connections>
- <action selector="takeSelectedTabViewItemFromSender:" target="3" id="lDP-xP-F9v"/>
- </connections>
- </segmentedControl>
- <box verticalHuggingPriority="750" boxType="separator" translatesAutoresizingMaskIntoConstraints="NO" id="jys-n2-OlJ">
- <rect key="frame" x="0.0" y="238" width="642" height="5"/>
- <constraints>
- <constraint firstAttribute="height" constant="1" id="La9-tY-5he"/>
- </constraints>
- </box>
- <button fixedFrame="YES" mirrorLayoutDirectionWhenInternationalizing="always" translatesAutoresizingMaskIntoConstraints="NO" id="ABI-av-fGB">
- <rect key="frame" x="466" y="9" width="158" height="18"/>
- <buttonCell key="cell" type="check" title="Apply profile at launch" bezelStyle="regularSquare" imagePosition="left" inset="2" id="8uO-gi-iv5">
+ <button horizontalHuggingPriority="200" mirrorLayoutDirectionWhenInternationalizing="always" translatesAutoresizingMaskIntoConstraints="NO" id="ABI-av-fGB">
+ <rect key="frame" x="414" y="8" width="210" height="18"/>
+ <buttonCell key="cell" type="check" title="Apply profile at launch" bezelStyle="regularSquare" imagePosition="left" inset="2" id="8uO-gi-iv5" customClass="VLCHUDCheckboxCell">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
- <font key="font" metaFont="system"/>
+ <font key="font" metaFont="smallSystem"/>
</buttonCell>
<connections>
<action selector="applyProfileCheckboxChanged:" target="-1" id="9PJ-xF-qBh"/>
@@ -1798,6 +1798,9 @@
<constraint firstItem="jys-n2-OlJ" firstAttribute="top" secondItem="PmS-HT-UdA" secondAttribute="bottom" constant="7" id="AUf-ez-t4g"/>
<constraint firstItem="3" firstAttribute="top" secondItem="2" secondAttribute="top" constant="42" id="CDC-fg-sWo"/>
<constraint firstItem="3" firstAttribute="leading" secondItem="2" secondAttribute="leading" constant="-1" id="CVD-Zn-f0c"/>
+ <constraint firstItem="720" firstAttribute="baseline" secondItem="ABI-av-fGB" secondAttribute="baseline" id="ZKi-Ze-hg8"/>
+ <constraint firstAttribute="trailing" secondItem="ABI-av-fGB" secondAttribute="trailing" constant="20" id="aSv-tb-7pU"/>
+ <constraint firstItem="ABI-av-fGB" firstAttribute="leading" secondItem="720" secondAttribute="trailing" constant="10" id="ada-Cu-udF"/>
<constraint firstItem="jys-n2-OlJ" firstAttribute="leading" secondItem="2" secondAttribute="leading" id="enn-VY-kt7"/>
<constraint firstAttribute="bottom" secondItem="720" secondAttribute="bottom" constant="9" id="kdJ-1Z-QDw"/>
<constraint firstItem="PmS-HT-UdA" firstAttribute="centerX" secondItem="2" secondAttribute="centerX" constant="2" id="mLU-YV-qlE"/>
More information about the vlc-commits
mailing list