mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Fix check
This commit is contained in:
parent
6658280ed8
commit
6020b4ed14
@ -391,7 +391,7 @@ public class CheckLayer: CALayer {
|
||||
}
|
||||
}
|
||||
|
||||
if !parameters.theme.filledBorder {
|
||||
if !parameters.theme.filledBorder && !parameters.theme.hasShadow && !parameters.theme.overlayBorder {
|
||||
checkProgress = parameters.animationProgress
|
||||
|
||||
let fillProgress: CGFloat = parameters.animationProgress
|
||||
@ -468,8 +468,9 @@ public class CheckLayer: CALayer {
|
||||
|
||||
context.strokePath()
|
||||
case let .counter(number):
|
||||
let text = NSAttributedString(string: "\(number)", font: Font.with(size: 16.0, design: .round, weight: .regular, traits: []), textColor: parameters.theme.strokeColor)
|
||||
text.draw(at: CGPoint())
|
||||
let text = NSAttributedString(string: "\(number)", font: Font.with(size: 16.0, design: .round, weight: .regular, traits: []), textColor: parameters.theme.strokeColor.withMultipliedAlpha(parameters.animationProgress))
|
||||
let textRect = text.boundingRect(with: CGSize(width: 100.0, height: 100.0), options: [.usesLineFragmentOrigin], context: nil)
|
||||
text.draw(at: CGPoint(x: UIScreenPixel + textRect.minX + floor((size.width - textRect.width) * 0.5), y: textRect.minY + floor((size.height - textRect.height) * 0.5)))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user