Load shadow settings from theme files

This commit is contained in:
Ali
2020-01-25 02:01:09 +04:00
parent 53eee9eccd
commit 0fe641ec1c
8 changed files with 85 additions and 34 deletions

View File

@@ -566,18 +566,18 @@ public final class PresentationThemeBubbleColorComponents {
public let gradientFill: UIColor
public let highlightedFill: UIColor
public let stroke: UIColor
//public let shadow: PresentationThemeBubbleShadow?
public let shadow: PresentationThemeBubbleShadow?
public init(fill: UIColor, gradientFill: UIColor? = nil, highlightedFill: UIColor, stroke: UIColor/*, shadow: PresentationThemeBubbleShadow?*/) {
public init(fill: UIColor, gradientFill: UIColor? = nil, highlightedFill: UIColor, stroke: UIColor, shadow: PresentationThemeBubbleShadow?) {
self.fill = fill
self.gradientFill = gradientFill ?? fill
self.highlightedFill = highlightedFill
self.stroke = stroke
//self.shadow = shadow
self.shadow = shadow
}
public func withUpdated(fill: UIColor? = nil, gradientFill: UIColor? = nil, highlightedFill: UIColor? = nil, stroke: UIColor? = nil) -> PresentationThemeBubbleColorComponents {
return PresentationThemeBubbleColorComponents(fill: fill ?? self.fill, gradientFill: gradientFill ?? self.gradientFill, highlightedFill: highlightedFill ?? self.highlightedFill, stroke: stroke ?? self.stroke/*, shadow: self.shadow*/)
return PresentationThemeBubbleColorComponents(fill: fill ?? self.fill, gradientFill: gradientFill ?? self.gradientFill, highlightedFill: highlightedFill ?? self.highlightedFill, stroke: stroke ?? self.stroke, shadow: self.shadow)
}
}