Fix navigation badge background

This commit is contained in:
Ilya Laktyushin 2021-12-01 19:24:44 +04:00
parent cb6ebecab4
commit dd7f239dc4

View File

@ -31,7 +31,7 @@ public final class NavigationBarBadgeNode: ASDisplayNode {
self.backgroundNode = ASImageNode() self.backgroundNode = ASImageNode()
self.backgroundNode.isLayerBacked = true self.backgroundNode.isLayerBacked = true
self.backgroundNode.displaysAsynchronously = false self.backgroundNode.displaysAsynchronously = false
self.backgroundNode.image = generateStretchableFilledCircleImage(radius: 18.0, color: fillColor, backgroundColor: nil) self.backgroundNode.image = generateStretchableFilledCircleImage(radius: 9.0, color: fillColor, backgroundColor: nil)
super.init() super.init()
@ -43,7 +43,7 @@ public final class NavigationBarBadgeNode: ASDisplayNode {
self.fillColor = fillColor self.fillColor = fillColor
self.strokeColor = strokeColor self.strokeColor = strokeColor
self.textColor = textColor self.textColor = textColor
self.backgroundNode.image = generateStretchableFilledCircleImage(radius: 18.0, color: fillColor, backgroundColor: nil) self.backgroundNode.image = generateStretchableFilledCircleImage(radius: 9.0, color: fillColor, backgroundColor: nil)
self.textNode.attributedText = NSAttributedString(string: self.text, font: self.font, textColor: self.textColor) self.textNode.attributedText = NSAttributedString(string: self.text, font: self.font, textColor: self.textColor)
self.textNode.redrawIfPossible() self.textNode.redrawIfPossible()
} }