Cap the flat button text size.

// FREEBIE
pull/1/head
Matthew Chen 8 years ago
parent e5387a3971
commit ffea39abd0

@ -99,7 +99,9 @@ import Foundation
} }
public class func fontForHeight(_ height: CGFloat) -> UIFont { public class func fontForHeight(_ height: CGFloat) -> UIFont {
let fontPointSize = round(height * 0.45) // Cap the "button height" at 40pt or button text can look
// excessively large.
let fontPointSize = round(min(40, height) * 0.45)
return UIFont.ows_mediumFont(withSize:fontPointSize)! return UIFont.ows_mediumFont(withSize:fontPointSize)!
} }

Loading…
Cancel
Save