mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Various improvements
This commit is contained in:
parent
76cabfddb3
commit
5de8f50b79
@ -561,12 +561,12 @@ final class InnerTextSelectionTipContainerNode: ASDisplayNode {
|
|||||||
let textFont = Font.regular(floor(presentationData.listsFontSize.baseDisplaySize * 14.0 / 17.0))
|
let textFont = Font.regular(floor(presentationData.listsFontSize.baseDisplaySize * 14.0 / 17.0))
|
||||||
let boldTextFont = Font.bold(floor(presentationData.listsFontSize.baseDisplaySize * 14.0 / 17.0))
|
let boldTextFont = Font.bold(floor(presentationData.listsFontSize.baseDisplaySize * 14.0 / 17.0))
|
||||||
let textColor = self.presentationData.theme.contextMenu.primaryColor
|
let textColor = self.presentationData.theme.contextMenu.primaryColor
|
||||||
let accentColor = self.presentationData.theme.contextMenu.badgeFillColor
|
let linkColor = self.presentationData.theme.overallDarkAppearance ? UIColor(rgb: 0x64d2ff) : self.presentationData.theme.contextMenu.badgeFillColor
|
||||||
|
|
||||||
let iconSize = self.iconNode.image?.size ?? CGSize(width: 16.0, height: 16.0)
|
let iconSize = self.iconNode.image?.size ?? CGSize(width: 16.0, height: 16.0)
|
||||||
|
|
||||||
let text = self.text.replacingOccurrences(of: "#", with: "# ")
|
let text = self.text.replacingOccurrences(of: "#", with: "# ")
|
||||||
let attributedText = NSMutableAttributedString(attributedString: parseMarkdownIntoAttributedString(text, attributes: MarkdownAttributes(body: MarkdownAttributeSet(font: textFont, textColor: textColor), bold: MarkdownAttributeSet(font: boldTextFont, textColor: textColor), link: MarkdownAttributeSet(font: boldTextFont, textColor: accentColor), linkAttribute: { _ in
|
let attributedText = NSMutableAttributedString(attributedString: parseMarkdownIntoAttributedString(text, attributes: MarkdownAttributes(body: MarkdownAttributeSet(font: textFont, textColor: textColor), bold: MarkdownAttributeSet(font: boldTextFont, textColor: textColor), link: MarkdownAttributeSet(font: boldTextFont, textColor: linkColor), linkAttribute: { _ in
|
||||||
return nil
|
return nil
|
||||||
})))
|
})))
|
||||||
if let file = self.file {
|
if let file = self.file {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user