diff --git a/Mac/Inspector/BuiltinSmartFeedInspectorViewController.swift b/Mac/Inspector/BuiltinSmartFeedInspectorViewController.swift index 8b59bec65..bbd1a928d 100644 --- a/Mac/Inspector/BuiltinSmartFeedInspectorViewController.swift +++ b/Mac/Inspector/BuiltinSmartFeedInspectorViewController.swift @@ -11,7 +11,8 @@ import AppKit final class BuiltinSmartFeedInspectorViewController: NSViewController, Inspector { @IBOutlet var nameTextField: NSTextField? - + @IBOutlet weak var smartFeedImageView: NSImageView! + private var smartFeed: PseudoFeed? { didSet { updateUI() @@ -61,8 +62,10 @@ private extension BuiltinSmartFeedInspectorViewController { } func updateUI() { - nameTextField?.stringValue = smartFeed?.nameForDisplay ?? "" windowTitle = smartFeed?.nameForDisplay ?? NSLocalizedString("Smart Feed Inspector", comment: "Smart Feed Inspector window title") + if #available(macOS 11.0, *) { + smartFeedImageView?.image = smartFeed?.smallIcon?.image + } } } diff --git a/Mac/Inspector/FolderInspectorViewController.swift b/Mac/Inspector/FolderInspectorViewController.swift index 794f33398..d67dfca80 100644 --- a/Mac/Inspector/FolderInspectorViewController.swift +++ b/Mac/Inspector/FolderInspectorViewController.swift @@ -13,7 +13,8 @@ import RSCore final class FolderInspectorViewController: NSViewController, Inspector { @IBOutlet var nameTextField: NSTextField? - + @IBOutlet weak var folderImageView: NSImageView! + private var folder: Folder? { didSet { if folder != oldValue { @@ -45,6 +46,13 @@ final class FolderInspectorViewController: NSViewController, Inspector { override func viewDidLoad() { updateUI() + + if #available(macOS 11.0, *) { + let image = NSImage(systemSymbolName: "folder", accessibilityDescription: nil)! + folderImageView.image = image + folderImageView.contentTintColor = NSColor.controlAccentColor + } + NotificationCenter.default.addObserver(self, selector: #selector(displayNameDidChange(_:)), name: .DisplayNameDidChange, object: nil) } diff --git a/Mac/Inspector/Inspector.storyboard b/Mac/Inspector/Inspector.storyboard index 861bfc360..9aae55e24 100644 --- a/Mac/Inspector/Inspector.storyboard +++ b/Mac/Inspector/Inspector.storyboard @@ -1,7 +1,8 @@ - + - + + @@ -33,11 +34,11 @@ - + - + @@ -54,7 +55,7 @@ Field - + @@ -62,7 +63,7 @@ Field - + @@ -70,7 +71,7 @@ Field - + @@ -78,7 +79,7 @@ Field - + @@ -86,7 +87,7 @@ Field - + @@ -196,6 +197,7 @@ Field + @@ -239,6 +241,7 @@ Field +