diff --git a/AlphaWallet/UI/AddressTextField.swift b/AlphaWallet/UI/AddressTextField.swift index 4e5317c22..6af9763be 100644 --- a/AlphaWallet/UI/AddressTextField.swift +++ b/AlphaWallet/UI/AddressTextField.swift @@ -241,7 +241,7 @@ class AddressTextField: UIControl { } private func makeTargetAddressRightView() -> UIView { - let scanQRCodeButton = Button(size: .normal, style: .borderless) + let scanQRCodeButton = Button(size: .normal, style: .system) scanQRCodeButton.translatesAutoresizingMaskIntoConstraints = false scanQRCodeButton.setImage(R.image.qr_code_icon(), for: .normal) scanQRCodeButton.addTarget(self, action: #selector(openReader), for: .touchUpInside) @@ -253,7 +253,7 @@ class AddressTextField: UIControl { let targetAddressRightView = [scanQRCodeButton].asStackView(distribution: .fill) targetAddressRightView.clipsToBounds = false targetAddressRightView.layer.masksToBounds = false - + targetAddressRightView.backgroundColor = .clear //As of iOS 13, we need to constrain the width of `rightView` let rightViewFittingSize = targetAddressRightView.systemLayoutSizeFitting(UIView.layoutFittingCompressedSize) NSLayoutConstraint.activate([ diff --git a/AlphaWallet/UI/Button.swift b/AlphaWallet/UI/Button.swift index 4b3957812..6ab83d87b 100644 --- a/AlphaWallet/UI/Button.swift +++ b/AlphaWallet/UI/Button.swift @@ -24,11 +24,13 @@ enum ButtonStyle: Int { case squared case border case borderless + case system var backgroundColor: UIColor { switch self { case .solid, .squared: return Colors.appTint case .border, .borderless: return .white + case .system: return .clear } } @@ -37,13 +39,14 @@ enum ButtonStyle: Int { case .solid, .squared: return Colors.appTint case .border: return Colors.appTint case .borderless: return .white + case .system: return .clear } } var cornerRadius: CGFloat { switch self { case .solid, .border: return 5 - case .squared, .borderless: return 0 + case .squared, .borderless, .system: return 0 } } @@ -52,7 +55,7 @@ enum ButtonStyle: Int { case .solid, .squared, .border, - .borderless: + .borderless, .system: return Fonts.semibold(size: 16)! } } @@ -60,7 +63,7 @@ enum ButtonStyle: Int { var textColor: UIColor { switch self { case .solid, .squared: return Colors.appWhite - case .border, .borderless: return Colors.appTint + case .border, .borderless, .system: return Colors.appTint } } @@ -68,20 +71,20 @@ enum ButtonStyle: Int { switch self { case .solid, .squared: return UIColor(white: 1, alpha: 0.8) case .border: return Colors.appWhite - case .borderless: return Colors.appTint + case .borderless, .system: return Colors.appTint } } var borderColor: UIColor { switch self { case .solid, .squared, .border: return GroupedTable.Color.background - case .borderless: return .clear + case .borderless, .system: return .clear } } var borderWidth: CGFloat { switch self { - case .solid, .squared, .borderless: return 0 + case .solid, .squared, .borderless, .system: return 0 case .border: return 1 } }