diff --git a/Mac/AppAssets.swift b/Mac/AppAssets.swift index ab5eb8dc6..ddab9827d 100644 --- a/Mac/AppAssets.swift +++ b/Mac/AppAssets.swift @@ -50,6 +50,14 @@ struct AppAssets { return RSImage(named: "articleExtractorError") }() + static var articleExtractorInactiveDark: RSImage! = { + return RSImage(named: "articleExtractorInactiveDark") + }() + + static var articleExtractorInactiveLight: RSImage! = { + return RSImage(named: "articleExtractorInactiveLight") + }() + static var articleExtractorProgress1: RSImage! = { return RSImage(named: "articleExtractorProgress1") }() diff --git a/Mac/MainWindow/ArticleExtractorButton.swift b/Mac/MainWindow/ArticleExtractorButton.swift index 69e250ed5..67b9f75da 100644 --- a/Mac/MainWindow/ArticleExtractorButton.swift +++ b/Mac/MainWindow/ArticleExtractorButton.swift @@ -59,7 +59,15 @@ class ArticleExtractorButton: NSButton { case isInProgress: addAnimatedSublayer(to: hostedLayer) default: - addImageSublayer(to: hostedLayer, image: AppAssets.articleExtractor, opacity: opacity) + if NSApplication.shared.isActive { + addImageSublayer(to: hostedLayer, image: AppAssets.articleExtractor, opacity: opacity) + } else { + if NSApplication.shared.effectiveAppearance.isDarkMode { + addImageSublayer(to: hostedLayer, image: AppAssets.articleExtractorInactiveDark, opacity: opacity) + } else { + addImageSublayer(to: hostedLayer, image: AppAssets.articleExtractorInactiveLight, opacity: opacity) + } + } } } diff --git a/Mac/Resources/Assets.xcassets/articleExtractorInactiveDark.imageset/ArticleExtractorInactiveDark.pdf b/Mac/Resources/Assets.xcassets/articleExtractorInactiveDark.imageset/ArticleExtractorInactiveDark.pdf new file mode 100644 index 000000000..28edebd24 Binary files /dev/null and b/Mac/Resources/Assets.xcassets/articleExtractorInactiveDark.imageset/ArticleExtractorInactiveDark.pdf differ diff --git a/Mac/Resources/Assets.xcassets/articleExtractorInactiveDark.imageset/Contents.json b/Mac/Resources/Assets.xcassets/articleExtractorInactiveDark.imageset/Contents.json new file mode 100644 index 000000000..3aa79833f --- /dev/null +++ b/Mac/Resources/Assets.xcassets/articleExtractorInactiveDark.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "ArticleExtractorInactiveDark.pdf" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Mac/Resources/Assets.xcassets/articleExtractorInactiveLight.imageset/ArticleExtractorInactiveLight.pdf b/Mac/Resources/Assets.xcassets/articleExtractorInactiveLight.imageset/ArticleExtractorInactiveLight.pdf new file mode 100644 index 000000000..d09538c0c Binary files /dev/null and b/Mac/Resources/Assets.xcassets/articleExtractorInactiveLight.imageset/ArticleExtractorInactiveLight.pdf differ diff --git a/Mac/Resources/Assets.xcassets/articleExtractorInactiveLight.imageset/Contents.json b/Mac/Resources/Assets.xcassets/articleExtractorInactiveLight.imageset/Contents.json new file mode 100644 index 000000000..1dff9cf00 --- /dev/null +++ b/Mac/Resources/Assets.xcassets/articleExtractorInactiveLight.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "ArticleExtractorInactiveLight.pdf" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file