Skip to content

Commit 96a1e24

Browse files
committed
feat: Support for custom dark appearances
1 parent 4cc5fcd commit 96a1e24

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

ColorSetKit/NSColor+ColorSetKit.swift

+11-3
Original file line numberDiff line numberDiff line change
@@ -598,11 +598,19 @@ public extension NSColor
598598
return true
599599
}
600600
}
601-
else
601+
else if appearance?.name == .vibrantDark
602602
{
603-
return appearance?.name == .vibrantDark
603+
return true
604604
}
605605

606-
return false
606+
return isCustomAppearanceDark?( appearance ) ?? false
607+
}
608+
609+
@objc
610+
class func setCustomAppearanceDarkChecker( _ checker: ( ( NSAppearance? ) -> Bool )? )
611+
{
612+
isCustomAppearanceDark = checker
607613
}
614+
615+
private static var isCustomAppearanceDark: ( ( NSAppearance? ) -> Bool )?
608616
}

0 commit comments

Comments
 (0)