Add additional assets for Article Extractor Button for when the app is inactive.
This commit is contained in:
parent
701070f2dd
commit
0d2583948a
@ -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")
|
||||
}()
|
||||
|
@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
BIN
Mac/Resources/Assets.xcassets/articleExtractorInactiveDark.imageset/ArticleExtractorInactiveDark.pdf
vendored
Normal file
BIN
Mac/Resources/Assets.xcassets/articleExtractorInactiveDark.imageset/ArticleExtractorInactiveDark.pdf
vendored
Normal file
Binary file not shown.
12
Mac/Resources/Assets.xcassets/articleExtractorInactiveDark.imageset/Contents.json
vendored
Normal file
12
Mac/Resources/Assets.xcassets/articleExtractorInactiveDark.imageset/Contents.json
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "ArticleExtractorInactiveDark.pdf"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
Binary file not shown.
12
Mac/Resources/Assets.xcassets/articleExtractorInactiveLight.imageset/Contents.json
vendored
Normal file
12
Mac/Resources/Assets.xcassets/articleExtractorInactiveLight.imageset/Contents.json
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "ArticleExtractorInactiveLight.pdf"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user