mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Create AppAsset shared class, which will replace the separate Mac and iOS AppAssets classes.
This commit is contained in:
@@ -25,16 +25,16 @@ enum ArticleExtractorButtonState {
|
||||
switch buttonState {
|
||||
case .error:
|
||||
stripAnimatedSublayer()
|
||||
setImage(AppAssets.articleExtractorError, for: .normal)
|
||||
setImage(AppAsset.ArticleExtractor.error, for: .normal)
|
||||
case .animated:
|
||||
setImage(nil, for: .normal)
|
||||
setNeedsLayout()
|
||||
case .on:
|
||||
stripAnimatedSublayer()
|
||||
setImage(AppAssets.articleExtractorOn, for: .normal)
|
||||
setImage(AppAsset.ArticleExtractor.on, for: .normal)
|
||||
case .off:
|
||||
stripAnimatedSublayer()
|
||||
setImage(AppAssets.articleExtractorOff, for: .normal)
|
||||
setImage(AppAsset.ArticleExtractor.off, for: .normal)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -77,7 +77,7 @@ enum ArticleExtractorButtonState {
|
||||
let images = [image1, image2, image1]
|
||||
|
||||
animatedLayer = CALayer()
|
||||
let imageSize = AppAssets.articleExtractorOff.size
|
||||
let imageSize = AppAsset.ArticleExtractor.off.size
|
||||
animatedLayer!.bounds = CGRect(x: 0, y: 0, width: imageSize.width, height: imageSize.height)
|
||||
animatedLayer!.position = CGPoint(x: bounds.midX, y: bounds.midY)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user