Various Improvements

This commit is contained in:
Ilya Laktyushin
2021-08-07 22:55:08 +03:00
parent 6b3103bafc
commit 2e989d1369
46 changed files with 1743 additions and 254 deletions

View File

@@ -5,10 +5,12 @@ import Display
public final class SolidRoundedButtonTheme {
public let backgroundColor: UIColor
public let gradientBackgroundColor: UIColor?
public let foregroundColor: UIColor
public init(backgroundColor: UIColor, foregroundColor: UIColor) {
public init(backgroundColor: UIColor, gradientBackgroundColor: UIColor? = nil, foregroundColor: UIColor) {
self.backgroundColor = backgroundColor
self.gradientBackgroundColor = gradientBackgroundColor
self.foregroundColor = foregroundColor
}
}
@@ -59,6 +61,7 @@ public final class SolidRoundedButtonNode: ASDisplayNode {
self.title = title
self.buttonBackgroundNode = ASDisplayNode()
self.buttonBackgroundNode.clipsToBounds = true
self.buttonBackgroundNode.backgroundColor = theme.backgroundColor
self.buttonBackgroundNode.cornerRadius = cornerRadius
if #available(iOS 13.0, *) {