Skip to content

Commit a1eeffe

Browse files
committed
Use autolayout for the Installer window
1 parent 60a759b commit a1eeffe

File tree

2 files changed

+97
-71
lines changed

2 files changed

+97
-71
lines changed

Source/Installer/Base.lproj/MainMenu.xib

Lines changed: 54 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="22154" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
2+
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="24412" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
33
<dependencies>
44
<deployment identifier="macosx"/>
5-
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="22154"/>
5+
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="24412"/>
66
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
77
</dependencies>
88
<objects>
@@ -87,41 +87,13 @@
8787
<windowStyleMask key="styleMask" titled="YES" closable="YES"/>
8888
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
8989
<rect key="contentRect" x="335" y="390" width="640" height="360"/>
90-
<rect key="screenRect" x="0.0" y="0.0" width="1512" height="944"/>
90+
<rect key="screenRect" x="0.0" y="0.0" width="1920" height="1049"/>
9191
<view key="contentView" id="372">
9292
<rect key="frame" x="0.0" y="0.0" width="640" height="360"/>
9393
<autoresizingMask key="autoresizingMask"/>
9494
<subviews>
95-
<scrollView fixedFrame="YES" horizontalLineScroll="10" horizontalPageScroll="10" verticalLineScroll="10" verticalPageScroll="10" hasHorizontalScroller="NO" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="536">
96-
<rect key="frame" x="20" y="60" width="600" height="251"/>
97-
<autoresizingMask key="autoresizingMask"/>
98-
<clipView key="contentView" drawsBackground="NO" id="vR5-yR-zjT">
99-
<rect key="frame" x="1" y="1" width="583" height="249"/>
100-
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
101-
<subviews>
102-
<textView editable="NO" importsGraphics="NO" verticallyResizable="YES" usesFontPanel="YES" findStyle="panel" continuousSpellChecking="YES" allowsUndo="YES" usesRuler="YES" allowsNonContiguousLayout="YES" spellingCorrection="YES" smartInsertDelete="YES" id="537">
103-
<rect key="frame" x="0.0" y="0.0" width="583" height="249"/>
104-
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
105-
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
106-
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
107-
<size key="minSize" width="583" height="249"/>
108-
<size key="maxSize" width="600" height="10000000"/>
109-
<color key="insertionPointColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
110-
</textView>
111-
</subviews>
112-
</clipView>
113-
<scroller key="horizontalScroller" hidden="YES" verticalHuggingPriority="750" doubleValue="1" horizontal="YES" id="538">
114-
<rect key="frame" x="-100" y="-100" width="87" height="18"/>
115-
<autoresizingMask key="autoresizingMask"/>
116-
</scroller>
117-
<scroller key="verticalScroller" verticalHuggingPriority="750" doubleValue="1" horizontal="NO" id="539">
118-
<rect key="frame" x="584" y="1" width="15" height="249"/>
119-
<autoresizingMask key="autoresizingMask"/>
120-
</scroller>
121-
</scrollView>
122-
<button imageHugsTitle="YES" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="575">
123-
<rect key="frame" x="460" y="12" width="166" height="32"/>
124-
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
95+
<button imageHugsTitle="YES" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="575">
96+
<rect key="frame" x="495" y="16" width="125" height="24"/>
12597
<buttonCell key="cell" type="push" title="Agree and Install" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="576">
12698
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
12799
<font key="font" metaFont="system"/>
@@ -130,9 +102,8 @@
130102
<action selector="agreeAndInstallAction:" target="494" id="708"/>
131103
</connections>
132104
</button>
133-
<button imageHugsTitle="YES" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="592">
134-
<rect key="frame" x="330" y="12" width="130" height="32"/>
135-
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
105+
<button imageHugsTitle="YES" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="592">
106+
<rect key="frame" x="417" y="16" width="66" height="24"/>
136107
<buttonCell key="cell" type="push" title="Cancel" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="593">
137108
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
138109
<font key="font" metaFont="system"/>
@@ -144,25 +115,65 @@ Gw
144115
<action selector="cancelAction:" target="494" id="707"/>
145116
</connections>
146117
</button>
147-
<textField focusRingType="none" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="623">
148-
<rect key="frame" x="17" y="323" width="559" height="17"/>
149-
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
118+
<textField focusRingType="none" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="623">
119+
<rect key="frame" x="18" y="324" width="506" height="16"/>
150120
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Welcome to the McBopomofo Installer! Please read the following Software Licence:" id="624">
151121
<font key="font" metaFont="system"/>
152122
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
153123
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
154124
</textFieldCell>
155125
</textField>
156-
<textField focusRingType="none" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="688">
157-
<rect key="frame" x="17" y="19" width="337" height="17"/>
158-
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
126+
<textField focusRingType="none" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="688">
127+
<rect key="frame" x="18" y="20" width="281" height="14"/>
159128
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="By installing the software I agree to the terms above." id="689">
160129
<font key="font" metaFont="smallSystem"/>
161130
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
162131
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
163132
</textFieldCell>
164133
</textField>
134+
<scrollView horizontalLineScroll="10" horizontalPageScroll="10" verticalLineScroll="10" verticalPageScroll="10" hasHorizontalScroller="NO" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="536">
135+
<rect key="frame" x="20" y="56" width="600" height="260"/>
136+
<clipView key="contentView" drawsBackground="NO" id="vR5-yR-zjT">
137+
<rect key="frame" x="1" y="1" width="581" height="258"/>
138+
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
139+
<subviews>
140+
<textView editable="NO" importsGraphics="NO" verticallyResizable="YES" usesFontPanel="YES" findStyle="panel" continuousSpellChecking="YES" allowsUndo="YES" usesRuler="YES" allowsNonContiguousLayout="YES" spellingCorrection="YES" smartInsertDelete="YES" id="537">
141+
<rect key="frame" x="0.0" y="0.0" width="581" height="258"/>
142+
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
143+
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
144+
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
145+
<size key="minSize" width="581" height="258"/>
146+
<size key="maxSize" width="600" height="10000000"/>
147+
<color key="insertionPointColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
148+
</textView>
149+
</subviews>
150+
</clipView>
151+
<scroller key="horizontalScroller" hidden="YES" verticalHuggingPriority="750" doubleValue="1" horizontal="YES" id="538">
152+
<rect key="frame" x="-100" y="-100" width="87" height="18"/>
153+
<autoresizingMask key="autoresizingMask"/>
154+
</scroller>
155+
<scroller key="verticalScroller" verticalHuggingPriority="750" doubleValue="1" horizontal="NO" id="539">
156+
<rect key="frame" x="582" y="1" width="17" height="258"/>
157+
<autoresizingMask key="autoresizingMask"/>
158+
</scroller>
159+
</scrollView>
165160
</subviews>
161+
<constraints>
162+
<constraint firstItem="575" firstAttribute="leading" secondItem="592" secondAttribute="trailing" constant="12" symbolic="YES" id="4Ih-vh-8Xb"/>
163+
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="623" secondAttribute="trailing" constant="20" symbolic="YES" id="4cH-XP-jVm"/>
164+
<constraint firstItem="536" firstAttribute="top" secondItem="623" secondAttribute="bottom" constant="8" symbolic="YES" id="7c1-qK-CUc"/>
165+
<constraint firstItem="575" firstAttribute="top" secondItem="536" secondAttribute="bottom" constant="16" id="EsM-EG-S2p"/>
166+
<constraint firstAttribute="trailing" secondItem="536" secondAttribute="trailing" constant="20" symbolic="YES" id="HJb-UI-Ee8"/>
167+
<constraint firstItem="623" firstAttribute="leading" secondItem="372" secondAttribute="leading" constant="20" symbolic="YES" id="QdQ-dO-lfM"/>
168+
<constraint firstAttribute="bottom" secondItem="575" secondAttribute="bottom" constant="16" id="REF-ET-f7w"/>
169+
<constraint firstItem="592" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="688" secondAttribute="trailing" constant="8" symbolic="YES" id="RZK-OA-c2s"/>
170+
<constraint firstItem="575" firstAttribute="trailing" secondItem="536" secondAttribute="trailing" id="Uel-Ic-fMn"/>
171+
<constraint firstItem="688" firstAttribute="baseline" secondItem="592" secondAttribute="baseline" id="aSy-ta-0lE"/>
172+
<constraint firstItem="688" firstAttribute="leading" secondItem="372" secondAttribute="leading" constant="20" symbolic="YES" id="fKs-l0-roi"/>
173+
<constraint firstItem="623" firstAttribute="top" secondItem="372" secondAttribute="top" constant="20" symbolic="YES" id="mg6-xa-slG"/>
174+
<constraint firstItem="536" firstAttribute="leading" secondItem="623" secondAttribute="leading" id="s2O-Qa-JCz"/>
175+
<constraint firstItem="592" firstAttribute="centerY" secondItem="575" secondAttribute="centerY" id="ybS-xI-1VG"/>
176+
</constraints>
166177
</view>
167178
<connections>
168179
<outlet property="delegate" destination="494" id="706"/>
@@ -185,7 +196,7 @@ Gw
185196
<window title="Window" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" visibleAtLaunch="NO" frameAutosaveName="" animationBehavior="default" id="gHl-Hx-eQn">
186197
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
187198
<rect key="contentRect" x="283" y="305" width="480" height="180"/>
188-
<rect key="screenRect" x="0.0" y="0.0" width="1512" height="944"/>
199+
<rect key="screenRect" x="0.0" y="0.0" width="1920" height="1049"/>
189200
<view key="contentView" id="wAe-c8-Vh9">
190201
<rect key="frame" x="0.0" y="0.0" width="480" height="180"/>
191202
<autoresizingMask key="autoresizingMask"/>

0 commit comments

Comments
 (0)