mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 22:55:00 +00:00
Attachment menu improvements
This commit is contained in:
@@ -31,10 +31,11 @@ public struct Font {
|
||||
case medium
|
||||
case semibold
|
||||
case bold
|
||||
case heavy
|
||||
|
||||
var isBold: Bool {
|
||||
switch self {
|
||||
case .medium, .semibold, .bold:
|
||||
case .medium, .semibold, .bold, .heavy:
|
||||
return true
|
||||
default:
|
||||
return false
|
||||
@@ -51,6 +52,8 @@ public struct Font {
|
||||
return .semibold
|
||||
case .bold:
|
||||
return .bold
|
||||
case .heavy:
|
||||
return .heavy
|
||||
default:
|
||||
return .regular
|
||||
}
|
||||
@@ -185,6 +188,11 @@ public struct Font {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static func heavy(_ size: CGFloat) -> UIFont {
|
||||
return self.with(size: size, design: .regular, weight: .heavy, traits: [])
|
||||
}
|
||||
|
||||
public static func light(_ size: CGFloat) -> UIFont {
|
||||
if #available(iOS 8.2, *) {
|
||||
return UIFont.systemFont(ofSize: size, weight: UIFont.Weight.light)
|
||||
|
||||
Reference in New Issue
Block a user