Add additional assets for Article Extractor Button for when the app is inactive.

This commit is contained in:
Maurice Parker
2019-11-12 13:05:52 -06:00
parent 701070f2dd
commit 0d2583948a
6 changed files with 41 additions and 1 deletions

View File

@@ -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)
}
}
}
}