Manos Chorianopoulos

CouponViewController ui fixes

......@@ -100,19 +100,19 @@ import SwiftEventBus
redeemButton.backgroundColor = UIColor(red: 0.05, green: 0.65, blue: 0.00, alpha: 1.00)
redeemButton.layer.cornerRadius = 16.0
redeemButton.frame = CGRect(x: 0.0, y: 0.0, width: redeemButton.intrinsicContentSize.width, height: 44)
redeemButton.contentEdgeInsets = UIEdgeInsets(top: 1, left: 16, bottom: 0, right: 16)
redeemButton.contentEdgeInsets = UIEdgeInsets(top: 1, left: 28, bottom: 0, right: 28)
// Fix width for ipad
if UIDevice.current.userInterfaceIdiom == .pad {
// iPad
redeemButton.titleLabel?.font = UIFont(name: "PeridotPE-SemiBold", size: 20)
redeemButton.titleLabel?.font = UIFont(name: "PeridotPE-SemiBold", size: 19)
// redeemButton.widthAnchor.constraint(equalToConstant: 250).isActive = true
} else {
// not iPad (iPhone, mac, tv, carPlay, unspecified)
redeemButton.titleLabel?.font = UIFont(name: "PeridotPE-SemiBold", size: 18)
redeemButton.titleLabel?.font = UIFont(name: "PeridotPE-SemiBold", size: 17)
// redeemButton.widthAnchor.constraint(equalTo: view.widthAnchor, multiplier: 0.6).isActive = true
}
termsButton.titleLabel?.font = UIFont(name: "PeridotPE-Bold", size: 16)
termsButton.titleLabel?.font = UIFont(name: "PeridotPE-Bold", size: 15)
// termsButton.imageView?.layer.transform = CATransform3DMakeScale(1.5, 1.5, 1.5)
termsButton.setTitle("Όροι χρήσης", for: .normal)
termsButton.setTitleColor(UIColor(red: 0.13, green: 0.13, blue: 0.13, alpha: 1.00), for: .normal)
......@@ -125,9 +125,9 @@ import SwiftEventBus
let htmlText = couponset?.terms ?? ""
termsTextView.attributedText = htmlText.htmlToAttributedString
termsTextView.font = UIFont(name: "PeridotPE-Regular", size: 15)
termsTextView.font = UIFont(name: "PeridotPE-Regular", size: 16)
termsTextView.textColor = UIColor(red: 0.62, green: 0.62, blue: 0.61, alpha: 1.00)
termsTextView.textAlignment = .center
termsTextView.textAlignment = .left
termsTextView.isScrollEnabled = false
termsTextView.isUserInteractionEnabled = true
termsTextView.isEditable = false
......
......@@ -4007,13 +4007,13 @@
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Πάρε δωρεάν μηνιαία πακέτα με πάνες στα supermarket Σκλαβενίτης!" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="isU-Qv-94G">
<rect key="frame" x="20" y="220" width="374" height="40"/>
<rect key="frame" x="20" y="230" width="374" height="39.5"/>
<fontDescription key="fontDescription" name="BTCosmo-Bold" family="BTCosmo" pointSize="17"/>
<color key="textColor" red="0.12941176470588234" green="0.12941176470588234" blue="0.12941176470588234" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" editable="NO" textAlignment="center" selectable="NO" translatesAutoresizingMaskIntoConstraints="NO" id="2YG-ey-cyw" customClass="UnselectableTappableTextView" customModule="SwiftWarplyFramework">
<rect key="frame" x="20" y="275" width="374" height="0.0"/>
<rect key="frame" x="20" y="284.5" width="374" height="0.0"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstAttribute="height" id="GaK-QZ-z7W"/>
......@@ -4023,9 +4023,9 @@
<textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
</textView>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="FCd-hv-dHg">
<rect key="frame" x="161" y="375" width="92" height="44"/>
<rect key="frame" x="158" y="384.5" width="98" height="55"/>
<constraints>
<constraint firstAttribute="height" constant="44" id="n2w-Tx-hhO"/>
<constraint firstAttribute="height" constant="55" id="n2w-Tx-hhO"/>
</constraints>
<fontDescription key="fontDescription" name="PeridotPE-SBold" family="Peridot PE" pointSize="16"/>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
......@@ -4037,7 +4037,7 @@
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="KvN-fk-rlm">
<rect key="frame" x="103.5" y="439" width="207" height="50"/>
<rect key="frame" x="103.5" y="459.5" width="207" height="50"/>
<constraints>
<constraint firstAttribute="height" constant="50" id="O7T-ug-rTB"/>
</constraints>
......@@ -4052,7 +4052,7 @@
</connections>
</button>
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" editable="NO" textAlignment="center" selectable="NO" translatesAutoresizingMaskIntoConstraints="NO" id="siA-c8-Ub8" customClass="UnselectableTappableTextView" customModule="SwiftWarplyFramework">
<rect key="frame" x="20" y="499" width="374" height="0.0"/>
<rect key="frame" x="20" y="519.5" width="374" height="0.0"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstAttribute="height" id="BWJ-i6-UeO"/>
......@@ -4082,7 +4082,7 @@
<constraint firstItem="2YG-ey-cyw" firstAttribute="top" secondItem="isU-Qv-94G" secondAttribute="bottom" constant="15" id="mbx-ls-aMK"/>
<constraint firstItem="3SX-fR-ph2" firstAttribute="leading" secondItem="uTN-Qr-wBi" secondAttribute="leading" id="nBV-nm-wOq"/>
<constraint firstItem="3SX-fR-ph2" firstAttribute="top" secondItem="uTN-Qr-wBi" secondAttribute="top" id="oaX-KH-TEh"/>
<constraint firstItem="isU-Qv-94G" firstAttribute="top" secondItem="3SX-fR-ph2" secondAttribute="bottom" constant="20" id="vQf-lC-GgG"/>
<constraint firstItem="isU-Qv-94G" firstAttribute="top" secondItem="3SX-fR-ph2" secondAttribute="bottom" constant="30" id="vQf-lC-GgG"/>
</constraints>
</view>
</subviews>
......