Use separate text widths for different OS versions

This commit is contained in:
Maurice Parker 2021-09-09 02:08:47 -05:00
parent 35995fad39
commit 6c09bf585c

View File

@ -830,7 +830,14 @@ private extension AppDelegate {
attrs[.link] = theme.creatorHomePage
websiteText.append(NSAttributedString(string: theme.creatorHomePage, attributes: attrs))
let textView = NSTextView(frame: CGRect(x: 0, y: 0, width: 400, height: 15))
let textViewWidth: CGFloat
if #available(macOS 11.0, *) {
textViewWidth = 200
} else {
textViewWidth = 400
}
let textView = NSTextView(frame: CGRect(x: 0, y: 0, width: textViewWidth, height: 15))
textView.isEditable = false
textView.drawsBackground = false
textView.textStorage?.setAttributedString(websiteText)