mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-04 21:41:45 +00:00
Fix avatar camera icon alignment
This commit is contained in:
parent
367774a320
commit
5fbe67767f
@ -161,7 +161,7 @@ public final class AvatarEditOverlayNode: ASDisplayNode {
|
||||
context.setBlendMode(.normal)
|
||||
|
||||
if let editAvatarIcon = generateTintedImage(image: UIImage(bundleImageName: "Avatar/EditAvatarIcon"), color: .white) {
|
||||
context.draw(editAvatarIcon.cgImage!, in: CGRect(origin: CGPoint(x: floor((bounds.size.width - editAvatarIcon.size.width) / 2.0), y: floor((bounds.size.height - editAvatarIcon.size.height) / 2.0)), size: editAvatarIcon.size))
|
||||
context.draw(editAvatarIcon.cgImage!, in: CGRect(origin: CGPoint(x: floor((bounds.size.width - editAvatarIcon.size.width) / 2.0) + 0.5, y: floor((bounds.size.height - editAvatarIcon.size.height) / 2.0) + 1.0), size: editAvatarIcon.size))
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -488,7 +488,7 @@ public final class AvatarNode: ASDisplayNode {
|
||||
context.translateBy(x: -bounds.size.width / 2.0, y: -bounds.size.height / 2.0)
|
||||
|
||||
if let editAvatarIcon = generateTintedImage(image: UIImage(bundleImageName: "Avatar/EditAvatarIcon"), color: theme.list.itemAccentColor) {
|
||||
context.draw(editAvatarIcon.cgImage!, in: CGRect(origin: CGPoint(x: floor((bounds.size.width - editAvatarIcon.size.width) / 2.0), y: floor((bounds.size.height - editAvatarIcon.size.height) / 2.0)), size: editAvatarIcon.size))
|
||||
context.draw(editAvatarIcon.cgImage!, in: CGRect(origin: CGPoint(x: floor((bounds.size.width - editAvatarIcon.size.width) / 2.0) + 0.5, y: floor((bounds.size.height - editAvatarIcon.size.height) / 2.0) + 1.0), size: editAvatarIcon.size))
|
||||
}
|
||||
} else if case .archivedChatsIcon = parameters.icon {
|
||||
let factor = bounds.size.width / 60.0
|
||||
|
||||
@ -592,7 +592,8 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
|
||||
reactionItems = []
|
||||
}
|
||||
|
||||
let displayTextSelectionTip = !message.text.isEmpty && chatTextSelectionTips < 3
|
||||
let numberOfComponents = message.text.components(separatedBy: CharacterSet.whitespacesAndNewlines).count
|
||||
let displayTextSelectionTip = numberOfComponents >= 3 && !message.text.isEmpty && chatTextSelectionTips < 3
|
||||
if displayTextSelectionTip {
|
||||
let _ = ApplicationSpecificNotice.incrementChatTextSelectionTips(accountManager: strongSelf.context.sharedContext.accountManager).start()
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user