Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

Commit

Permalink
Fix #1818: Update error design on PIN code entry/lockout
Browse files Browse the repository at this point in the history
  • Loading branch information
kylehickinson committed Nov 18, 2019
1 parent eb689ba commit ff897fe
Showing 1 changed file with 3 additions and 16 deletions.
19 changes: 3 additions & 16 deletions Client/Frontend/Widgets/ErrorToast.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ import SnapKit

private struct ErrorToastDefaultUX {
static let cornerRadius: CGFloat = 40
static let fillColor = UIColor.Photon.Red70
static let margins = UIEdgeInsets(top: 10, left: 12, bottom: 10, right: 12)
static let textColor = UIColor.Photon.White100
static let textColor = UIColor.Photon.Red70
}

class ErrorToast: UIView {
lazy var textLabel: UILabel = {
let label = UILabel()
label.textColor = ErrorToastDefaultUX.textColor
label.appearanceTextColor = ErrorToastDefaultUX.textColor
label.appearanceBackgroundColor = .clear
label.textAlignment = .center
label.numberOfLines = 0
return label
Expand All @@ -27,12 +27,6 @@ class ErrorToast: UIView {
}
}

var fillColor: UIColor = ErrorToastDefaultUX.fillColor {
didSet {
setNeedsDisplay()
}
}

override init(frame: CGRect) {
super.init(frame: frame)
isOpaque = false
Expand All @@ -45,11 +39,4 @@ class ErrorToast: UIView {
required init?(coder aDecoder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}

override func draw(_ rect: CGRect) {
super.draw(rect)
fillColor.setFill()
let path = UIBezierPath(roundedRect: rect, cornerRadius: cornerRadius)
path.fill()
}
}

0 comments on commit ff897fe

Please sign in to comment.