Browse Source

Minor constraint changes.

v1.2.4
Abhishek Banthia 9 years ago
parent
commit
b20961c5a0
  1. 14
      Clocker/Custom Table Cell Views/CLTimezoneCellView.m
  2. 12
      Clocker/en.lproj/Panel.xib
  3. 6
      Clocker/ja.lproj/Panel.xib
  4. 6
      Clocker/zh-Hans.lproj/Panel.xib
  5. 6
      Clocker/zh-Hant.lproj/Panel.xib

14
Clocker/Custom Table Cell Views/CLTimezoneCellView.m

@ -160,16 +160,26 @@
{ {
CGFloat width = [self.relativeDate.stringValue CGFloat width = [self.relativeDate.stringValue
sizeWithAttributes: @{NSFontAttributeName:self.relativeDate.font}].width; sizeWithAttributes: @{NSFontAttributeName:self.relativeDate.font}].width;
CGFloat sunriseWidth = [self.sunriseSetTime.stringValue
sizeWithAttributes: @{NSFontAttributeName:self.sunriseSetTime.font}].width;
[self.relativeDate.constraints enumerateObjectsUsingBlock:^(NSLayoutConstraint * _Nonnull constraint, NSUInteger idx, BOOL * _Nonnull stop) { [self.relativeDate.constraints enumerateObjectsUsingBlock:^(NSLayoutConstraint * _Nonnull constraint, NSUInteger idx, BOOL * _Nonnull stop) {
if (constraint.constant > 20) if (constraint.constant > 20)
{ {
constraint.constant = width+8; constraint.constant = width+8;
} }
}];
[self.sunriseSetTime.constraints enumerateObjectsUsingBlock:^(NSLayoutConstraint * _Nonnull constraint, NSUInteger idx, BOOL * _Nonnull stop) {
if (constraint.constant > 40)
{
constraint.constant = sunriseWidth+3;
}
}]; }];
} }
- (void)controlTextDidEndEditing:(NSNotification *)obj - (void)controlTextDidEndEditing:(NSNotification *)obj

12
Clocker/en.lproj/Panel.xib

