mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
Various Improvements
This commit is contained in:
@@ -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, *) {
|
||||
|
||||
Reference in New Issue
Block a user