summaryrefslogtreecommitdiffstats
path: root/macosx
diff options
context:
space:
mode:
authorDamiano Galassi <[email protected]>2020-09-28 14:53:50 +0200
committerDamiano Galassi <[email protected]>2020-09-28 14:53:50 +0200
commite9ed112a73e26f1636cf4c3e4ab7860fe125ce31 (patch)
tree350d2797855aec887eff96296c1b1892e02b2799 /macosx
parent32474ffae290dd82f233fe62d2dc39c47693e7a7 (diff)
MacGui: remove the modulus popup button.
Diffstat (limited to 'macosx')
-rw-r--r--macosx/Base.lproj/HBPictureViewController.xib72
-rw-r--r--macosx/Base.lproj/PictureSettings.xib94
-rw-r--r--macosx/HBPicture+UIAdditions.m1
-rw-r--r--macosx/HBPicture.h1
-rw-r--r--macosx/HBPicture.m37
-rw-r--r--macosx/HBPictureController.m8
-rw-r--r--macosx/HBPictureViewController.m30
7 files changed, 49 insertions, 194 deletions
diff --git a/macosx/Base.lproj/HBPictureViewController.xib b/macosx/Base.lproj/HBPictureViewController.xib
index 3faa459c8..23bda5723 100644
--- a/macosx/Base.lproj/HBPictureViewController.xib
+++ b/macosx/Base.lproj/HBPictureViewController.xib
@@ -20,10 +20,10 @@
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<subviews>
<stackView distribution="equalSpacing" orientation="horizontal" alignment="top" spacing="23" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="OFE-0G-Zqz">
- <rect key="frame" x="20" y="154" width="736" height="167"/>
+ <rect key="frame" x="20" y="178" width="736" height="143"/>
<subviews>
<stackView distribution="fill" orientation="vertical" alignment="leading" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="zU5-gT-j2i">
- <rect key="frame" x="0.0" y="39" width="222" height="128"/>
+ <rect key="frame" x="0.0" y="15" width="222" height="128"/>
<subviews>
<stackView distribution="fill" orientation="horizontal" alignment="firstBaseline" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Uev-zj-FIR">
<rect key="frame" x="0.0" y="112" width="163" height="16"/>
@@ -433,10 +433,10 @@
</customSpacing>
</stackView>
<stackView distribution="fill" orientation="vertical" alignment="leading" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="3sU-eh-1ja">
- <rect key="frame" x="245" y="0.0" width="252" height="167"/>
+ <rect key="frame" x="245" y="0.0" width="252" height="143"/>
<subviews>
<stackView distribution="fill" orientation="horizontal" alignment="firstBaseline" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="uO6-48-Dmb">
- <rect key="frame" x="0.0" y="151" width="223" height="16"/>
+ <rect key="frame" x="0.0" y="127" width="223" height="16"/>
<subviews>
<textField horizontalHuggingPriority="752" verticalHuggingPriority="750" horizontalCompressionResistancePriority="752" preferredMaxLayoutWidth="300" translatesAutoresizingMaskIntoConstraints="NO" id="PJL-Y6-9ZV">
<rect key="frame" x="-2" y="2" width="92" height="14"/>
@@ -468,12 +468,12 @@
</menu>
</popUpButtonCell>
<connections>
- <binding destination="-2" name="selectedTag" keyPath="self.picture.resolutionLimitMode" id="rWA-EQ-pdm"/>
<binding destination="-2" name="enabled" keyPath="self.picture" id="Hqh-h4-HtI">
<dictionary key="options">
<string key="NSValueTransformerName">NSIsNotNil</string>
</dictionary>
</binding>
+ <binding destination="-2" name="selectedTag" keyPath="self.picture.resolutionLimitMode" id="rWA-EQ-pdm"/>
</connections>
</popUpButton>
</subviews>
@@ -487,7 +487,7 @@
</customSpacing>
</stackView>
<stackView distribution="fill" orientation="horizontal" alignment="centerY" spacing="7" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="QW6-1e-ZMT">
- <rect key="frame" x="96" y="124" width="128" height="19"/>
+ <rect key="frame" x="96" y="100" width="128" height="19"/>
<subviews>
<textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="NRy-vc-8qX">
<rect key="frame" x="0.0" y="0.0" width="54" height="19"/>
@@ -547,7 +547,7 @@
</connections>
</stackView>
<stackView distribution="fill" orientation="horizontal" alignment="firstBaseline" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="9ZE-cV-x9d">
- <rect key="frame" x="0.0" y="97" width="252" height="19"/>
+ <rect key="frame" x="0.0" y="73" width="252" height="19"/>
<subviews>
<textField horizontalHuggingPriority="751" verticalHuggingPriority="750" horizontalCompressionResistancePriority="752" allowsCharacterPickerTouchBarItem="YES" preferredMaxLayoutWidth="300" translatesAutoresizingMaskIntoConstraints="NO" id="9oG-zm-Y0W">
<rect key="frame" x="-2" y="2" width="92" height="14"/>
@@ -689,7 +689,7 @@
</customSpacing>
</stackView>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="6G0-MW-iVa">
- <rect key="frame" x="95" y="74" width="118" height="16"/>
+ <rect key="frame" x="95" y="50" width="118" height="16"/>
<string key="toolTip">Keep Aspect Ratio maintains the original display aspect of the source. Disabling this may result in a stretched or squeezed picture.</string>
<buttonCell key="cell" type="check" title="Keep Aspect Ratio" bezelStyle="regularSquare" imagePosition="left" alignment="left" controlSize="small" inset="2" id="hcF-CZ-p0E">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
@@ -709,55 +709,6 @@
<binding destination="-2" name="enabled" keyPath="self.picture.keepDisplayAspectEditable" id="6Hg-VH-mTD"/>
</connections>
</button>
- <stackView distribution="fill" orientation="horizontal" alignment="firstBaseline" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="nkM-x5-0gf">
- <rect key="frame" x="0.0" y="51" width="135" height="16"/>
- <subviews>
- <textField horizontalHuggingPriority="751" verticalHuggingPriority="750" horizontalCompressionResistancePriority="752" allowsCharacterPickerTouchBarItem="YES" preferredMaxLayoutWidth="300" translatesAutoresizingMaskIntoConstraints="NO" id="tHY-g2-oWj">
- <rect key="frame" x="-2" y="2" width="92" height="14"/>
- <textFieldCell key="cell" controlSize="small" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="Modulus:" id="jXn-fo-wNU">
- <font key="font" metaFont="smallSystem"/>
- <color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
- <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
- </textFieldCell>
- <connections>
- <binding destination="-2" name="textColor" keyPath="self.labelColor" id="fh5-vf-5Tr"/>
- </connections>
- </textField>
- <popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="ns0-ar-I7c">
- <rect key="frame" x="92" y="-4" width="47" height="22"/>
- <string key="toolTip">Ensure storage dimensions are multiples of this value. Higher values are only necessary for compatibility with certain legacy devices. Set to 2 unless you have a specific compatibility concern.</string>
- <popUpButtonCell key="cell" type="push" bezelStyle="rounded" alignment="left" controlSize="small" lineBreakMode="truncatingTail" borderStyle="borderAndBezel" inset="2" id="H0L-sP-ky8">
- <behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
- <font key="font" metaFont="smallSystem"/>
- <menu key="menu" title="OtherViews" id="und-OA-MLn">
- <items>
- <menuItem title="16" id="uTT-yC-MFJ"/>
- <menuItem title="8" id="Lbl-i2-YJg"/>
- <menuItem title="4" id="MgF-Gw-0fD"/>
- <menuItem title="2" id="OWb-6v-ggg"/>
- </items>
- </menu>
- </popUpButtonCell>
- <connections>
- <accessibilityConnection property="title" destination="tHY-g2-oWj" id="SpR-VQ-gX1"/>
- <binding destination="-2" name="enabled" keyPath="self.picture" id="haa-fs-kQM">
- <dictionary key="options">
- <string key="NSValueTransformerName">NSIsNotNil</string>
- </dictionary>
- </binding>
- <binding destination="-2" name="selectedValue" keyPath="self.picture.modulus" id="lCQ-i3-hQ0"/>
- </connections>
- </popUpButton>
- </subviews>
- <visibilityPriorities>
- <integer value="1000"/>
- <integer value="1000"/>
- </visibilityPriorities>
- <customSpacing>
- <real value="3.4028234663852886e+38"/>
- <real value="3.4028234663852886e+38"/>
- </customSpacing>
- </stackView>
<stackView distribution="fill" orientation="horizontal" alignment="firstBaseline" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="gTO-xc-fNR">
<rect key="frame" x="0.0" y="27" width="163" height="16"/>
<subviews>
@@ -909,9 +860,8 @@ Custom allows manually setting all parameters. Useful for correcting an incorrec
</stackView>
</subviews>
<constraints>
- <constraint firstItem="tHY-g2-oWj" firstAttribute="width" secondItem="JBo-0E-AsU" secondAttribute="width" id="6lD-aK-oFZ"/>
<constraint firstItem="PJL-Y6-9ZV" firstAttribute="width" secondItem="9oG-zm-Y0W" secondAttribute="width" id="AUU-G1-gDf"/>
- <constraint firstItem="9oG-zm-Y0W" firstAttribute="width" secondItem="tHY-g2-oWj" secondAttribute="width" id="h5I-0o-EV0"/>
+ <constraint firstItem="JBo-0E-AsU" firstAttribute="width" secondItem="9oG-zm-Y0W" secondAttribute="width" id="NjT-Pg-miH"/>
<constraint firstItem="JBo-0E-AsU" firstAttribute="width" secondItem="hei-Cd-vcN" secondAttribute="width" id="lic-qU-sk5"/>
<constraint firstItem="QW6-1e-ZMT" firstAttribute="leading" secondItem="the-i1-S1D" secondAttribute="leading" id="npA-3w-7jD"/>
<constraint firstItem="6G0-MW-iVa" firstAttribute="leading" secondItem="9oG-zm-Y0W" secondAttribute="trailing" constant="8" id="pct-5r-gab"/>
@@ -923,7 +873,6 @@ Custom allows manually setting all parameters. Useful for correcting an incorrec
<integer value="1000"/>
<integer value="1000"/>
<integer value="1000"/>
- <integer value="1000"/>
</visibilityPriorities>
<customSpacing>
<real value="3.4028234663852886e+38"/>
@@ -932,11 +881,10 @@ Custom allows manually setting all parameters. Useful for correcting an incorrec
<real value="3.4028234663852886e+38"/>
<real value="3.4028234663852886e+38"/>
<real value="3.4028234663852886e+38"/>
- <real value="3.4028234663852886e+38"/>
</customSpacing>
</stackView>
<stackView distribution="fill" orientation="vertical" alignment="leading" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="EGb-Zz-WQd">
- <rect key="frame" x="520" y="32" width="216" height="135"/>
+ <rect key="frame" x="520" y="8" width="216" height="135"/>
<subviews>
<stackView distribution="fill" orientation="horizontal" alignment="firstBaseline" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="i16-mF-pVp">
<rect key="frame" x="0.0" y="119" width="195" height="16"/>
diff --git a/macosx/Base.lproj/PictureSettings.xib b/macosx/Base.lproj/PictureSettings.xib
index e9bd2fb93..a0e98160a 100644
--- a/macosx/Base.lproj/PictureSettings.xib
+++ b/macosx/Base.lproj/PictureSettings.xib
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none">
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="17503.1" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<dependencies>
<deployment identifier="macosx"/>
- <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="14490.70"/>
+ <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="17503.1"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
@@ -22,16 +22,16 @@
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" utility="YES" HUD="YES"/>
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
<rect key="contentRect" x="152" y="1024" width="648" height="148"/>
- <rect key="screenRect" x="0.0" y="0.0" width="2560" height="1418"/>
+ <rect key="screenRect" x="0.0" y="0.0" width="1440" height="875"/>
<view key="contentView" wantsLayer="YES" id="6">
<rect key="frame" x="0.0" y="0.0" width="648" height="148"/>
<autoresizingMask key="autoresizingMask"/>
<userGuides>
<userLayoutGuide affinity="minY"/>
- <userLayoutGuide location="115" affinity="minX"/>
+ <userLayoutGuide location="116" affinity="minX"/>
</userGuides>
<subviews>
- <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" id="XmO-LR-1DQ">
+ <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="XmO-LR-1DQ">
<rect key="frame" x="257" y="61" width="120" height="17"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Nothing to inspect" id="buq-K6-Wvy">
@@ -47,14 +47,14 @@
</binding>
</connections>
</textField>
- <box borderType="none" title="Box" titlePosition="noTitle" id="436">
+ <box fixedFrame="YES" borderType="none" title="Box" titlePosition="noTitle" translatesAutoresizingMaskIntoConstraints="NO" id="436">
<rect key="frame" x="17" y="5" width="358" height="126"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<view key="contentView" id="izI-da-gGT">
<rect key="frame" x="0.0" y="0.0" width="358" height="126"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
- <textField verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" id="402">
+ <textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" fixedFrame="YES" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="402">
<rect key="frame" x="192" y="106" width="82" height="16"/>
<autoresizingMask key="autoresizingMask"/>
<textFieldCell key="cell" controlSize="small" sendsActionOnEndEditing="YES" alignment="right" title="Display Width:" id="403">
@@ -70,7 +70,7 @@
</binding>
</connections>
</textField>
- <textField verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" id="440">
+ <textField verticalHuggingPriority="750" fixedFrame="YES" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="440">
<rect key="frame" x="278" y="81" width="37" height="16"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<textFieldCell key="cell" controlSize="mini" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" alignment="left" drawsBackground="YES" id="441">
@@ -94,7 +94,7 @@
<binding destination="-2" name="value" keyPath="self.picture.parWidth" id="PXg-GA-vo6"/>
</connections>
</textField>
- <textField verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" id="442">
+ <textField verticalHuggingPriority="750" fixedFrame="YES" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="442">
<rect key="frame" x="278" y="56" width="37" height="16"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<textFieldCell key="cell" controlSize="mini" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" alignment="left" drawsBackground="YES" id="443">
@@ -118,7 +118,7 @@
<binding destination="-2" name="value" keyPath="self.picture.parHeight" id="HrI-5d-evg"/>
</connections>
</textField>
- <textField verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" id="444">
+ <textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" fixedFrame="YES" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="444">
<rect key="frame" x="207" y="81" width="67" height="16"/>
<autoresizingMask key="autoresizingMask"/>
<textFieldCell key="cell" controlSize="small" sendsActionOnEndEditing="YES" alignment="right" title="PAR Width:" id="445">
@@ -134,7 +134,7 @@
</binding>
</connections>
</textField>
- <textField verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" id="446">
+ <textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" fixedFrame="YES" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="446">
<rect key="frame" x="202" y="56" width="71" height="16"/>
<autoresizingMask key="autoresizingMask"/>
<textFieldCell key="cell" controlSize="small" sendsActionOnEndEditing="YES" alignment="right" title="PAR Height:" id="447">
@@ -150,7 +150,7 @@
</binding>
</connections>
</textField>
- <stepper horizontalHuggingPriority="750" verticalHuggingPriority="750" id="44">
+ <stepper horizontalHuggingPriority="750" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="44">
<rect key="frame" x="143" y="103" width="15" height="22"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<stepperCell key="cell" controlSize="small" continuous="YES" alignment="left" increment="16" minValue="64" maxValue="59" doubleValue="64" id="169">
@@ -161,26 +161,7 @@
<binding destination="-2" name="value" keyPath="self.picture.width" previousBinding="P3g-UC-vRH" id="Ilz-OP-M5c"/>
</connections>
</stepper>
- <popUpButton verticalHuggingPriority="750" id="384">
- <rect key="frame" x="75" y="15" width="46" height="15"/>
- <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
- <popUpButtonCell key="cell" type="push" title="4" bezelStyle="rounded" alignment="left" controlSize="mini" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" inset="2" selectedItem="389" id="385">
- <behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
- <font key="font" metaFont="miniSystem"/>
- <menu key="menu" title="OtherViews" id="386">
- <items>
- <menuItem title="16" id="387"/>
- <menuItem title="8" id="388"/>
- <menuItem title="4" state="on" id="389"/>
- <menuItem title="2" id="Fx1-DI-r18"/>
- </items>
- </menu>
- </popUpButtonCell>
- <connections>
- <binding destination="-2" name="selectedValue" keyPath="self.picture.modulus" id="anc-Ha-mxE"/>
- </connections>
- </popUpButton>
- <textField verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" id="42">
+ <textField verticalHuggingPriority="750" fixedFrame="YES" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="42">
<rect key="frame" x="76" y="107" width="62" height="16"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<textFieldCell key="cell" controlSize="mini" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" alignment="left" drawsBackground="YES" id="167">
@@ -198,10 +179,10 @@
</binding>
</connections>
</textField>
- <stepper horizontalHuggingPriority="750" verticalHuggingPriority="750" id="46">
+ <stepper horizontalHuggingPriority="750" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="46">
<rect key="frame" x="143" y="78" width="15" height="22"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
- <stepperCell key="cell" controlSize="small" continuous="YES" alignment="left" increment="16" minValue="64" maxValue="59" doubleValue="59" id="171">
+ <stepperCell key="cell" controlSize="small" continuous="YES" alignment="left" increment="16" minValue="64" maxValue="59" doubleValue="64" id="171">
<font key="font" metaFont="smallSystem"/>
</stepperCell>
<connections>
@@ -209,7 +190,7 @@
<binding destination="-2" name="maxValue" keyPath="self.picture.maxHeight" id="nJk-wN-aaB"/>
</connections>
</stepper>
- <textField verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" id="138">
+ <textField verticalHuggingPriority="750" fixedFrame="YES" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="138">
<rect key="frame" x="-1" y="38" width="73" height="14"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<textFieldCell key="cell" controlSize="small" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="Anamorphic:" id="174">
@@ -218,7 +199,7 @@
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
- <textField verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" id="41">
+ <textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" fixedFrame="YES" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="41">
<rect key="frame" x="-1" y="82" width="73" height="14"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<textFieldCell key="cell" controlSize="small" sendsActionOnEndEditing="YES" alignment="right" title="Height:" id="166">
@@ -227,7 +208,7 @@
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
- <popUpButton verticalHuggingPriority="750" id="132">
+ <popUpButton verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="132">
<rect key="frame" x="75" y="38" width="80" height="15"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<popUpButtonCell key="cell" type="push" title="Off" bezelStyle="rounded" alignment="left" controlSize="mini" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" inset="2" selectedItem="135" id="173">
@@ -246,16 +227,7 @@
<binding destination="-2" name="selectedTag" keyPath="self.picture.anamorphicMode" id="edu-WH-uPF"/>
</connections>
</popUpButton>
- <textField verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" id="390">
- <rect key="frame" x="19" y="15" width="53" height="14"/>
- <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
- <textFieldCell key="cell" controlSize="small" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="Modulus:" id="391">
- <font key="font" metaFont="smallSystem"/>
- <color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
- <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
- </textFieldCell>
- </textField>
- <textField verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" id="47">
+ <textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" fixedFrame="YES" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="47">
<rect key="frame" x="-1" y="108" width="71" height="14"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<textFieldCell key="cell" controlSize="small" sendsActionOnEndEditing="YES" alignment="right" title="Width:" id="172">
@@ -264,7 +236,7 @@
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
- <textField verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" id="43">
+ <textField verticalHuggingPriority="750" fixedFrame="YES" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="43">
<rect key="frame" x="76" y="81" width="62" height="16"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<textFieldCell key="cell" controlSize="mini" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" alignment="left" drawsBackground="YES" id="168">
@@ -282,7 +254,7 @@
</binding>
</connections>
</textField>
- <button id="45">
+ <button fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="45">
<rect key="frame" x="73" y="57" width="125" height="18"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<buttonCell key="cell" type="check" title="Keep Aspect Ratio" bezelStyle="regularSquare" imagePosition="left" alignment="left" controlSize="small" inset="2" id="170">
@@ -294,7 +266,7 @@
<binding destination="-2" name="enabled" keyPath="self.picture.keepDisplayAspectEditable" id="DSI-Ra-G0d"/>
</connections>
</button>
- <textField verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" id="396">
+ <textField verticalHuggingPriority="750" fixedFrame="YES" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="396">
<rect key="frame" x="278" y="106" width="61" height="16"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<textFieldCell key="cell" controlSize="mini" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" alignment="left" drawsBackground="YES" id="397">
@@ -328,14 +300,14 @@
</binding>
</connections>
</box>
- <box borderType="none" titlePosition="noTitle" id="7">
+ <box fixedFrame="YES" borderType="none" titlePosition="noTitle" translatesAutoresizingMaskIntoConstraints="NO" id="7">
<rect key="frame" x="377" y="5" width="254" height="126"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<view key="contentView" id="tBW-2g-t2L">
<rect key="frame" x="0.0" y="0.0" width="254" height="126"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
- <stepper horizontalHuggingPriority="750" verticalHuggingPriority="750" id="12">
+ <stepper horizontalHuggingPriority="750" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="12">
<rect key="frame" x="169" y="55" width="15" height="22"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<stepperCell key="cell" controlSize="small" continuous="YES" alignment="left" increment="2" maxValue="59" id="152">
@@ -351,7 +323,7 @@
<binding destination="-2" name="maxValue" keyPath="self.picture.maxTopCrop" id="Kft-ci-UbK"/>
</connections>
</stepper>
- <stepper horizontalHuggingPriority="750" verticalHuggingPriority="750" id="15">
+ <stepper horizontalHuggingPriority="750" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="15">
<rect key="frame" x="232" y="45" width="15" height="22"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<stepperCell key="cell" controlSize="small" continuous="YES" alignment="left" increment="2" maxValue="59" id="155">
@@ -367,7 +339,7 @@
<binding destination="-2" name="maxValue" keyPath="self.picture.maxRightCrop" id="Fyc-RI-h9A"/>
</connections>
</stepper>
- <matrix verticalHuggingPriority="750" allowsEmptySelection="NO" autosizesCells="NO" id="16">
+ <matrix verticalHuggingPriority="750" fixedFrame="YES" allowsEmptySelection="NO" autosizesCells="NO" translatesAutoresizingMaskIntoConstraints="NO" id="16">
<rect key="frame" x="64" y="84" width="190" height="43"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
@@ -397,7 +369,7 @@
</binding>
</connections>
</matrix>
- <textField verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" id="13">
+ <textField verticalHuggingPriority="750" fixedFrame="YES" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="13">
<rect key="frame" x="131" y="58" width="36" height="16"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" controlSize="mini" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" alignment="left" drawsBackground="YES" id="153">
@@ -419,7 +391,7 @@
</binding>
</connections>
</textField>
- <textField verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" id="10">
+ <textField verticalHuggingPriority="750" fixedFrame="YES" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="10">
<rect key="frame" x="131" y="31" width="36" height="16"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" controlSize="mini" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" alignment="left" drawsBackground="YES" id="150">
@@ -441,7 +413,7 @@
</binding>
</connections>
</textField>
- <stepper horizontalHuggingPriority="750" verticalHuggingPriority="750" id="19">
+ <stepper horizontalHuggingPriority="750" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="19">
<rect key="frame" x="110" y="46" width="15" height="22"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<stepperCell key="cell" controlSize="small" continuous="YES" alignment="left" increment="2" maxValue="59" id="156">
@@ -457,7 +429,7 @@
<binding destination="-2" name="maxValue" keyPath="self.picture.maxLeftCrop" id="CcF-LX-2Wg"/>
</connections>
</stepper>
- <textField verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" id="11">
+ <textField verticalHuggingPriority="750" fixedFrame="YES" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="11">
<rect key="frame" x="72" y="49" width="36" height="16"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" controlSize="mini" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" alignment="left" drawsBackground="YES" id="151">
@@ -479,7 +451,7 @@
</binding>
</connections>
</textField>
- <stepper horizontalHuggingPriority="750" verticalHuggingPriority="750" id="14">
+ <stepper horizontalHuggingPriority="750" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="14">
<rect key="frame" x="169" y="28" width="15" height="22"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<stepperCell key="cell" controlSize="small" continuous="YES" alignment="left" increment="2" maxValue="59" id="154">
@@ -495,7 +467,7 @@
<binding destination="-2" name="maxValue" keyPath="self.picture.maxBottomCrop" id="YKW-no-4sN"/>
</connections>
</stepper>
- <textField verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" id="382">
+ <textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" fixedFrame="YES" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="382">
<rect key="frame" x="3" y="107" width="59" height="17"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" sendsActionOnEndEditing="YES" alignment="right" title="Cropping:" id="383">
@@ -504,7 +476,7 @@
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
- <textField verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" id="9">
+ <textField verticalHuggingPriority="750" fixedFrame="YES" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="9">
<rect key="frame" x="194" y="48" width="36" height="16"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" controlSize="mini" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" alignment="left" drawsBackground="YES" id="149">
diff --git a/macosx/HBPicture+UIAdditions.m b/macosx/HBPicture+UIAdditions.m
index bc9403d79..5c3b9b983 100644
--- a/macosx/HBPicture+UIAdditions.m
+++ b/macosx/HBPicture+UIAdditions.m
@@ -137,7 +137,6 @@
{
NSMutableString *summary = [NSMutableString stringWithString:@""];
[summary appendString:self.info];
- [summary appendFormat:HBKitLocalizedString(@", Modulus: %d", @"HBPicture -> summary"), self.modulus];
[summary appendFormat:HBKitLocalizedString(@", Crop: %@ %d/%d/%d/%d", @"HBPicture -> summary"),
self.autocrop ? HBKitLocalizedString(@"Auto", @"HBPicture -> summary") : HBKitLocalizedString(@"Custom", @"HBPicture -> summary"),
self.cropTop, self.cropBottom,
diff --git a/macosx/HBPicture.h b/macosx/HBPicture.h
index adc7a0b4b..925bad615 100644
--- a/macosx/HBPicture.h
+++ b/macosx/HBPicture.h
@@ -69,7 +69,6 @@ extern NSString * const HBPictureChangedNotification;
@property (nonatomic, readwrite) BOOL keepDisplayAspect;
@property (nonatomic, readwrite) HBPictureAnarmophicMode anamorphicMode;
-@property (nonatomic, readwrite) int modulus;
/**
* Custom anamorphic settings
diff --git a/macosx/HBPicture.m b/macosx/HBPicture.m
index 1ba541542..f480aef1d 100644
--- a/macosx/HBPicture.m
+++ b/macosx/HBPicture.m
@@ -20,6 +20,8 @@ NSString * const HBPictureChangedNotification = @"HBPictureChangedNotification";
@property (nonatomic, readwrite, getter=isValidating) BOOL validating;
@property (nonatomic, readwrite, getter=areNotificationsEnabled) BOOL notificationsEnabled;
+@property (nonatomic, readonly) int modulus;
+
@property (nonatomic, readwrite) int keep;
@property (nonatomic, readwrite) BOOL darUpdated;
@@ -51,7 +53,6 @@ NSString * const HBPictureChangedNotification = @"HBPictureChangedNotification";
_sourceHeight = 1080;
_anamorphicMode = HBPictureAnarmophicModeNone;
- _modulus = 2;
_paddingMode = HBPicturePaddingModeNone;
_paddingColorMode = HBPicturePaddingColorModeBlack;
@@ -605,17 +606,9 @@ NSString * const HBPictureChangedNotification = @"HBPictureChangedNotification";
}
}
-- (void)setModulus:(int)modulus
+- (int)modulus
{
- if (modulus != _modulus)
- {
- [[self.undo prepareWithInvocationTarget:self] setModulus:_modulus];
- }
- _modulus = modulus;
- if (!self.isValidating)
- {
- [self validateSettings];
- }
+ return 2;
}
#pragma mark - Max sizes
@@ -823,7 +816,6 @@ NSString * const HBPictureChangedNotification = @"HBPictureChangedNotification";
copy->_keepDisplayAspect = _keepDisplayAspect;
copy->_anamorphicMode = _anamorphicMode;
- copy->_modulus = _modulus;
copy->_displayWidth = _displayWidth;
copy->_parWidth = _parWidth;
@@ -881,7 +873,6 @@ NSString * const HBPictureChangedNotification = @"HBPictureChangedNotification";
encodeBool(_keepDisplayAspect);
encodeInteger(_anamorphicMode);
- encodeInt(_modulus);
encodeInt(_displayWidth);
encodeInt(_parWidth);
@@ -937,8 +928,6 @@ NSString * const HBPictureChangedNotification = @"HBPictureChangedNotification";
goto fail;
}
- decodeInt(_modulus); if (_modulus < 2 || _modulus > 16) { goto fail; }
-
decodeInt(_displayWidth); if (_displayWidth < 0) { goto fail; }
decodeInt(_parWidth); if (_parWidth < 0) { goto fail; }
decodeInt(_parHeight); if (_parHeight < 0) { goto fail; }
@@ -993,7 +982,6 @@ fail:
preset[@"PictureHeight"] = @(self.maxHeight);
preset[@"PictureKeepRatio"] = @(self.keepDisplayAspect);
- preset[@"PictureModulus"] = @(self.modulus);
switch (self.anamorphicMode) {
case HB_ANAMORPHIC_NONE:
@@ -1081,7 +1069,7 @@ fail:
}
else if (self.maxWidth == 720 && self.maxHeight == 480)
{
- self.resolutionLimitMode = HBPictureResolutionLimitMode576p;
+ self.resolutionLimitMode = HBPictureResolutionLimitMode480p;
}
else
{
@@ -1116,21 +1104,6 @@ fail:
self.cropRight = [preset[@"PictureRightCrop"] intValue];
}
- // Set modulus
- if (preset[@"PictureModulus"])
- {
- self.modulus = [preset[@"PictureModulus"] intValue];
- }
- else
- {
- self.modulus = 16;
- }
-
- if (self.modulus <= 0 || self.modulus > 16)
- {
- self.modulus = 2;
- }
-
// Assume max picture settings initially.
self.keepDisplayAspect = [preset[@"PictureKeepRatio"] boolValue];
diff --git a/macosx/HBPictureController.m b/macosx/HBPictureController.m
index fc0eb195a..81dbe017b 100644
--- a/macosx/HBPictureController.m
+++ b/macosx/HBPictureController.m
@@ -41,7 +41,6 @@ static void *HBPictureControllerContext = &HBPictureControllerContext;
[self window];
[self addObserver:self forKeyPath:@"self.picture.anamorphicMode" options:NSKeyValueObservingOptionInitial context:HBPictureControllerContext];
- [self addObserver:self forKeyPath:@"self.picture.modulus" options:NSKeyValueObservingOptionInitial context:HBPictureControllerContext];
}
return self;
@@ -49,7 +48,7 @@ static void *HBPictureControllerContext = &HBPictureControllerContext;
- (void)dealloc
{
- NSArray *observerdKeyPaths = @[@"self.picture.anamorphicMode", @"self.picture.modulus"];
+ NSArray *observerdKeyPaths = @[@"self.picture.anamorphicMode"];
@try
{
for (NSString *keyPath in observerdKeyPaths)
@@ -87,11 +86,6 @@ static void *HBPictureControllerContext = &HBPictureControllerContext;
{
[self adjustSizingDisplay:nil];
}
- else if ([keyPath isEqualToString:@"self.picture.modulus"])
- {
- [fWidthStepper setIncrement:self.picture.modulus];
- [fHeightStepper setIncrement:self.picture.modulus];
- }
}
else
{
diff --git a/macosx/HBPictureViewController.m b/macosx/HBPictureViewController.m
index ae18cf38f..e517888f8 100644
--- a/macosx/HBPictureViewController.m
+++ b/macosx/HBPictureViewController.m
@@ -27,20 +27,10 @@ static void *HBPictureViewControllerContext = &HBPictureViewControllerContext;
if (self)
{
_labelColor = [NSColor disabledControlTextColor];
- [self addObserver:self forKeyPath:@"self.picture.modulus" options:NSKeyValueObservingOptionInitial context:HBPictureViewControllerContext];
}
return self;
}
-- (void)dealloc
-{
- @try
- {
- [self removeObserver:self forKeyPath:@"self.picture.modulus" context:HBPictureViewControllerContext];
- }
- @catch (NSException * __unused exception) {}
-}
-
- (void)setPicture:(HBPicture *)picture
{
_picture = picture;
@@ -56,24 +46,4 @@ static void *HBPictureViewControllerContext = &HBPictureViewControllerContext;
}
-#pragma mark - KVO
-
-- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context
-{
- if (context == HBPictureViewControllerContext)
- {
- // Set the increment here, it's not possible with bindings.
- if ([keyPath isEqualToString:@"self.picture.modulus"])
- {
- [self.widthStepper setIncrement:self.picture.modulus];
- [self.heightStepper setIncrement:self.picture.modulus];
- }
- }
- else
- {
- [super observeValueForKeyPath:keyPath ofObject:object change:change context:context];
- }
-}
-
-
@end