@ -63,7 +63,7 @@
<constraint firstAttribute="width" constant="150" id="32b-h6-joo"/> <constraint firstAttribute="width" constant="150" id="32b-h6-joo"/>
<constraint firstAttribute="height" constant="22" id="vod-YN-iNX"/> <constraint firstAttribute="height" constant="22" id="vod-YN-iNX"/>
</constraints> </constraints>
<textFieldCell key="cell" lineBreakMode="truncatingTail" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" placeholderString="Timezone Name" id="rnh-AP-ooc"> <textFieldCell key="cell" lineBreakMode="truncatingTail" selectable="YES" editable="YES" placeholderString="Timezone Name" id="rnh-AP-ooc">
<font key="font" size="15" name="SFUIDisplay-Thin"/> <font key="font" size="15" name="SFUIDisplay-Thin"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/> <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/> <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
@ -97,20 +97,20 @@
</textFieldCell> </textFieldCell>
</textField> </textField>
<imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="7OQ-cr-VJS"> <imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="7OQ-cr-VJS">
<rect key="frame" x="194" y="6" width="20" height="20"/> <rect key="frame" x="198" y="6" width="20" height="20"/>
<constraints> <constraints>
<constraint firstAttribute="width" constant="20" id="Vmz-Ji-Y0Q"/> <constraint firstAttribute="width" constant="20" id="Vmz-Ji-Y0Q"/>
<constraint firstAttribute="height" constant="20" id="qNj-EP-era"/> <constraint firstAttribute="height" constant="20" id="qNj-EP-era"/>
</constraints> </constraints>
<imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" id="U2f-NK-Gua"/> <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" id="U2f-NK-Gua"/>
</imageView> </imageView>
<textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="uOg-ij-alO"> <textField verticalHuggingPriority="750" preferredMaxLayoutWidth="50" translatesAutoresizingMaskIntoConstraints="NO" id="uOg-ij-alO">
<rect key="frame" x="215" y="9" width="54" height="17"/> <rect key="frame" x="219" y="9" width="54" height="17"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="17" id="89H-r0-Dnh"/> <constraint firstAttribute="height" constant="17" id="89H-r0-Dnh"/>
<constraint firstAttribute="width" constant="50" id="8KH-Ks-d4T"/> <constraint firstAttribute="width" constant="50" id="8KH-Ks-d4T"/>
</constraints> </constraints>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" state="on" alignment="left" placeholderString="" id="qpH-kn-cMT"> <textFieldCell key="cell" sendsActionOnEndEditing="YES" state="on" alignment="left" placeholderString="" id="qpH-kn-cMT">
<font key="font" size="11" name="SFUIDisplay-Light"/> <font key="font" size="11" name="SFUIDisplay-Light"/>
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/> <color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/> <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
@ -121,7 +121,7 @@
<constraint firstItem="QUd-7D-q14" firstAttribute="leading" secondItem="qbN-ba-fho" secondAttribute="leading" constant="10" id="0Qz-Ev-efP"/> <constraint firstItem="QUd-7D-q14" firstAttribute="leading" secondItem="qbN-ba-fho" secondAttribute="leading" constant="10" id="0Qz-Ev-efP"/>
<constraint firstItem="uOg-ij-alO" firstAttribute="leading" secondItem="7OQ-cr-VJS" secondAttribute="trailing" constant="3" id="6bc-YK-jtD"/> <constraint firstItem="uOg-ij-alO" firstAttribute="leading" secondItem="7OQ-cr-VJS" secondAttribute="trailing" constant="3" id="6bc-YK-jtD"/>
<constraint firstItem="etF-33-bCB" firstAttribute="top" secondItem="qbN-ba-fho" secondAttribute="top" constant="5" id="Lct-kG-usb"/> <constraint firstItem="etF-33-bCB" firstAttribute="top" secondItem="qbN-ba-fho" secondAttribute="top" constant="5" id="Lct-kG-usb"/>
<constraint firstAttribute="trailing" secondItem="uOg-ij-alO" secondAttribute="trailing" constant="12" id="Siz-97-mYl"/> <constraint firstAttribute="trailing" secondItem="uOg-ij-alO" secondAttribute="trailing" constant="8" id="Siz-97-mYl"/>
<constraint firstItem="QUd-7D-q14" firstAttribute="top" secondItem="etF-33-bCB" secondAttribute="bottom" constant="2" id="VO6-Zn-eA3"/> <constraint firstItem="QUd-7D-q14" firstAttribute="top" secondItem="etF-33-bCB" secondAttribute="bottom" constant="2" id="VO6-Zn-eA3"/>
<constraint firstItem="uOg-ij-alO" firstAttribute="top" secondItem="vnv-J2-7r1" secondAttribute="bottom" constant="-5" id="j2E-3l-6B2"/> <constraint firstItem="uOg-ij-alO" firstAttribute="top" secondItem="vnv-J2-7r1" secondAttribute="bottom" constant="-5" id="j2E-3l-6B2"/>
<constraint firstItem="7OQ-cr-VJS" firstAttribute="top" secondItem="vnv-J2-7r1" secondAttribute="bottom" constant="-5" id="uZd-y0-d6A"/> <constraint firstItem="7OQ-cr-VJS" firstAttribute="top" secondItem="vnv-J2-7r1" secondAttribute="bottom" constant="-5" id="uZd-y0-d6A"/>

6
Clocker/ja.lproj/Panel.xib

