Rename AppAsset to AppImage.

This commit is contained in:
Brent Simmons
2025-01-26 22:07:13 -08:00
parent 69ae436ea4
commit b116c7b6e5
52 changed files with 240 additions and 495 deletions

View File

@@ -25,16 +25,16 @@ final class ArticleExtractorButton: NSButton {
switch buttonState {
case .error:
stripAnimatedSublayer()
image = AppAssets.articleExtractorError
image = AppImage.articleExtractorError
case .animated:
image = nil
needsLayout = true
case .on:
stripAnimatedSublayer()
image = AppAssets.articleExtractorOn
image = AppImage.articleExtractorOn
case .off:
stripAnimatedSublayer()
image = AppAssets.articleExtractorOff
image = AppImage.articleExtractorOff
}
}
}
@@ -66,7 +66,7 @@ final class ArticleExtractorButton: NSButton {
private func commonInit() {
wantsLayer = true
bezelStyle = .texturedRounded
image = AppAssets.articleExtractorOff
image = AppImage.articleExtractorOff
imageScaling = .scaleProportionallyDown
widthAnchor.constraint(equalTo: heightAnchor).isActive = true
}
@@ -85,12 +85,12 @@ final class ArticleExtractorButton: NSButton {
}
private func addAnimatedSublayer(to hostedLayer: CALayer) {
let image1 = AppAssets.articleExtractorOff.tinted(with: NSColor.controlTextColor)
let image2 = AppAssets.articleExtractorOn.tinted(with: NSColor.controlTextColor)
let image1 = AppImage.articleExtractorOff.tinted(with: NSColor.controlTextColor)
let image2 = AppImage.articleExtractorOn.tinted(with: NSColor.controlTextColor)
let images = [image1, image2, image1]
animatedLayer = CALayer()
let imageSize = AppAssets.articleExtractorOff.size
let imageSize = AppImage.articleExtractorOff.size
animatedLayer!.bounds = CGRect(x: 0, y: 0, width: imageSize.width, height: imageSize.height)
animatedLayer!.position = CGPoint(x: bounds.midX, y: bounds.midY)