From 6c09bf585c92f02668b18a660cef8cab0dd34550 Mon Sep 17 00:00:00 2001 From: Maurice Parker Date: Thu, 9 Sep 2021 02:08:47 -0500 Subject: [PATCH] Use separate text widths for different OS versions --- Mac/AppDelegate.swift | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Mac/AppDelegate.swift b/Mac/AppDelegate.swift index a32709253..25d2bd969 100644 --- a/Mac/AppDelegate.swift +++ b/Mac/AppDelegate.swift @@ -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)