@ -73,7 +73,7 @@
</connections> </connections>
</textField> </textField>
<imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="32s-jh-CdZ"> <imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="32s-jh-CdZ">
<rect key="frame" x="199" y="5" width="20" height="20"/> <rect key="frame" x="203" y="5" width="20" height="20"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="20" id="LN0-5e-Uw7"/> <constraint firstAttribute="height" constant="20" id="LN0-5e-Uw7"/>
<constraint firstAttribute="width" constant="20" id="Txb-Xo-JPl"/> <constraint firstAttribute="width" constant="20" id="Txb-Xo-JPl"/>
@ -81,7 +81,7 @@
<imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" id="eLr-Js-g3E"/> <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" id="eLr-Js-g3E"/>
</imageView> </imageView>
<textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="6CM-3s-ZNr"> <textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="6CM-3s-ZNr">
<rect key="frame" x="220" y="7" width="49" height="17"/> <rect key="frame" x="224" y="7" width="49" height="17"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="17" id="Mho-dg-5yL"/> <constraint firstAttribute="height" constant="17" id="Mho-dg-5yL"/>
<constraint firstAttribute="width" constant="45" id="zNy-He-GNo"/> <constraint firstAttribute="width" constant="45" id="zNy-He-GNo"/>
@ -123,7 +123,7 @@
<constraint firstItem="etF-33-bCB" firstAttribute="top" secondItem="qbN-ba-fho" secondAttribute="top" constant="5" id="Lct-kG-usb"/> <constraint firstItem="etF-33-bCB" firstAttribute="top" secondItem="qbN-ba-fho" secondAttribute="top" constant="5" id="Lct-kG-usb"/>
<constraint firstItem="QUd-7D-q14" firstAttribute="top" secondItem="etF-33-bCB" secondAttribute="bottom" constant="2" id="VO6-Zn-eA3"/> <constraint firstItem="QUd-7D-q14" firstAttribute="top" secondItem="etF-33-bCB" secondAttribute="bottom" constant="2" id="VO6-Zn-eA3"/>
<constraint firstItem="vnv-J2-7r1" firstAttribute="top" secondItem="qbN-ba-fho" secondAttribute="top" constant="5" id="aN5-p4-LEq"/> <constraint firstItem="vnv-J2-7r1" firstAttribute="top" secondItem="qbN-ba-fho" secondAttribute="top" constant="5" id="aN5-p4-LEq"/>
<constraint firstAttribute="trailing" secondItem="6CM-3s-ZNr" secondAttribute="trailing" constant="12" id="qcf-ej-oC8"/> <constraint firstAttribute="trailing" secondItem="6CM-3s-ZNr" secondAttribute="trailing" constant="8" id="qcf-ej-oC8"/>
<constraint firstItem="etF-33-bCB" firstAttribute="leading" secondItem="qbN-ba-fho" secondAttribute="leading" constant="9" id="ueW-ow-ZRq"/> <constraint firstItem="etF-33-bCB" firstAttribute="leading" secondItem="qbN-ba-fho" secondAttribute="leading" constant="9" id="ueW-ow-ZRq"/>
<constraint firstItem="6CM-3s-ZNr" firstAttribute="leading" secondItem="32s-jh-CdZ" secondAttribute="trailing" constant="3" id="xMj-d9-yh6"/> <constraint firstItem="6CM-3s-ZNr" firstAttribute="leading" secondItem="32s-jh-CdZ" secondAttribute="trailing" constant="3" id="xMj-d9-yh6"/>
<constraint firstItem="6CM-3s-ZNr" firstAttribute="top" secondItem="vnv-J2-7r1" secondAttribute="bottom" constant="-4" id="yfd-bg-v0L"/> <constraint firstItem="6CM-3s-ZNr" firstAttribute="top" secondItem="vnv-J2-7r1" secondAttribute="bottom" constant="-4" id="yfd-bg-v0L"/>

6
Clocker/zh-Hans.lproj/Panel.xib

@ -73,7 +73,7 @@
</connections> </connections>
</textField> </textField>
<imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="Ids-Uo-ci6"> <imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="Ids-Uo-ci6">
<rect key="frame" x="199" y="5" width="20" height="20"/> <rect key="frame" x="203" y="5" width="20" height="20"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="20" id="Tug-eT-kM6"/> <constraint firstAttribute="height" constant="20" id="Tug-eT-kM6"/>
<constraint firstAttribute="width" constant="20" id="fw4-xM-R7B"/> <constraint firstAttribute="width" constant="20" id="fw4-xM-R7B"/>
@ -81,7 +81,7 @@
<imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" id="SQ7-zC-HEd"/> <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" id="SQ7-zC-HEd"/>
</imageView> </imageView>
<textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="6Lf-Yu-mLH"> <textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="6Lf-Yu-mLH">
<rect key="frame" x="220" y="7" width="49" height="17"/> <rect key="frame" x="224" y="7" width="49" height="17"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="17" id="Erg-ja-DqV"/> <constraint firstAttribute="height" constant="17" id="Erg-ja-DqV"/>
<constraint firstAttribute="width" constant="45" id="r3N-lG-lbQ"/> <constraint firstAttribute="width" constant="45" id="r3N-lG-lbQ"/>
@ -120,7 +120,7 @@
<constraints> <constraints>
<constraint firstItem="QUd-7D-q14" firstAttribute="leading" secondItem="qbN-ba-fho" secondAttribute="leading" constant="10" id="0Qz-Ev-efP"/> <constraint firstItem="QUd-7D-q14" firstAttribute="leading" secondItem="qbN-ba-fho" secondAttribute="leading" constant="10" id="0Qz-Ev-efP"/>
<constraint firstItem="6Lf-Yu-mLH" firstAttribute="top" secondItem="vnv-J2-7r1" secondAttribute="bottom" constant="-4" id="6Mc-mV-px7"/> <constraint firstItem="6Lf-Yu-mLH" firstAttribute="top" secondItem="vnv-J2-7r1" secondAttribute="bottom" constant="-4" id="6Mc-mV-px7"/>
<constraint firstAttribute="trailing" secondItem="6Lf-Yu-mLH" secondAttribute="trailing" constant="12" id="EFk-L8-w4w"/> <constraint firstAttribute="trailing" secondItem="6Lf-Yu-mLH" secondAttribute="trailing" constant="8" id="EFk-L8-w4w"/>
<constraint firstItem="etF-33-bCB" firstAttribute="top" secondItem="qbN-ba-fho" secondAttribute="top" constant="5" id="Lct-kG-usb"/> <constraint firstItem="etF-33-bCB" firstAttribute="top" secondItem="qbN-ba-fho" secondAttribute="top" constant="5" id="Lct-kG-usb"/>
<constraint firstItem="6Lf-Yu-mLH" firstAttribute="leading" secondItem="Ids-Uo-ci6" secondAttribute="trailing" constant="3" id="Mh9-0D-cWP"/> <constraint firstItem="6Lf-Yu-mLH" firstAttribute="leading" secondItem="Ids-Uo-ci6" secondAttribute="trailing" constant="3" id="Mh9-0D-cWP"/>
<constraint firstItem="vnv-J2-7r1" firstAttribute="top" secondItem="qbN-ba-fho" secondAttribute="top" constant="5" id="Syb-YN-Gsr"/> <constraint firstItem="vnv-J2-7r1" firstAttribute="top" secondItem="qbN-ba-fho" secondAttribute="top" constant="5" id="Syb-YN-Gsr"/>

