mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
Improve Dynamic Type
This commit is contained in:
@@ -35,11 +35,11 @@ public final class OpenInActionSheetController: ActionSheetController {
|
||||
let theme = presentationData.theme
|
||||
let strings = presentationData.strings
|
||||
|
||||
super.init(theme: ActionSheetControllerTheme(presentationTheme: theme))
|
||||
super.init(theme: ActionSheetControllerTheme(presentationData: presentationData))
|
||||
|
||||
self.presentationDisposable = context.sharedContext.presentationData.start(next: { [weak self] presentationData in
|
||||
if let strongSelf = self {
|
||||
strongSelf.theme = ActionSheetControllerTheme(presentationTheme: presentationData.theme)
|
||||
strongSelf.theme = ActionSheetControllerTheme(presentationData: presentationData)
|
||||
}
|
||||
})
|
||||
|
||||
@@ -116,9 +116,6 @@ private final class OpenInActionSheetItem: ActionSheetItem {
|
||||
}
|
||||
}
|
||||
|
||||
private let titleFont = Font.medium(20.0)
|
||||
private let textFont = Font.regular(11.0)
|
||||
|
||||
private final class OpenInActionSheetItemNode: ActionSheetItemNode {
|
||||
let theme: ActionSheetControllerTheme
|
||||
let strings: PresentationStrings
|
||||
@@ -132,6 +129,9 @@ private final class OpenInActionSheetItemNode: ActionSheetItemNode {
|
||||
self.theme = theme
|
||||
self.strings = strings
|
||||
|
||||
let titleFont = Font.medium(floor(theme.baseFontSize * 20.0 / 17.0))
|
||||
let textFont = Font.regular(floor(theme.baseFontSize * 11.0 / 17.0))
|
||||
|
||||
self.titleNode = ASTextNode()
|
||||
self.titleNode.isUserInteractionEnabled = false
|
||||
self.titleNode.displaysAsynchronously = true
|
||||
@@ -216,6 +216,7 @@ private final class OpenInAppNode : ASDisplayNode {
|
||||
}
|
||||
|
||||
func setup(postbox: Postbox, context: AccountContext, theme: ActionSheetControllerTheme, option: OpenInOption, invokeAction: @escaping (OpenInAction) -> Void) {
|
||||
let textFont = Font.regular(floor(theme.baseFontSize * 11.0 / 17.0))
|
||||
self.textNode.attributedText = NSAttributedString(string: option.title, font: textFont, textColor: theme.primaryTextColor, paragraphAlignment: .center)
|
||||
|
||||
let iconSize = CGSize(width: 60.0, height: 60.0)
|
||||
|
||||
Reference in New Issue
Block a user