mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
no message
This commit is contained in:
parent
457a6ef8ee
commit
a9c96e7712
@ -59,7 +59,7 @@ final class AlertControllerNode: ASDisplayNode {
|
||||
transition.updateFrame(node: self.dimmingNode, frame: CGRect(origin: CGPoint(), size: layout.size))
|
||||
|
||||
var insets = layout.insets(options: [.statusBar, .input])
|
||||
let maxWidth = min(340.0, layout.size.width - 70.0)
|
||||
let maxWidth = min(240.0, layout.size.width - 70.0)
|
||||
insets.left = floor((layout.size.width - maxWidth) / 2.0)
|
||||
insets.right = floor((layout.size.width - maxWidth) / 2.0)
|
||||
let contentAvailableFrame = CGRect(origin: CGPoint(x: insets.left, y: insets.top), size: CGSize(width: layout.size.width - insets.right, height: layout.size.height - insets.top - insets.bottom))
|
||||
|
@ -36,9 +36,11 @@ public struct Font {
|
||||
}
|
||||
|
||||
public extension NSAttributedString {
|
||||
convenience init(string: String, font: UIFont, textColor: UIColor = UIColor.black, paragraphAlignment: NSTextAlignment? = nil) {
|
||||
convenience init(string: String, font: UIFont? = nil, textColor: UIColor = UIColor.black, paragraphAlignment: NSTextAlignment? = nil) {
|
||||
var attributes: [String: AnyObject] = [:]
|
||||
attributes[NSFontAttributeName] = font
|
||||
if let font = font {
|
||||
attributes[NSFontAttributeName] = font
|
||||
}
|
||||
attributes[NSForegroundColorAttributeName] = textColor
|
||||
if let paragraphAlignment = paragraphAlignment {
|
||||
let paragraphStyle = NSMutableParagraphStyle()
|
||||
|
Loading…
x
Reference in New Issue
Block a user