mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 06:35:51 +00:00
Switch to new check node implementation
This commit is contained in:
@@ -74,13 +74,14 @@ public class ActionSheetCheckboxItemNode: ActionSheetItemNode {
|
||||
self.checkNode = ASImageNode()
|
||||
self.checkNode.isUserInteractionEnabled = false
|
||||
self.checkNode.displaysAsynchronously = false
|
||||
self.checkNode.image = generateImage(CGSize(width: 14.0, height: 11.0), rotatedContext: { size, context in
|
||||
self.checkNode.image = generateImage(CGSize(width: 14.0, height: 12.0), rotatedContext: { size, context in
|
||||
context.clear(CGRect(origin: CGPoint(), size: size))
|
||||
context.setStrokeColor(theme.controlAccentColor.cgColor)
|
||||
context.setLineWidth(2.0)
|
||||
context.move(to: CGPoint(x: 12.0, y: 1.0))
|
||||
context.addLine(to: CGPoint(x: 4.16482734, y: 9.0))
|
||||
context.addLine(to: CGPoint(x: 1.0, y: 5.81145833))
|
||||
context.setLineWidth(2.0 - UIScreenPixel)
|
||||
context.setLineCap(.round)
|
||||
context.move(to: CGPoint(x: 13.0, y: 1.0))
|
||||
context.addLine(to: CGPoint(x: 5.0, y: 11.0))
|
||||
context.addLine(to: CGPoint(x: 1.0, y: 7.0))
|
||||
context.strokePath()
|
||||
})
|
||||
self.checkNode.isAccessibilityElement = false
|
||||
@@ -146,8 +147,8 @@ public class ActionSheetCheckboxItemNode: ActionSheetItemNode {
|
||||
|
||||
self.button.frame = CGRect(origin: CGPoint(), size: size)
|
||||
|
||||
var titleOrigin: CGFloat = 44.0
|
||||
var checkOrigin: CGFloat = 22.0
|
||||
var titleOrigin: CGFloat = 50.0
|
||||
var checkOrigin: CGFloat = 27.0
|
||||
if let item = self.item, item.style == .alignRight {
|
||||
titleOrigin = 24.0
|
||||
checkOrigin = size.width - 22.0
|
||||
|
||||
Reference in New Issue
Block a user