6
Clocker/zh-Hant.lproj/Panel.xib

@ -73,7 +73,7 @@
</connections> </connections>
</textField> </textField>
<imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="6Ea-8S-iTa"> <imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="6Ea-8S-iTa">
<rect key="frame" x="199" y="5" width="20" height="20"/> <rect key="frame" x="203" y="5" width="20" height="20"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="20" id="TYa-1I-fQJ"/> <constraint firstAttribute="height" constant="20" id="TYa-1I-fQJ"/>
<constraint firstAttribute="width" constant="20" id="b27-EB-ZA9"/> <constraint firstAttribute="width" constant="20" id="b27-EB-ZA9"/>
@ -81,7 +81,7 @@
<imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" id="k54-vn-T4E"/> <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" id="k54-vn-T4E"/>
</imageView> </imageView>
<textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="L5a-d8-SuC"> <textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="L5a-d8-SuC">
<rect key="frame" x="220" y="7" width="49" height="17"/> <rect key="frame" x="224" y="7" width="49" height="17"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="17" id="Fmh-lZ-7vJ"/> <constraint firstAttribute="height" constant="17" id="Fmh-lZ-7vJ"/>
<constraint firstAttribute="width" constant="45" id="psP-EH-mNo"/> <constraint firstAttribute="width" constant="45" id="psP-EH-mNo"/>
@ -125,7 +125,7 @@
<constraint firstItem="QUd-7D-q14" firstAttribute="top" secondItem="etF-33-bCB" secondAttribute="bottom" constant="2" id="VO6-Zn-eA3"/> <constraint firstItem="QUd-7D-q14" firstAttribute="top" secondItem="etF-33-bCB" secondAttribute="bottom" constant="2" id="VO6-Zn-eA3"/>
<constraint firstItem="L5a-d8-SuC" firstAttribute="top" secondItem="vnv-J2-7r1" secondAttribute="bottom" constant="-4" id="YdU-5D-bdv"/> <constraint firstItem="L5a-d8-SuC" firstAttribute="top" secondItem="vnv-J2-7r1" secondAttribute="bottom" constant="-4" id="YdU-5D-bdv"/>
<constraint firstItem="vnv-J2-7r1" firstAttribute="top" secondItem="qbN-ba-fho" secondAttribute="top" constant="5" id="brT-M2-0IB"/> <constraint firstItem="vnv-J2-7r1" firstAttribute="top" secondItem="qbN-ba-fho" secondAttribute="top" constant="5" id="brT-M2-0IB"/>
<constraint firstAttribute="trailing" secondItem="L5a-d8-SuC" secondAttribute="trailing" constant="12" id="iqR-Tq-tVx"/> <constraint firstAttribute="trailing" secondItem="L5a-d8-SuC" secondAttribute="trailing" constant="8" id="iqR-Tq-tVx"/>
<constraint firstItem="etF-33-bCB" firstAttribute="leading" secondItem="qbN-ba-fho" secondAttribute="leading" constant="9" id="ueW-ow-ZRq"/> <constraint firstItem="etF-33-bCB" firstAttribute="leading" secondItem="qbN-ba-fho" secondAttribute="leading" constant="9" id="ueW-ow-ZRq"/>
<constraint firstAttribute="trailing" secondItem="vnv-J2-7r1" secondAttribute="trailing" constant="8" id="zXo-eA-0bQ"/> <constraint firstAttribute="trailing" secondItem="vnv-J2-7r1" secondAttribute="trailing" constant="8" id="zXo-eA-0bQ"/>
</constraints> </constraints>

Loading…
Cancel
Save