mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2025-02-09 08:39:00 +01:00
Fix theme dialog formatting on Catalina
This commit is contained in:
parent
ef44a9b6e6
commit
35995fad39
@ -812,18 +812,25 @@ private extension AppDelegate {
|
|||||||
attrs[.font] = NSFont.systemFont(ofSize: NSFont.smallSystemFontSize)
|
attrs[.font] = NSFont.systemFont(ofSize: NSFont.smallSystemFontSize)
|
||||||
attrs[.foregroundColor] = NSColor.textColor
|
attrs[.foregroundColor] = NSColor.textColor
|
||||||
|
|
||||||
let titleParagraphStyle = NSMutableParagraphStyle()
|
if #available(macOS 11.0, *) {
|
||||||
titleParagraphStyle.alignment = .center
|
let titleParagraphStyle = NSMutableParagraphStyle()
|
||||||
attrs[.paragraphStyle] = titleParagraphStyle
|
titleParagraphStyle.alignment = .center
|
||||||
|
attrs[.paragraphStyle] = titleParagraphStyle
|
||||||
|
}
|
||||||
|
|
||||||
let websiteText = NSMutableAttributedString()
|
let websiteText = NSMutableAttributedString()
|
||||||
websiteText.append(NSAttributedString(string: NSLocalizedString("Author's Website", comment: "Author's Website"), attributes: attrs))
|
websiteText.append(NSAttributedString(string: NSLocalizedString("Author's Website", comment: "Author's Website"), attributes: attrs))
|
||||||
websiteText.append(NSAttributedString(string: "\n"))
|
|
||||||
|
if #available(macOS 11.0, *) {
|
||||||
|
websiteText.append(NSAttributedString(string: "\n"))
|
||||||
|
} else {
|
||||||
|
websiteText.append(NSAttributedString(string: " "))
|
||||||
|
}
|
||||||
|
|
||||||
attrs[.link] = theme.creatorHomePage
|
attrs[.link] = theme.creatorHomePage
|
||||||
websiteText.append(NSAttributedString(string: theme.creatorHomePage, attributes: attrs))
|
websiteText.append(NSAttributedString(string: theme.creatorHomePage, attributes: attrs))
|
||||||
|
|
||||||
let textView = NSTextView(frame: CGRect(x: 0, y: 0, width: 200, height: 15))
|
let textView = NSTextView(frame: CGRect(x: 0, y: 0, width: 400, height: 15))
|
||||||
textView.isEditable = false
|
textView.isEditable = false
|
||||||
textView.drawsBackground = false
|
textView.drawsBackground = false
|
||||||
textView.textStorage?.setAttributedString(websiteText)
|
textView.textStorage?.setAttributedString(websiteText)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user