Skip to content

Commit

Permalink
Changed full width button to a rounded button (#308)
Browse files Browse the repository at this point in the history
* #302 changed full width button to a rounded button
- fixed passcode view, error label and cancel button for smaller display sizes (iPhone SE)

* Changed constraints for theme buttons max width
  • Loading branch information
hosy authored Mar 8, 2019
1 parent 1a6ba33 commit 4053c53
Show file tree
Hide file tree
Showing 3 changed files with 77 additions and 61 deletions.
7 changes: 5 additions & 2 deletions ownCloud/Server List/ServerListTableViewController.xib
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@
<rect key="frame" x="0.0" y="283" width="241.5" height="43"/>
<color key="backgroundColor" red="0.27450980390000002" green="0.54901960780000003" blue="0.7843137255" alpha="1" colorSpace="calibratedRGB"/>
<accessibility key="accessibilityConfiguration" identifier="addServer"/>
<constraints>
<constraint firstAttribute="width" relation="lessThanOrEqual" constant="280" id="ddm-Lk-mEG"/>
</constraints>
<color key="tintColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
<state key="normal" title="Add account">
<color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
Expand All @@ -80,9 +83,7 @@ Start by adding your server.</string>
</view>
</subviews>
<constraints>
<constraint firstItem="Jaa-D8-ghC" firstAttribute="leading" secondItem="IEC-5d-Hb5" secondAttribute="leading" id="52z-ez-wTm"/>
<constraint firstItem="IEC-5d-Hb5" firstAttribute="centerX" secondItem="PJc-v9-DYn" secondAttribute="centerX" id="5VX-tG-MwV"/>
<constraint firstItem="Jaa-D8-ghC" firstAttribute="trailing" secondItem="IEC-5d-Hb5" secondAttribute="trailing" id="7v3-R6-kKd"/>
<constraint firstItem="c8n-gy-7HF" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="xJw-Td-7h2" secondAttribute="leading" id="9hZ-i6-GgM"/>
<constraint firstItem="c8n-gy-7HF" firstAttribute="top" secondItem="fP1-O2-lkg" secondAttribute="bottom" constant="30" id="9vT-H5-xlR"/>
<constraint firstItem="IEC-5d-Hb5" firstAttribute="leading" relation="lessThanOrEqual" secondItem="xJw-Td-7h2" secondAttribute="leading" id="AcY-Wr-x1B"/>
Expand All @@ -93,12 +94,14 @@ Start by adding your server.</string>
<constraint firstItem="fP1-O2-lkg" firstAttribute="top" secondItem="xJw-Td-7h2" secondAttribute="top" id="c7O-MV-CAw"/>
<constraint firstItem="xJw-Td-7h2" firstAttribute="trailing" secondItem="fP1-O2-lkg" secondAttribute="trailing" id="cF9-UI-9xL"/>
<constraint firstItem="xJw-Td-7h2" firstAttribute="trailing" relation="lessThanOrEqual" secondItem="c8n-gy-7HF" secondAttribute="trailing" id="fQE-8k-zir"/>
<constraint firstItem="xJw-Td-7h2" firstAttribute="trailing" secondItem="Jaa-D8-ghC" secondAttribute="trailing" id="gLY-Nv-73j"/>
<constraint firstItem="x7I-De-RhT" firstAttribute="bottom" secondItem="fP1-O2-lkg" secondAttribute="bottom" id="hPm-L8-5gB"/>
<constraint firstItem="fP1-O2-lkg" firstAttribute="centerX" secondItem="PJc-v9-DYn" secondAttribute="centerX" id="iBg-us-cdK"/>
<constraint firstItem="xJw-Td-7h2" firstAttribute="bottom" secondItem="Jaa-D8-ghC" secondAttribute="bottom" id="jPt-3z-e1W"/>
<constraint firstItem="x7I-De-RhT" firstAttribute="top" secondItem="fP1-O2-lkg" secondAttribute="top" id="oXa-Tt-Kb4"/>
<constraint firstItem="x7I-De-RhT" firstAttribute="leading" secondItem="fP1-O2-lkg" secondAttribute="leading" id="r2P-zD-FI5"/>
<constraint firstItem="Jaa-D8-ghC" firstAttribute="centerX" secondItem="PJc-v9-DYn" secondAttribute="centerX" id="rYy-mZ-wyn"/>
<constraint firstItem="Jaa-D8-ghC" firstAttribute="leading" secondItem="xJw-Td-7h2" secondAttribute="leading" id="s2Y-9J-kgb"/>
<constraint firstItem="c8n-gy-7HF" firstAttribute="centerX" secondItem="PJc-v9-DYn" secondAttribute="centerX" id="u0i-ca-Uiz"/>
<constraint firstItem="Jaa-D8-ghC" firstAttribute="top" secondItem="IEC-5d-Hb5" secondAttribute="bottom" constant="25" id="wen-iH-60d"/>
</constraints>
Expand Down
3 changes: 2 additions & 1 deletion ownCloud/Settings/Passcode/PasscodeViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,8 @@ class PasscodeViewController: UIViewController, Themeable {
self.keypadButtonsEnabled = { self.keypadButtonsEnabled }()
self.keypadButtonsHidden = { self.keypadButtonsHidden }()
self.screenBlurringEnabled = { self.screenBlurringEnabled }()
self.errorMessageLabel?.minimumScaleFactor = 0.5
self.errorMessageLabel?.adjustsFontSizeToFitWidth = true
}

override func viewWillAppear(_ animated: Bool) {
Expand Down Expand Up @@ -267,7 +269,6 @@ class PasscodeViewController: UIViewController, Themeable {
deleteButton?.themeColorCollection = ThemeColorPairCollection(fromPair: ThemeColorPair(foreground: collection.tintColor, background: collection.tableBackgroundColor))

cancelButton?.applyThemeCollection(collection, itemStyle: .defaultForItem)
cancelButton?.layer.cornerRadius = 0
}

// MARK: - External Keyboard Commands
Expand Down
Loading

0 comments on commit 4053c53

Please sign in to comment.