Fix internal layouting of lock view by simply using a nsview rather than fumbling with a stack view

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
Claudio Cambra 2024-07-31 19:54:02 +08:00 committed by Matthieu Gallien
parent 616ac2e50c
commit 4348869684

View file

@ -14,35 +14,34 @@
<outlet property="fileNameIcon" destination="KlP-OW-SKo" id="Dey-vA-qIG"/>
<outlet property="fileNameLabel" destination="LDe-7m-hvL" id="AzB-UH-ndO"/>
<outlet property="loadingIndicator" destination="UWQ-uR-PJA" id="Swv-It-LT9"/>
<outlet property="view" destination="Ge9-bk-WPE" id="F9c-24-JAT"/>
<outlet property="view" destination="MSC-7J-Z1I" id="6cA-xC-NDA"/>
</connections>
</customObject>
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
<stackView distribution="fill" orientation="horizontal" alignment="centerY" spacing="82" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" detachesHiddenViews="YES" id="Ge9-bk-WPE">
<rect key="frame" x="0.0" y="0.0" width="380" height="84"/>
<autoresizingMask key="autoresizingMask"/>
<customView translatesAutoresizingMaskIntoConstraints="NO" id="MSC-7J-Z1I">
<rect key="frame" x="0.0" y="0.0" width="500" height="87"/>
<subviews>
<progressIndicator maxValue="100" indeterminate="YES" style="spinning" translatesAutoresizingMaskIntoConstraints="NO" id="UWQ-uR-PJA">
<rect key="frame" x="10" y="26" width="32" height="32"/>
<progressIndicator horizontalHuggingPriority="1000" verticalHuggingPriority="1000" maxValue="100" indeterminate="YES" style="spinning" translatesAutoresizingMaskIntoConstraints="NO" id="UWQ-uR-PJA">
<rect key="frame" x="10" y="28" width="32" height="32"/>
<constraints>
<constraint firstAttribute="width" constant="32" id="ShG-G9-AMJ"/>
<constraint firstAttribute="width" secondItem="UWQ-uR-PJA" secondAttribute="height" multiplier="1:1" id="Tcq-dQ-mHX"/>
</constraints>
</progressIndicator>
<imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="KlP-OW-SKo">
<rect key="frame" x="52" y="6.5" width="64" height="71"/>
<imageView horizontalHuggingPriority="1000" verticalHuggingPriority="1000" translatesAutoresizingMaskIntoConstraints="NO" id="KlP-OW-SKo">
<rect key="frame" x="52" y="16.5" width="48" height="55"/>
<constraints>
<constraint firstAttribute="width" secondItem="KlP-OW-SKo" secondAttribute="height" multiplier="1:1" id="u2z-cf-k5P"/>
<constraint firstAttribute="width" constant="64" id="ucZ-Lb-C49"/>
<constraint firstAttribute="width" constant="48" id="ucZ-Lb-C49"/>
</constraints>
<imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyUpOrDown" image="doc" catalog="system" id="sA8-Dn-b0s"/>
</imageView>
<stackView distribution="fill" orientation="vertical" alignment="leading" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="dpJ-oy-su9">
<rect key="frame" x="126" y="21" width="202" height="43"/>
<stackView distribution="fillEqually" orientation="vertical" alignment="leading" spacing="10" horizontalStackHuggingPriority="250" verticalStackHuggingPriority="250" horizontalCompressionResistancePriority="1000" verticalCompressionResistancePriority="1000" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="dpJ-oy-su9">
<rect key="frame" x="110" y="21" width="338" height="45"/>
<subviews>
<textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" verticalCompressionResistancePriority="1000" translatesAutoresizingMaskIntoConstraints="NO" id="LDe-7m-hvL">
<rect key="frame" x="-2" y="24" width="206" height="19"/>
<textField focusRingType="none" verticalHuggingPriority="750" verticalCompressionResistancePriority="1000" translatesAutoresizingMaskIntoConstraints="NO" id="LDe-7m-hvL">
<rect key="frame" x="-2" y="26" width="342" height="19"/>
<textFieldCell key="cell" lineBreakMode="clipping" title="Locking file filename.txt…" id="Zld-Ku-SeH">
<font key="font" metaFont="systemBold" size="16"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
@ -50,7 +49,7 @@
</textFieldCell>
</textField>
<textField focusRingType="none" verticalHuggingPriority="749" horizontalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="DG3-ti-eu7">
<rect key="frame" x="-2" y="0.0" width="180" height="16"/>
<rect key="frame" x="-2" y="0.0" width="342" height="16"/>
<textFieldCell key="cell" selectable="YES" title="Communicating with server..." id="tz0-OE-Too">
<font key="font" metaFont="system"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
@ -59,7 +58,10 @@
</textField>
</subviews>
<constraints>
<constraint firstAttribute="width" relation="lessThanOrEqual" constant="300" id="NrA-4O-5Cz"/>
<constraint firstAttribute="trailing" secondItem="DG3-ti-eu7" secondAttribute="trailing" id="8TF-VE-4z7"/>
<constraint firstAttribute="trailing" secondItem="LDe-7m-hvL" secondAttribute="trailing" id="BAx-hY-Nrb"/>
<constraint firstItem="LDe-7m-hvL" firstAttribute="leading" secondItem="dpJ-oy-su9" secondAttribute="leading" id="NUj-8a-xvp"/>
<constraint firstItem="DG3-ti-eu7" firstAttribute="leading" secondItem="dpJ-oy-su9" secondAttribute="leading" id="eV4-Uv-5xX"/>
</constraints>
<visibilityPriorities>
<integer value="1000"/>
@ -70,8 +72,8 @@
<real value="3.4028234663852886e+38"/>
</customSpacing>
</stackView>
<button translatesAutoresizingMaskIntoConstraints="NO" id="7qN-mr-hAh">
<rect key="frame" x="338" y="21" width="32" height="43"/>
<button horizontalHuggingPriority="1000" verticalHuggingPriority="1000" translatesAutoresizingMaskIntoConstraints="NO" id="7qN-mr-hAh">
<rect key="frame" x="458" y="23" width="32" height="43"/>
<buttonCell key="cell" type="bevel" title="Close" bezelStyle="rounded" imagePosition="only" alignment="center" imageScaling="proportionallyDown" inset="2" id="7Oc-Xd-RzM">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
@ -86,32 +88,26 @@
</connections>
</button>
</subviews>
<edgeInsets key="edgeInsets" left="10" right="10" top="10" bottom="10"/>
<constraints>
<constraint firstItem="7qN-mr-hAh" firstAttribute="leading" secondItem="dpJ-oy-su9" secondAttribute="trailing" constant="10" id="0kg-rO-3s6"/>
<constraint firstItem="KlP-OW-SKo" firstAttribute="leading" secondItem="UWQ-uR-PJA" secondAttribute="trailing" constant="10" id="729-KY-1ZO"/>
<constraint firstAttribute="trailing" secondItem="7qN-mr-hAh" secondAttribute="trailing" constant="10" id="8le-E0-ewY"/>
<constraint firstItem="UWQ-uR-PJA" firstAttribute="top" relation="greaterThanOrEqual" secondItem="Ge9-bk-WPE" secondAttribute="top" constant="10" id="GVS-2N-A5a"/>
<constraint firstAttribute="bottom" secondItem="KlP-OW-SKo" secondAttribute="bottom" constant="10" id="Gaf-KL-ad2"/>
<constraint firstAttribute="bottom" relation="greaterThanOrEqual" secondItem="UWQ-uR-PJA" secondAttribute="bottom" constant="10" id="Ij8-Hs-jUO"/>
<constraint firstItem="KlP-OW-SKo" firstAttribute="top" secondItem="Ge9-bk-WPE" secondAttribute="top" constant="10" id="iJh-j0-HpH"/>
<constraint firstItem="UWQ-uR-PJA" firstAttribute="leading" secondItem="Ge9-bk-WPE" secondAttribute="leading" constant="10" id="kFD-ha-gp6"/>
<constraint firstItem="dpJ-oy-su9" firstAttribute="leading" secondItem="KlP-OW-SKo" secondAttribute="trailing" constant="10" id="tmh-RY-Zz1"/>
<constraint firstItem="KlP-OW-SKo" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="MSC-7J-Z1I" secondAttribute="leading" constant="10" id="42d-pC-0Lq"/>
<constraint firstItem="UWQ-uR-PJA" firstAttribute="top" relation="greaterThanOrEqual" secondItem="MSC-7J-Z1I" secondAttribute="top" constant="10" id="86t-6h-ezO"/>
<constraint firstItem="dpJ-oy-su9" firstAttribute="leading" secondItem="KlP-OW-SKo" secondAttribute="trailing" constant="10" id="CkI-Rn-Ens"/>
<constraint firstItem="7qN-mr-hAh" firstAttribute="leading" secondItem="dpJ-oy-su9" secondAttribute="trailing" constant="10" id="D0y-zd-Mkx"/>
<constraint firstItem="UWQ-uR-PJA" firstAttribute="leading" secondItem="MSC-7J-Z1I" secondAttribute="leading" constant="10" id="DOR-jC-JYh"/>
<constraint firstItem="dpJ-oy-su9" firstAttribute="top" relation="greaterThanOrEqual" secondItem="MSC-7J-Z1I" secondAttribute="top" constant="10" id="EnF-gg-RXe"/>
<constraint firstItem="UWQ-uR-PJA" firstAttribute="centerY" secondItem="MSC-7J-Z1I" secondAttribute="centerY" id="GAc-W2-Bue"/>
<constraint firstItem="KlP-OW-SKo" firstAttribute="top" relation="greaterThanOrEqual" secondItem="MSC-7J-Z1I" secondAttribute="top" constant="10" id="JEs-Z1-i2x"/>
<constraint firstItem="KlP-OW-SKo" firstAttribute="leading" secondItem="UWQ-uR-PJA" secondAttribute="trailing" constant="10" id="YHI-Z6-DqR"/>
<constraint firstAttribute="bottom" relation="greaterThanOrEqual" secondItem="KlP-OW-SKo" secondAttribute="bottom" constant="10" id="g7d-i6-GFB"/>
<constraint firstAttribute="trailing" secondItem="7qN-mr-hAh" secondAttribute="trailing" constant="10" id="jyt-D2-tiy"/>
<constraint firstItem="7qN-mr-hAh" firstAttribute="centerY" secondItem="MSC-7J-Z1I" secondAttribute="centerY" id="tuo-AL-2Xr"/>
<constraint firstItem="KlP-OW-SKo" firstAttribute="centerY" secondItem="MSC-7J-Z1I" secondAttribute="centerY" id="upa-4o-uiG"/>
<constraint firstAttribute="bottom" relation="greaterThanOrEqual" secondItem="dpJ-oy-su9" secondAttribute="bottom" constant="10" id="xOO-EK-GWO"/>
<constraint firstItem="dpJ-oy-su9" firstAttribute="centerY" secondItem="MSC-7J-Z1I" secondAttribute="centerY" id="yKD-Bd-jC9"/>
<constraint firstAttribute="bottom" relation="greaterThanOrEqual" secondItem="UWQ-uR-PJA" secondAttribute="bottom" constant="10" id="zgg-6J-3Zy"/>
</constraints>
<visibilityPriorities>
<integer value="1000"/>
<integer value="1000"/>
<integer value="1000"/>
<integer value="1000"/>
</visibilityPriorities>
<customSpacing>
<real value="3.4028234663852886e+38"/>
<real value="3.4028234663852886e+38"/>
<real value="3.4028234663852886e+38"/>
<real value="3.4028234663852886e+38"/>
</customSpacing>
<point key="canvasLocation" x="-473.5" y="-32"/>
</stackView>
<point key="canvasLocation" x="-266" y="-126.5"/>
</customView>
</objects>
<resources>
<image name="doc" catalog="system" width="14" height="16"/>