From 25ef392634415b5e0dcab384de29ae24bc22c47e Mon Sep 17 00:00:00 2001 From: igor Date: Sun, 9 Feb 2025 14:45:44 -0800 Subject: [PATCH] Update window border. --- src/Helpers.swift | 8 -------- src/SearchViewController.swift | 18 +++++++++++++++++- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/src/Helpers.swift b/src/Helpers.swift index d47187f..dc10f55 100644 --- a/src/Helpers.swift +++ b/src/Helpers.swift @@ -86,14 +86,6 @@ func systemImage(_ name: String, _ size: NSFont.TextStyle, _ scale: NSImage.Symb .withSymbolConfiguration(NSImage.SymbolConfiguration(textStyle: size, scale: scale).applying(configuration)) } -func isDirectory(atPath path: String) -> Bool { - var isDir: ObjCBool = false - if FileManager.default.fileExists(atPath: path, isDirectory: &isDir) { - return isDir.boolValue - } - return false -} - extension String { // This converts string to UInt as a fourCharCode public var fourCharCodeValue: Int { diff --git a/src/SearchViewController.swift b/src/SearchViewController.swift index 4470cd7..7c942bb 100644 --- a/src/SearchViewController.swift +++ b/src/SearchViewController.swift @@ -44,7 +44,6 @@ class SearchViewController: NSViewController, NSTextFieldDelegate, NSPopoverDele effect.wantsLayer = true effect.layer?.masksToBounds = true - effect.layer?.borderColor = NSColor.labelColor.withAlphaComponent(0.2).cgColor effect.layer?.borderWidth = 1 effect.layer?.cornerRadius = windowCornerRadius @@ -167,11 +166,16 @@ class SearchViewController: NSViewController, NSTextFieldDelegate, NSPopoverDele override func viewDidLoad() { super.viewDidLoad() + // NOTE: This needs removeObserver on deinit? + DistributedNotificationCenter.default.addObserver(self, selector: #selector(osThemeChanged(sender:)), name: NSNotification.Name(rawValue: "AppleInterfaceThemeChangedNotification"), object: nil) + // Initialize an array of reusable cells. for _ in 0..