Fix a crash on 10.12 and earlier.

This commit is contained in:
Damiano Galassi committed 2019-09-15 15:25:28 +02:00
1 parent 879bf33c2b
commit 8de2581285
8 files changed
+125 -91

No files matched your search

+27 -28
View File
@@ -21,11 +21,11 @@
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
<collectionViewItem id="tcm-Rs-Ndm" customClass="ArtworkSelectorViewItem" customModule="Subler" customModuleProvider="target"/>
<view id="KSl-SU-b4m">
<rect key="frame" x="0.0" y="0.0" width="543" height="555"/>
<rect key="frame" x="0.0" y="0.0" width="571" height="555"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="fCL-eV-Fib">
<rect key="frame" x="401" y="13" width="128" height="32"/>
<rect key="frame" x="429" y="13" width="128" height="32"/>
<buttonCell key="cell" type="push" title="Set as artwork" bezelStyle="rounded" alignment="center" enabled="NO" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="rMb-PC-yTA">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
@@ -38,9 +38,9 @@ DQ
</connections>
</button>
<slider verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="fMj-Ew-Qej">
<rect key="frame" x="423" y="50" width="100" height="18"/>
<rect key="frame" x="451" y="50" width="100" height="18"/>
<constraints>
<constraint firstAttribute="width" constant="100" id="6u0-UA-h3Q"/>
<constraint firstAttribute="width" constant="100" id="o7H-4a-ogx"/>
</constraints>
<sliderCell key="cell" controlSize="small" continuous="YES" alignment="left" maxValue="100" doubleValue="50" tickMarkPosition="above" numberOfTickMarks="5" sliderType="linear" id="ZF9-dG-qTM"/>
<accessibility description="Zoom"/>
@@ -61,7 +61,7 @@ DQ
</connections>
</button>
<button horizontalHuggingPriority="249" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Zyu-WY-ltM">
<rect key="frame" x="328" y="13" width="73" height="32"/>
<rect key="frame" x="356" y="13" width="73" height="32"/>
<buttonCell key="cell" type="push" title="None" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="UDG-fN-bQH">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
@@ -74,13 +74,13 @@ Gw
</connections>
</button>
<scrollView wantsLayer="YES" autohidesScrollers="YES" horizontalLineScroll="10" horizontalPageScroll="10" verticalLineScroll="10" verticalPageScroll="10" hasHorizontalScroller="NO" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="c0O-We-pZd">
<rect key="frame" x="20" y="76" width="503" height="459"/>
<rect key="frame" x="20" y="76" width="531" height="459"/>
<clipView key="contentView" id="cHe-z7-drT">
<rect key="frame" x="1" y="1" width="501" height="457"/>
<rect key="frame" x="1" y="1" width="529" height="457"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<collectionView selectable="YES" allowsMultipleSelection="YES" id="234-cJ-3Un" customClass="CollectionView" customModule="Subler" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="501" height="457"/>
<rect key="frame" x="0.0" y="0.0" width="529" height="457"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES"/>
<collectionViewFlowLayout key="collectionViewLayout" minimumInteritemSpacing="10" minimumLineSpacing="10" id="lte-fF-bVi">
<size key="itemSize" width="154" height="194"/>
@@ -116,27 +116,26 @@ Gw
</textField>
</subviews>
<constraints>
<constraint firstItem="NEi-uU-Lh7" firstAttribute="leading" secondItem="AYL-Jp-agY" secondAttribute="trailing" constant="7" id="9gb-nE-23k"/>
<constraint firstItem="fCL-eV-Fib" firstAttribute="top" secondItem="fMj-Ew-Qej" secondAttribute="bottom" constant="10" id="Bit-fx-eYz"/>
<constraint firstItem="c0O-We-pZd" firstAttribute="top" secondItem="KSl-SU-b4m" secondAttribute="top" constant="20" id="DaJ-l8-5JN"/>
<constraint firstItem="fMj-Ew-Qej" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="NEi-uU-Lh7" secondAttribute="trailing" constant="8" symbolic="YES" id="DmC-ra-q6e"/>
<constraint firstItem="NEi-uU-Lh7" firstAttribute="centerY" secondItem="AYL-Jp-agY" secondAttribute="centerY" id="Fo0-OX-4Ly"/>
<constraint firstItem="fCL-eV-Fib" firstAttribute="leading" secondItem="Zyu-WY-ltM" secondAttribute="trailing" constant="12" symbolic="YES" id="Fz9-R7-etp"/>
<constraint firstItem="NEi-uU-Lh7" firstAttribute="leading" secondItem="AYL-Jp-agY" secondAttribute="trailing" constant="7" id="PqF-a5-1TS"/>
<constraint firstItem="iH5-SJ-sDV" firstAttribute="baseline" secondItem="Zyu-WY-ltM" secondAttribute="baseline" id="TZ5-Zf-m3E"/>
<constraint firstItem="fMj-Ew-Qej" firstAttribute="top" secondItem="c0O-We-pZd" secondAttribute="bottom" constant="8" id="X3N-5S-LkA"/>
<constraint firstItem="fMj-Ew-Qej" firstAttribute="trailing" secondItem="fCL-eV-Fib" secondAttribute="trailing" id="btb-8f-0H1"/>
<constraint firstItem="Zyu-WY-ltM" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="iH5-SJ-sDV" secondAttribute="trailing" constant="66" id="bzt-5D-vZw"/>
<constraint firstItem="AYL-Jp-agY" firstAttribute="leading" secondItem="KSl-SU-b4m" secondAttribute="leading" constant="20" id="c0r-TQ-wVA"/>
<constraint firstAttribute="bottom" secondItem="iH5-SJ-sDV" secondAttribute="bottom" constant="20" id="eKv-c7-1DF"/>
<constraint firstAttribute="bottom" secondItem="AYL-Jp-agY" secondAttribute="bottom" constant="20" id="ena-4M-4Qu"/>
<constraint firstAttribute="trailing" secondItem="fCL-eV-Fib" secondAttribute="trailing" constant="20" id="fgc-7c-j3N"/>
<constraint firstItem="Zyu-WY-ltM" firstAttribute="baseline" secondItem="fCL-eV-Fib" secondAttribute="baseline" id="jRI-f7-8kS"/>
<constraint firstItem="c0O-We-pZd" firstAttribute="leading" secondItem="KSl-SU-b4m" secondAttribute="leading" constant="20" id="pXh-Mx-QuV"/>
<constraint firstAttribute="trailing" secondItem="c0O-We-pZd" secondAttribute="trailing" constant="20" id="q23-OJ-7hs"/>
<constraint firstItem="iH5-SJ-sDV" firstAttribute="leading" secondItem="KSl-SU-b4m" secondAttribute="leading" constant="20" id="vLK-rL-Fm5"/>
<constraint firstItem="fMj-Ew-Qej" firstAttribute="top" secondItem="c0O-We-pZd" secondAttribute="bottom" constant="8" symbolic="YES" id="1F8-2H-ql1"/>
<constraint firstItem="iH5-SJ-sDV" firstAttribute="baseline" secondItem="Zyu-WY-ltM" secondAttribute="baseline" id="1hD-5N-Mi4"/>
<constraint firstItem="fMj-Ew-Qej" firstAttribute="trailing" secondItem="fCL-eV-Fib" secondAttribute="trailing" id="4rc-7P-Ji5"/>
<constraint firstItem="fCL-eV-Fib" firstAttribute="top" secondItem="fMj-Ew-Qej" secondAttribute="bottom" constant="10" id="89D-4X-bUH"/>
<constraint firstItem="fCL-eV-Fib" firstAttribute="leading" secondItem="Zyu-WY-ltM" secondAttribute="trailing" constant="12" symbolic="YES" id="A6C-Bg-TgV"/>
<constraint firstItem="Zyu-WY-ltM" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="iH5-SJ-sDV" secondAttribute="trailing" constant="12" symbolic="YES" id="IYX-sN-6GS"/>
<constraint firstAttribute="bottom" secondItem="AYL-Jp-agY" secondAttribute="bottom" constant="20" symbolic="YES" id="c0Q-Bt-s8Q"/>
<constraint firstItem="NEi-uU-Lh7" firstAttribute="leading" secondItem="AYL-Jp-agY" secondAttribute="trailing" constant="7" id="dbl-RC-7wB"/>
<constraint firstItem="Zyu-WY-ltM" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="NEi-uU-Lh7" secondAttribute="trailing" constant="8" symbolic="YES" id="g4g-af-tke"/>
<constraint firstItem="AYL-Jp-agY" firstAttribute="bottom" secondItem="iH5-SJ-sDV" secondAttribute="bottom" id="jBY-Dt-gql"/>
<constraint firstItem="c0O-We-pZd" firstAttribute="top" secondItem="KSl-SU-b4m" secondAttribute="top" constant="20" symbolic="YES" id="kSw-QX-3GJ"/>
<constraint firstItem="c0O-We-pZd" firstAttribute="leading" secondItem="KSl-SU-b4m" secondAttribute="leading" constant="20" symbolic="YES" id="m3v-Jo-5ZH"/>
<constraint firstItem="Zyu-WY-ltM" firstAttribute="baseline" secondItem="fCL-eV-Fib" secondAttribute="baseline" id="njY-Tp-FeZ"/>
<constraint firstItem="iH5-SJ-sDV" firstAttribute="leading" secondItem="AYL-Jp-agY" secondAttribute="leading" id="oJc-dl-adV"/>
<constraint firstItem="c0O-We-pZd" firstAttribute="leading" secondItem="AYL-Jp-agY" secondAttribute="leading" id="qSA-VR-WqA"/>
<constraint firstAttribute="trailing" secondItem="c0O-We-pZd" secondAttribute="trailing" constant="20" symbolic="YES" id="uBg-rg-gmc"/>
<constraint firstItem="c0O-We-pZd" firstAttribute="trailing" secondItem="fMj-Ew-Qej" secondAttribute="trailing" id="yFF-Hd-SSn"/>
<constraint firstItem="AYL-Jp-agY" firstAttribute="centerY" secondItem="NEi-uU-Lh7" secondAttribute="centerY" id="zvc-Fx-gsf"/>
</constraints>
<point key="canvasLocation" x="171.5" y="241.5"/>
<point key="canvasLocation" x="72.5" y="129.5"/>
</view>
</objects>
</document>
+47 -34
View File
@@ -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" useAutolayout="YES">
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="14868" 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="14868"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
@@ -65,16 +65,16 @@ Gw
<rect key="frame" x="20" y="20" width="16" height="16"/>
</progressIndicator>
<tabView translatesAutoresizingMaskIntoConstraints="NO" id="6hW-RR-cfF">
<rect key="frame" x="-12" y="442" width="574" height="111"/>
<rect key="frame" x="-12" y="443" width="574" height="110"/>
<font key="font" metaFont="system"/>
<tabViewItems>
<tabViewItem label="Movie" identifier="1" id="apc-8c-iyM">
<view key="view" id="e2g-GX-p4j">
<rect key="frame" x="10" y="33" width="554" height="65"/>
<rect key="frame" x="10" y="33" width="554" height="64"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<textField verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" preferredMaxLayoutWidth="150" translatesAutoresizingMaskIntoConstraints="NO" id="gBb-mO-eZD">
<rect key="frame" x="18" y="42" width="44" height="17"/>
<rect key="frame" x="18" y="42" width="44" height="16"/>
<textFieldCell key="cell" sendsActionOnEndEditing="YES" alignment="right" title="Movie:" id="uyt-vh-nv6">
<font key="font" metaFont="system"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
@@ -82,7 +82,7 @@ Gw
</textFieldCell>
</textField>
<textField verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Dyr-Xb-8vA">
<rect key="frame" x="67" y="39" width="387" height="22"/>
<rect key="frame" x="67" y="39" width="387" height="21"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" drawsBackground="YES" id="sXD-8k-I7r">
<font key="font" metaFont="system"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
@@ -109,7 +109,7 @@ Gw
</connections>
</popUpButton>
<popUpButton translatesAutoresizingMaskIntoConstraints="NO" id="0aO-Wz-ASZ">
<rect key="frame" x="437" y="9" width="102" height="21"/>
<rect key="frame" x="437" y="9" width="102" height="20"/>
<constraints>
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="99" id="4MR-8H-PO9"/>
</constraints>
@@ -163,11 +163,11 @@ DQ
</tabViewItem>
<tabViewItem label="TV Episode" identifier="2" id="GPk-3A-rQI">
<view key="view" id="pC0-6X-DbE">
<rect key="frame" x="10" y="33" width="554" height="65"/>
<rect key="frame" x="10" y="33" width="554" height="63"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<textField verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" preferredMaxLayoutWidth="200" translatesAutoresizingMaskIntoConstraints="NO" id="PoJ-z7-u2L">
<rect key="frame" x="14" y="43" width="62" height="17"/>
<rect key="frame" x="14" y="42" width="62" height="16"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="TV Show:" id="lE4-J1-ySV">
<font key="font" metaFont="system"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
@@ -175,7 +175,7 @@ DQ
</textFieldCell>
</textField>
<textField verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="gWo-ag-3S4">
<rect key="frame" x="14" y="13" width="62" height="17"/>
<rect key="frame" x="14" y="13" width="62" height="16"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="Season #" id="kz7-mH-DuT">
<font key="font" metaFont="system"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
@@ -183,7 +183,7 @@ DQ
</textFieldCell>
</textField>
<textField verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="nYS-Uo-Puv">
<rect key="frame" x="81" y="10" width="30" height="22"/>
<rect key="frame" x="81" y="10" width="30" height="21"/>
<constraints>
<constraint firstAttribute="width" constant="30" id="9CR-ib-DtF"/>
</constraints>
@@ -198,7 +198,7 @@ DQ
</connections>
</textField>
<textField verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="PmP-Uz-mXF">
<rect key="frame" x="185" y="10" width="30" height="22"/>
<rect key="frame" x="185" y="10" width="30" height="21"/>
<constraints>
<constraint firstAttribute="width" constant="30" id="JnI-dd-MkA"/>
</constraints>
@@ -213,7 +213,7 @@ DQ
</connections>
</textField>
<textField horizontalHuggingPriority="249" verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="r32-v1-g3U">
<rect key="frame" x="116" y="13" width="64" height="17"/>
<rect key="frame" x="116" y="13" width="64" height="16"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="Episode #" id="Zik-QU-m81">
<font key="font" metaFont="system"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
@@ -221,7 +221,7 @@ DQ
</textFieldCell>
</textField>
<comboBox verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="yxL-hY-Wvf">
<rect key="frame" x="81" y="36" width="376" height="26"/>
<rect key="frame" x="81" y="35" width="376" height="25"/>
<comboBoxCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" drawsBackground="YES" usesDataSource="YES" numberOfVisibleItems="5" id="o7O-s5-2MI">
<font key="font" metaFont="system"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
@@ -249,7 +249,7 @@ DQ
</connections>
</popUpButton>
<popUpButton translatesAutoresizingMaskIntoConstraints="NO" id="UTG-O0-5RG">
<rect key="frame" x="437" y="9" width="102" height="21"/>
<rect key="frame" x="437" y="9" width="102" height="20"/>
<constraints>
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="99" id="yze-MC-pfr"/>
</constraints>
@@ -270,7 +270,7 @@ DQ
</connections>
</popUpButton>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="EpM-F6-30O">
<rect key="frame" x="460" y="32" width="83" height="32"/>
<rect key="frame" x="460" y="30" width="83" height="32"/>
<buttonCell key="cell" type="push" title="Search" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="5Mu-cI-Uiu">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
@@ -324,7 +324,7 @@ DQ
</textFieldCell>
</textField>
<splitView autosaveName="SBMetadataSearchSplitView" translatesAutoresizingMaskIntoConstraints="NO" id="BfX-EM-ktQ">
<rect key="frame" x="20" y="61" width="510" height="383"/>
<rect key="frame" x="20" y="61" width="510" height="384"/>
<subviews>
<customView id="8It-Zb-03g">
<rect key="frame" x="0.0" y="0.0" width="510" height="136"/>
@@ -360,9 +360,8 @@ DQ
<rect key="frame" x="1" y="1" width="505" height="15"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" fixedFrame="YES" setsMaxLayoutWidthAtFirstLayout="YES" translatesAutoresizingMaskIntoConstraints="NO" id="OFv-ne-Jzf">
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" setsMaxLayoutWidthAtFirstLayout="YES" translatesAutoresizingMaskIntoConstraints="NO" id="OFv-ne-Jzf">
<rect key="frame" x="0.0" y="1" width="505" height="14"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" controlSize="small" sendsActionOnEndEditing="YES" title="Table View Cell" id="wLe-r3-x0V">
<font key="font" metaFont="smallSystem"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
@@ -370,6 +369,11 @@ DQ
</textFieldCell>
</textField>
</subviews>
<constraints>
<constraint firstItem="OFv-ne-Jzf" firstAttribute="centerY" secondItem="o6P-ie-0z3" secondAttribute="centerY" id="goK-xS-50n"/>
<constraint firstItem="OFv-ne-Jzf" firstAttribute="centerX" secondItem="o6P-ie-0z3" secondAttribute="centerX" id="iEA-Q3-3Kd"/>
<constraint firstItem="OFv-ne-Jzf" firstAttribute="leading" secondItem="o6P-ie-0z3" secondAttribute="leading" constant="2" id="uzG-6h-XjN"/>
</constraints>
<connections>
<outlet property="textField" destination="OFv-ne-Jzf" id="nda-ol-e1j"/>
</connections>
@@ -410,17 +414,17 @@ DQ
</constraints>
</customView>
<customView id="YFw-L1-xW7">
<rect key="frame" x="0.0" y="145" width="510" height="238"/>
<rect key="frame" x="0.0" y="145" width="510" height="239"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<scrollView autohidesScrollers="YES" horizontalLineScroll="39" horizontalPageScroll="10" verticalLineScroll="39" verticalPageScroll="10" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="L9f-RN-ymm">
<rect key="frame" x="0.0" y="0.0" width="510" height="238"/>
<rect key="frame" x="0.0" y="0.0" width="510" height="239"/>
<clipView key="contentView" id="JKj-Cf-XlS">
<rect key="frame" x="1" y="0.0" width="508" height="237"/>
<rect key="frame" x="1" y="0.0" width="508" height="238"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" columnReordering="NO" multipleSelection="NO" autosaveColumns="NO" typeSelect="NO" rowHeight="37" rowSizeStyle="automatic" headerView="8SH-1C-Y6N" viewBased="YES" id="7Te-u0-Sax" customClass="ExpandedTableView" customModule="Subler" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="508" height="212"/>
<tableView verticalHuggingPriority="750" ambiguous="YES" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" columnReordering="NO" multipleSelection="NO" autosaveColumns="NO" typeSelect="NO" rowHeight="37" rowSizeStyle="automatic" headerView="8SH-1C-Y6N" viewBased="YES" id="7Te-u0-Sax" customClass="ExpandedTableView" customModule="Subler" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="508" height="213"/>
<autoresizingMask key="autoresizingMask"/>
<size key="intercellSpacing" width="3" height="2"/>
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
@@ -443,9 +447,8 @@ DQ
<rect key="frame" x="1" y="1" width="101" height="37"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" fixedFrame="YES" setsMaxLayoutWidthAtFirstLayout="YES" translatesAutoresizingMaskIntoConstraints="NO" id="wDJ-re-Kse">
<rect key="frame" x="0.0" y="0.0" width="101" height="37"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" setsMaxLayoutWidthAtFirstLayout="YES" translatesAutoresizingMaskIntoConstraints="NO" id="wDJ-re-Kse">
<rect key="frame" x="0.0" y="22" width="101" height="14"/>
<textFieldCell key="cell" controlSize="small" sendsActionOnEndEditing="YES" alignment="right" title="Table View Cell" id="5mH-2x-szO">
<font key="font" metaFont="smallSystem"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
@@ -453,6 +456,11 @@ DQ
</textFieldCell>
</textField>
</subviews>
<constraints>
<constraint firstItem="wDJ-re-Kse" firstAttribute="leading" secondItem="E0V-9u-Pze" secondAttribute="leading" constant="2" id="9kR-DD-Te2"/>
<constraint firstItem="wDJ-re-Kse" firstAttribute="centerX" secondItem="E0V-9u-Pze" secondAttribute="centerX" id="YKU-SV-O9K"/>
<constraint firstItem="wDJ-re-Kse" firstAttribute="top" secondItem="E0V-9u-Pze" secondAttribute="top" constant="1" id="fBB-oC-PIV"/>
</constraints>
<connections>
<outlet property="textField" destination="wDJ-re-Kse" id="oSs-MP-JCV"/>
</connections>
@@ -472,8 +480,8 @@ DQ
</textFieldCell>
<tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/>
<prototypeCellViews>
<tableCellView identifier="valueCellForSizing" misplaced="YES" id="lna-bi-Jhf">
<rect key="frame" x="105" y="1" width="401" height="37"/>
<tableCellView identifier="valueCellForSizing" id="lna-bi-Jhf">
<rect key="frame" x="105" y="1" width="401" height="14"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" setsMaxLayoutWidthAtFirstLayout="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Szc-uj-Lea">
@@ -496,12 +504,11 @@ DQ
</connections>
</tableCellView>
<tableCellView identifier="valueCell" id="hkR-Au-dHp">
<rect key="frame" x="105" y="40" width="401" height="37"/>
<rect key="frame" x="105" y="18" width="401" height="37"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" fixedFrame="YES" setsMaxLayoutWidthAtFirstLayout="YES" translatesAutoresizingMaskIntoConstraints="NO" id="uJ3-OT-6fm">
<rect key="frame" x="0.0" y="0.0" width="401" height="37"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" setsMaxLayoutWidthAtFirstLayout="YES" translatesAutoresizingMaskIntoConstraints="NO" id="uJ3-OT-6fm">
<rect key="frame" x="0.0" y="12" width="401" height="14"/>
<textFieldCell key="cell" controlSize="small" selectable="YES" sendsActionOnEndEditing="YES" title="Table View Cell" id="L0d-pm-lX4">
<font key="font" metaFont="smallSystem"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
@@ -509,6 +516,11 @@ DQ
</textFieldCell>
</textField>
</subviews>
<constraints>
<constraint firstItem="uJ3-OT-6fm" firstAttribute="centerX" secondItem="hkR-Au-dHp" secondAttribute="centerX" id="ar4-ud-YGR"/>
<constraint firstItem="uJ3-OT-6fm" firstAttribute="centerY" secondItem="hkR-Au-dHp" secondAttribute="centerY" id="g6p-F2-0vO"/>
<constraint firstItem="uJ3-OT-6fm" firstAttribute="leading" secondItem="hkR-Au-dHp" secondAttribute="leading" constant="2" id="wJx-yj-jQk"/>
</constraints>
<connections>
<outlet property="textField" destination="uJ3-OT-6fm" id="XCZ-Pc-eDa"/>
</connections>
@@ -528,7 +540,7 @@ DQ
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="50" id="ot4-UB-qcj"/>
</constraints>
<scroller key="horizontalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="YES" id="vAq-7z-LNe">
<rect key="frame" x="1" y="72" width="135" height="15"/>
<rect key="frame" x="1" y="222" width="508" height="16"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
<scroller key="verticalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="NO" id="car-MF-vd8">
@@ -574,6 +586,7 @@ DQ
<constraint firstItem="BfX-EM-ktQ" firstAttribute="leading" secondItem="QEr-1S-JZX" secondAttribute="leading" id="mjk-ta-h2N"/>
<constraint firstItem="zM1-YP-Au2" firstAttribute="leading" secondItem="dWj-kw-NVW" secondAttribute="trailing" constant="14" id="vyk-qX-8IX"/>
</constraints>
<point key="canvasLocation" x="139" y="153.5"/>
</view>
</objects>
</document>
+6 -1
View File
@@ -260,7 +260,12 @@ final class ArtworkSelectorController: NSViewController, NSCollectionViewDataSou
let range = (artworks.count - endIndex ..< artworks.count)
let indexes = range.map { IndexPath(item: $0, section: 0)}
imageBrowser.insertItems(at: Set(indexes))
if #available(OSX 10.13, *) {
imageBrowser.insertItems(at: Set(indexes))
} else {
// Call this on 10.12 and 10.11 to avoid a crash
imageBrowser.reloadData()
}
}
private func selectArtwork(type: ArtworkType, service: String) {
+38 -22
View File
@@ -115,9 +115,9 @@ final class ArtworkSelectorViewItemLabel : NSTextField {
final class ArtworkSelectorViewItemView: NSView {
let imageLayer: CALayer = CALayer()
let backgroundLayer: CALayer = CALayer()
let emptyLayer: CAShapeLayer = CAShapeLayer()
private let imageLayer: CALayer = CALayer()
private let backgroundLayer: CALayer = CALayer()
private let emptyLayer: CAShapeLayer = CAShapeLayer()
override init(frame frameRect: NSRect) {
super.init(frame: frameRect)
@@ -133,6 +133,13 @@ final class ArtworkSelectorViewItemView: NSView {
layer = CALayer()
wantsLayer = true
let actions: [String : CAAction] = ["contents": NSNull(),
"hidden": NSNull(),
"bounds": NSNull()]
imageLayer.actions = actions
backgroundLayer.actions = actions
emptyLayer.actions = actions
imageLayer.anchorPoint = CGPoint.zero
imageLayer.position = CGPoint(x: 4, y: 40)
imageLayer.contentsGravity = .resizeAspect
@@ -157,13 +164,6 @@ final class ArtworkSelectorViewItemView: NSView {
emptyLayer.fillColor = NSColor.windowBackgroundColor.cgColor
emptyLayer.isOpaque = true
let actions: [String : CAAction] = ["contents": NSNull(),
"hidden": NSNull(),
"bounds": NSNull()]
imageLayer.actions = actions
backgroundLayer.actions = actions
emptyLayer.actions = actions
updateBackgroundColor()
layer?.addSublayer(backgroundLayer)
@@ -211,28 +211,37 @@ final class ArtworkSelectorViewItemView: NSView {
backgroundLayer.bounds = CGRect(x: 0, y: 0, width: bounds.width, height: bounds.height - 36)
emptyLayer.bounds = CGRect(x: 0, y: 0, width: bounds.width - 16, height: bounds.height - 56)
let path = CGMutablePath()
path.addRoundedRect(in: emptyLayer.bounds, cornerWidth: 14, cornerHeight: 14)
emptyLayer.path = path
emptyLayer.path = CGPath(roundedRect: emptyLayer.bounds, cornerWidth: 14, cornerHeight: 14, transform: nil)
if let image = imageLayer.contents as? NSImage {
let rect = AVMakeRect(aspectRatio: image.size, insideRect: imageLayer.bounds)
let path = CGMutablePath()
path.addRect(rect)
imageLayer.shadowPath = path
imageLayer.shadowPath = CGPath(rect: rect, transform: nil)
} else {
imageLayer.shadowPath = nil
}
}
var highlighted: Bool = false {
didSet {
backgroundLayer.isHidden = !highlighted
}
}
var image: NSImage? {
didSet {
imageLayer.contents = image
imageLayer.shadowPath = nil
emptyLayer.isHidden = image != nil
}
}
}
final class ArtworkSelectorViewItem: NSCollectionViewItem {
// MARK: Properties
var itemView : ArtworkSelectorViewItemView { get { return (view as? ArtworkSelectorViewItemView)! } }
var itemView : ArtworkSelectorViewItemView? { get { return (view as? ArtworkSelectorViewItemView) } }
@IBOutlet var subTextField: NSTextField!
var doubleAction: Selector?
@@ -261,8 +270,7 @@ final class ArtworkSelectorViewItem: NSCollectionViewItem {
var image: NSImage? {
didSet {
itemView.imageLayer.contents = image
itemView.emptyLayer.isHidden = image != nil
itemView?.image = image
}
}
@@ -288,10 +296,10 @@ final class ArtworkSelectorViewItem: NSCollectionViewItem {
private func updateSelectionHighlight() {
if highlightState == .forSelection || (isSelected && highlightState != .forDeselection) {
itemView.backgroundLayer.isHidden = false
itemView?.highlighted = true
textField?.isHighlighted = true
} else {
itemView.backgroundLayer.isHidden = true
itemView?.highlighted = false
textField?.isHighlighted = false
}
}
@@ -306,4 +314,12 @@ final class ArtworkSelectorViewItem: NSCollectionViewItem {
}
}
override func prepareForReuse() {
title = nil
subtitle = nil
image = nil
itemView?.highlighted = false
textField?.isHighlighted = false
}
}
+2 -1
View File
@@ -40,11 +40,12 @@
<constraint firstItem="fGU-Kh-WjD" firstAttribute="leading" secondItem="Hz6-mo-xeY" secondAttribute="leading" constant="-2" id="0Wf-6t-6Lg"/>
<constraint firstAttribute="trailing" secondItem="Wkh-6c-0tU" secondAttribute="trailing" constant="-2" id="9df-FA-2lX"/>
<constraint firstAttribute="bottom" secondItem="Wkh-6c-0tU" secondAttribute="bottom" constant="17" id="EOh-x3-ntT"/>
<constraint firstItem="Wkh-6c-0tU" firstAttribute="top" relation="greaterThanOrEqual" secondItem="Hz6-mo-xeY" secondAttribute="top" constant="20" id="HaR-VX-NRg"/>
<constraint firstAttribute="bottom" secondItem="fGU-Kh-WjD" secondAttribute="bottom" constant="4" id="Xx6-ak-lcw"/>
<constraint firstItem="Wkh-6c-0tU" firstAttribute="leading" secondItem="Hz6-mo-xeY" secondAttribute="leading" constant="-2" id="cPi-y8-nFz"/>
<constraint firstAttribute="trailing" secondItem="fGU-Kh-WjD" secondAttribute="trailing" constant="-2" id="fLm-DU-mGT"/>
</constraints>
<point key="canvasLocation" x="-575" y="163.5"/>
<point key="canvasLocation" x="-781" y="102.5"/>
</customView>
</objects>
</document>
+3 -4
View File
@@ -45,10 +45,8 @@ class MetadataSearchViewController: ViewController, MetadataSearchControllerDele
}
override func transition(from fromViewController: NSViewController, to toViewController: NSViewController, options: NSViewController.TransitionOptions = [], completionHandler completion: (() -> Void)? = nil) {
CATransaction.begin()
addChild(toViewController)
super.transition(from: fromViewController, to: toViewController, options: options, completionHandler: completion)
CATransaction.commit()
}
func didSelect(metadata: MetadataResult?) {
@@ -57,8 +55,9 @@ class MetadataSearchViewController: ViewController, MetadataSearchControllerDele
delegate?.didSelect(metadata: result)
presentingViewController?.dismiss(self)
} else {
artworkViewController = ArtworkSelectorController(metadata: result, delegate: self)
transition(from: metadataViewController, to: artworkViewController!, options: [.slideForward, .allowUserInteraction], completionHandler: {
let controller = ArtworkSelectorController(metadata: result, delegate: self)
artworkViewController = controller
transition(from: metadataViewController, to: controller, options: [.slideForward], completionHandler: {
self.removeChild(at: 0)
self.view.window?.makeFirstResponder(self.artworkViewController?.imageBrowser)
})
+1
View File
@@ -753,6 +753,7 @@
TargetAttributes = {
8D15AC270486D014006FF6A4 = {
LastSwiftMigration = 1020;
ProvisioningStyle = Automatic;
SystemCapabilities = {
com.apple.HardenedRuntime = {
enabled = 1;