Skip to content

Commit

Permalink
Fix #732: File views regression in 1.2
Browse files Browse the repository at this point in the history
Replace resize masks with auto layout constraints. Compiling on macOS 11 for backwards compatibility seems to break resize masks in the NSTableView context.
  • Loading branch information
lucasderraugh committed Jan 17, 2021
1 parent 8630e14 commit f7a9702
Showing 1 changed file with 27 additions and 15 deletions.
42 changes: 27 additions & 15 deletions GitUpKit/Components/Base.lproj/GIDiffFilesViewController.xib
Original file line number Diff line number Diff line change
@@ -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="17701" 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="17701"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
Expand All @@ -15,11 +15,11 @@
</customObject>
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
<view translatesAutoresizingMaskIntoConstraints="NO" id="Mge-gB-T5T" userLabel="Main View" customClass="GIView">
<view id="Mge-gB-T5T" userLabel="Main View" customClass="GIView">
<rect key="frame" x="0.0" y="0.0" width="260" height="500"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<scrollView borderType="none" autohidesScrollers="YES" horizontalLineScroll="22" horizontalPageScroll="10" verticalLineScroll="22" verticalPageScroll="10" hasHorizontalScroller="NO" usesPredominantAxisScrolling="NO" horizontalScrollElasticity="none" id="2cJ-J8-eFZ">
<scrollView fixedFrame="YES" borderType="none" autohidesScrollers="YES" horizontalLineScroll="22" horizontalPageScroll="10" verticalLineScroll="22" verticalPageScroll="10" hasHorizontalScroller="NO" usesPredominantAxisScrolling="NO" horizontalScrollElasticity="none" translatesAutoresizingMaskIntoConstraints="NO" id="2cJ-J8-eFZ">
<rect key="frame" x="0.0" y="0.0" width="260" height="500"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<clipView key="contentView" id="16E-vQ-UeQ">
Expand All @@ -32,9 +32,8 @@
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
<color key="gridColor" name="gridColor" catalog="System" colorSpace="catalog"/>
<tableColumns>
<tableColumn editable="NO" width="260" minWidth="40" maxWidth="1000" id="E3R-WO-zSK">
<tableColumn editable="NO" width="228" minWidth="40" maxWidth="1000" id="E3R-WO-zSK">
<tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border" alignment="left">
<font key="font" metaFont="toolTip"/>
<color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="headerColor" catalog="System" colorSpace="catalog"/>
</tableHeaderCell>
Expand All @@ -46,24 +45,33 @@
<tableColumnResizingMask key="resizingMask" resizeWithTable="YES"/>
<prototypeCellViews>
<tableCellView id="R5f-Ja-Xvl" customClass="GIFileCellView">
<rect key="frame" x="0.0" y="0.0" width="260" height="22"/>
<rect key="frame" x="10" y="0.0" width="240" height="22"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" id="KaL-xa-jc5">
<rect key="frame" x="25" y="4" width="225" height="14"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="KaL-xa-jc5">
<rect key="frame" x="25" y="4" width="211" height="14"/>
<textFieldCell key="cell" controlSize="small" lineBreakMode="truncatingHead" allowsUndo="NO" sendsActionOnEndEditing="YES" alignment="left" title="&lt;FILE&gt;" id="u2i-DH-hTo">
<font key="font" metaFont="controlContent" size="11"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" id="14a-au-pfU">
<imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="14a-au-pfU">
<rect key="frame" x="6" y="4" width="15" height="15"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<constraints>
<constraint firstAttribute="height" constant="15" id="mLe-Se-Jq8"/>
<constraint firstAttribute="width" constant="15" id="zQ9-zT-ZEq"/>
</constraints>
<imageCell key="cell" refusesFirstResponder="YES" alignment="left" image="icon_file_a" id="V2R-ya-Hy4"/>
</imageView>
</subviews>
<constraints>
<constraint firstItem="KaL-xa-jc5" firstAttribute="leading" secondItem="14a-au-pfU" secondAttribute="trailing" constant="6" id="5L4-7k-yQc"/>
<constraint firstAttribute="trailing" secondItem="KaL-xa-jc5" secondAttribute="trailing" constant="6" id="B7F-k3-d8m"/>
<constraint firstItem="KaL-xa-jc5" firstAttribute="centerY" secondItem="R5f-Ja-Xvl" secondAttribute="centerY" id="SbP-sl-Ckd"/>
<constraint firstItem="14a-au-pfU" firstAttribute="centerY" secondItem="R5f-Ja-Xvl" secondAttribute="centerY" id="rWZ-Ar-YC0"/>
<constraint firstItem="14a-au-pfU" firstAttribute="leading" secondItem="R5f-Ja-Xvl" secondAttribute="leading" constant="6" id="y2a-7f-Dkh"/>
</constraints>
<connections>
<outlet property="imageView" destination="14a-au-pfU" id="3Kc-s3-koR"/>
<outlet property="textField" destination="KaL-xa-jc5" id="1gl-uS-YRe"/>
Expand All @@ -88,16 +96,20 @@
<autoresizingMask key="autoresizingMask"/>
</scroller>
</scrollView>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" id="vnq-Fj-lPE">
<rect key="frame" x="0.0" y="251" width="260" height="18"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="vnq-Fj-lPE">
<rect key="frame" x="0.0" y="242" width="260" height="17"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" allowsUndo="NO" sendsActionOnEndEditing="YES" alignment="center" title="&lt;EMPTY&gt;" id="sc9-uZ-UTx">
<font key="font" metaFont="menu" size="14"/>
<color key="textColor" name="secondaryLabelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
</subviews>
<constraints>
<constraint firstAttribute="trailing" secondItem="vnq-Fj-lPE" secondAttribute="trailing" constant="2" id="jnn-7q-f1E"/>
<constraint firstItem="vnq-Fj-lPE" firstAttribute="leading" secondItem="Mge-gB-T5T" secondAttribute="leading" constant="2" id="olW-V7-PdZ"/>
<constraint firstItem="vnq-Fj-lPE" firstAttribute="centerY" secondItem="Mge-gB-T5T" secondAttribute="centerY" id="sVi-xY-m9v"/>
</constraints>
<point key="canvasLocation" x="-95" y="289"/>
</view>
</objects>
Expand Down

0 comments on commit f7a9702

Please sign in to comment.