Refactor some windows to views.

This commit is contained in:
Damiano Galassi committed 2019-08-07 14:40:24 +02:00
1 parent 837471b753
commit 106813d5e5
18 files changed
+1685 -1879

No files matched your search

+124 -115
View File
@@ -1,133 +1,142 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="14269.14" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<dependencies>
<deployment version="101100" identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="14269.14"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="14490.70"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<customObject id="-2" userLabel="File's Owner" customClass="ArtworkSelectorController" customModule="Subler" customModuleProvider="target">
<connections>
<outlet property="addArtworkButton" destination="9" id="46"/>
<outlet property="imageBrowser" destination="dsp-Oy-lJU" id="MJV-to-bBM"/>
<outlet property="loadMoreArtworkButton" destination="7" id="48"/>
<outlet property="slider" destination="8" id="43"/>
<outlet property="window" destination="3" id="37"/>
<outlet property="addArtworkButton" destination="fCL-eV-Fib" id="HSP-q9-au1"/>
<outlet property="imageBrowser" destination="234-cJ-3Un" id="WQ5-6l-hLv"/>
<outlet property="loadMoreArtworkButton" destination="iH5-SJ-sDV" id="AaQ-Ti-f6l"/>
<outlet property="progress" destination="AYL-Jp-agY" id="7lH-Ug-dos"/>
<outlet property="progressText" destination="NEi-uU-Lh7" id="nIf-3x-UiN"/>
<outlet property="slider" destination="fMj-Ew-Qej" id="K1J-fq-A0m"/>
<outlet property="view" destination="KSl-SU-b4m" id="WF4-1Q-B7f"/>
</connections>
</customObject>
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
<window title="Window" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" visibleAtLaunch="NO" frameAutosaveName="artworkWindow" animationBehavior="default" id="3">
<windowStyleMask key="styleMask" titled="YES" closable="YES" resizable="YES"/>
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
<rect key="contentRect" x="227" y="346" width="480" height="380"/>
<rect key="screenRect" x="0.0" y="0.0" width="2560" height="1417"/>
<value key="minSize" type="size" width="480" height="380"/>
<view key="contentView" id="4">
<rect key="frame" x="0.0" y="0.0" width="480" height="380"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="9">
<rect key="frame" x="338" y="12" 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="14">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
<string key="keyEquivalent" base64-UTF8="YES">
<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"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="fCL-eV-Fib">
<rect key="frame" x="401" y="12" 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"/>
<string key="keyEquivalent" base64-UTF8="YES">
DQ
</string>
</buttonCell>
<connections>
<action selector="addArtwork:" target="-2" id="38"/>
</connections>
</button>
<slider verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="8">
<rect key="frame" x="360" y="49" width="100" height="18"/>
<constraints>
<constraint firstAttribute="width" constant="100" id="0Mf-Un-HXH"/>
</constraints>
<sliderCell key="cell" controlSize="small" continuous="YES" alignment="left" maxValue="100" doubleValue="50" tickMarkPosition="above" numberOfTickMarks="5" sliderType="linear" id="15"/>
<accessibility description="Zoom"/>
<connections>
<action selector="zoomSliderDidChange:" target="-2" id="44"/>
</connections>
</slider>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="7">
<rect key="frame" x="14" y="12" width="166" height="32"/>
<buttonCell key="cell" type="push" title="Load more artwork..." bezelStyle="rounded" alignment="center" enabled="NO" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="16">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
<string key="keyEquivalent">l</string>
<modifierMask key="keyEquivalentModifierMask" command="YES"/>
</buttonCell>
<connections>
<action selector="loadMoreArtwork:" target="-2" id="47"/>
</connections>
</button>
<button horizontalHuggingPriority="249" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="49">
<rect key="frame" x="265" y="12" width="73" height="32"/>
<buttonCell key="cell" type="push" title="None" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="50">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
<string key="keyEquivalent" base64-UTF8="YES">
</buttonCell>
<connections>
<action selector="addArtwork:" target="-2" id="eGv-gN-uXf"/>
</connections>
</button>
<slider verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="fMj-Ew-Qej">
<rect key="frame" x="423" y="49" width="100" height="18"/>
<constraints>
<constraint firstAttribute="width" constant="100" id="6u0-UA-h3Q"/>
</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"/>
<connections>
<action selector="zoomSliderDidChange:" target="-2" id="aZZ-r0-e8K"/>
</connections>
</slider>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="iH5-SJ-sDV">
<rect key="frame" x="14" y="12" width="166" height="32"/>
<buttonCell key="cell" type="push" title="Load more artwork..." bezelStyle="rounded" alignment="center" enabled="NO" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="40h-Rv-m31">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
<string key="keyEquivalent">l</string>
<modifierMask key="keyEquivalentModifierMask" command="YES"/>
</buttonCell>
<connections>
<action selector="loadMoreArtwork:" target="-2" id="lrj-Sl-kGk"/>
</connections>
</button>
<button horizontalHuggingPriority="249" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Zyu-WY-ltM">
<rect key="frame" x="328" y="12" 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"/>
<string key="keyEquivalent" base64-UTF8="YES">
Gw
</string>
</buttonCell>
<connections>
<action selector="addNoArtwork:" target="-2" id="51"/>
</connections>
</button>
<scrollView wantsLayer="YES" autohidesScrollers="YES" horizontalLineScroll="10" horizontalPageScroll="10" verticalLineScroll="10" verticalPageScroll="10" hasHorizontalScroller="NO" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="1V5-n3-xKs">
<rect key="frame" x="20" y="75" width="440" height="285"/>
<clipView key="contentView" drawsBackground="NO" id="5rm-GN-VhB">
<rect key="frame" x="1" y="1" width="438" height="283"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<collectionView selectable="YES" allowsMultipleSelection="YES" id="dsp-Oy-lJU" customClass="CollectionView" customModule="Subler" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="438" height="283"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES"/>
<collectionViewFlowLayout key="collectionViewLayout" minimumInteritemSpacing="10" minimumLineSpacing="10" id="jsh-bc-hMg">
<size key="itemSize" width="154" height="194"/>
<edgeInsets key="sectionInset" left="8" right="8" top="8" bottom="8"/>
</collectionViewFlowLayout>
<color key="primaryBackgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
<connections>
<outlet property="dataSource" destination="-2" id="oM6-JY-ET6"/>
<outlet property="delegate" destination="-2" id="uBZ-z7-Rag"/>
</connections>
</collectionView>
</subviews>
</clipView>
<scroller key="horizontalScroller" hidden="YES" verticalHuggingPriority="750" horizontal="YES" id="VPu-d7-Ls1">
<rect key="frame" x="-100" y="-100" width="372" height="16"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
<scroller key="verticalScroller" hidden="YES" verticalHuggingPriority="750" horizontal="NO" id="63w-uG-eHg">
<rect key="frame" x="403" y="1" width="16" height="251"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
</scrollView>
</subviews>
<constraints>
<constraint firstItem="9" firstAttribute="top" secondItem="8" secondAttribute="bottom" constant="10" id="42t-0L-Sim"/>
<constraint firstItem="9" firstAttribute="leading" secondItem="49" secondAttribute="trailing" constant="12" symbolic="YES" id="9KU-rV-HX6"/>
<constraint firstAttribute="trailing" secondItem="9" secondAttribute="trailing" constant="20" id="Afl-w6-Sam"/>
<constraint firstAttribute="bottom" secondItem="7" secondAttribute="bottom" constant="19" id="Ef2-6N-v4D"/>
<constraint firstItem="49" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="7" secondAttribute="trailing" constant="66" id="KZN-qg-yUG"/>
<constraint firstItem="1V5-n3-xKs" firstAttribute="top" secondItem="4" secondAttribute="top" constant="20" id="Sbz-On-xIY"/>
<constraint firstItem="7" firstAttribute="leading" secondItem="4" secondAttribute="leading" constant="20" id="UkB-GM-zr7"/>
<constraint firstItem="7" firstAttribute="baseline" secondItem="49" secondAttribute="baseline" id="X0P-3j-fGS"/>
<constraint firstItem="1V5-n3-xKs" firstAttribute="leading" secondItem="4" secondAttribute="leading" constant="20" id="YA3-u4-Re0"/>
<constraint firstItem="8" firstAttribute="top" secondItem="1V5-n3-xKs" secondAttribute="bottom" constant="8" id="d0O-3L-94x"/>
<constraint firstItem="8" firstAttribute="trailing" secondItem="9" secondAttribute="trailing" id="fJ9-o3-pFG"/>
<constraint firstAttribute="trailing" secondItem="1V5-n3-xKs" secondAttribute="trailing" constant="20" id="hz6-yA-FD7"/>
<constraint firstItem="49" firstAttribute="baseline" secondItem="9" secondAttribute="baseline" id="s1P-63-ywo"/>
</constraints>
</view>
<connections>
<outlet property="delegate" destination="-2" id="35"/>
</connections>
<point key="canvasLocation" x="154" y="-19"/>
</window>
<collectionViewItem id="tcm-Rs-Ndm" customClass="ArtworkSelectorViewItem" customModule="Subler" customModuleProvider="target"/>
</buttonCell>
<connections>
<action selector="addNoArtwork:" target="-2" id="un8-s7-Akx"/>
</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="75" width="503" height="460"/>
<clipView key="contentView" id="cHe-z7-drT">
<rect key="frame" x="1" y="1" width="501" height="458"/>
<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="900"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES"/>
<collectionViewFlowLayout key="collectionViewLayout" minimumInteritemSpacing="10" minimumLineSpacing="10" id="lte-fF-bVi">
<size key="itemSize" width="154" height="194"/>
<edgeInsets key="sectionInset" left="8" right="8" top="8" bottom="8"/>
</collectionViewFlowLayout>
<color key="primaryBackgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
<connections>
<outlet property="dataSource" destination="-2" id="oxk-iV-At8"/>
<outlet property="delegate" destination="-2" id="k48-9q-LQv"/>
</connections>
</collectionView>
</subviews>
</clipView>
<scroller key="horizontalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="YES" id="xE2-pc-Ql5">
<rect key="frame" x="-100" y="-100" width="372" height="16"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
<scroller key="verticalScroller" wantsLayer="YES" verticalHuggingPriority="750" horizontal="NO" id="nbX-9d-w82">
<rect key="frame" x="486" y="1" width="16" height="458"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
</scrollView>
<progressIndicator hidden="YES" wantsLayer="YES" horizontalHuggingPriority="750" verticalHuggingPriority="750" maxValue="100" bezeled="NO" indeterminate="YES" controlSize="small" style="spinning" translatesAutoresizingMaskIntoConstraints="NO" id="AYL-Jp-agY">
<rect key="frame" x="20" y="48" width="16" height="16"/>
</progressIndicator>
<textField hidden="YES" horizontalHuggingPriority="249" verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="NEi-uU-Lh7">
<rect key="frame" x="41" y="49" width="86" height="14"/>
<textFieldCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Progress status" id="TbL-2H-ra9">
<font key="font" metaFont="smallSystem"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</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="19" id="eKv-c7-1DF"/>
<constraint firstItem="AYL-Jp-agY" firstAttribute="top" secondItem="c0O-We-pZd" secondAttribute="bottom" constant="11" id="eXW-TZ-PUd"/>
<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"/>
</constraints>
<point key="canvasLocation" x="171.5" y="241.5"/>
</view>
</objects>
</document>