mirror of
https://github.com/TelegramMessenger/Telegram-iOS.git
synced 2026-07-06 03:33:41 +02:00
Fix check
This commit is contained in:
parent
6658280ed8
commit
6020b4ed14
1 changed files with 4 additions and 3 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue