mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2024-12-22 23:58:36 +01:00
Fix variable name
This commit is contained in:
parent
13dd1d1bb5
commit
d0e3ec6d1c
@ -17,15 +17,15 @@ final class IconView: NSView {
|
||||
|
||||
if NSApplication.shared.effectiveAppearance.isDarkMode {
|
||||
if self.iconImage?.isDark ?? false {
|
||||
self.isDisconcernable = false
|
||||
self.isDiscernable = false
|
||||
} else {
|
||||
self.isDisconcernable = true
|
||||
self.isDiscernable = true
|
||||
}
|
||||
} else {
|
||||
if self.iconImage?.isBright ?? false {
|
||||
self.isDisconcernable = false
|
||||
self.isDiscernable = false
|
||||
} else {
|
||||
self.isDisconcernable = true
|
||||
self.isDiscernable = true
|
||||
}
|
||||
}
|
||||
|
||||
@ -35,7 +35,7 @@ final class IconView: NSView {
|
||||
}
|
||||
}
|
||||
|
||||
private var isDisconcernable = true
|
||||
private var isDiscernable = true
|
||||
|
||||
override var isFlipped: Bool {
|
||||
return true
|
||||
@ -85,7 +85,7 @@ final class IconView: NSView {
|
||||
|
||||
override func draw(_ dirtyRect: NSRect) {
|
||||
guard !(iconImage?.isBackgroundSupressed ?? false) else { return }
|
||||
guard hasExposedVerticalBackground || !isDisconcernable else { return }
|
||||
guard hasExposedVerticalBackground || !isDiscernable else { return }
|
||||
|
||||
let color = NSApplication.shared.effectiveAppearance.isDarkMode ? IconView.darkBackgroundColor : IconView.lightBackgroundColor
|
||||
color.set()
|
||||
|
@ -17,18 +17,18 @@ final class IconView: UIView {
|
||||
|
||||
if self.traitCollection.userInterfaceStyle == .dark {
|
||||
if self.iconImage?.isDark ?? false {
|
||||
self.isDisconcernable = false
|
||||
self.isDiscernable = false
|
||||
self.setNeedsLayout()
|
||||
} else {
|
||||
self.isDisconcernable = true
|
||||
self.isDiscernable = true
|
||||
self.setNeedsLayout()
|
||||
}
|
||||
} else {
|
||||
if self.iconImage?.isBright ?? false {
|
||||
self.isDisconcernable = false
|
||||
self.isDiscernable = false
|
||||
self.setNeedsLayout()
|
||||
} else {
|
||||
self.isDisconcernable = true
|
||||
self.isDiscernable = true
|
||||
self.setNeedsLayout()
|
||||
}
|
||||
}
|
||||
@ -37,7 +37,7 @@ final class IconView: UIView {
|
||||
}
|
||||
}
|
||||
|
||||
private var isDisconcernable = true
|
||||
private var isDiscernable = true
|
||||
|
||||
private let imageView: UIImageView = {
|
||||
let imageView = UIImageView(image: AppAssets.faviconTemplateImage)
|
||||
@ -79,7 +79,7 @@ final class IconView: UIView {
|
||||
|
||||
override func layoutSubviews() {
|
||||
imageView.setFrameIfNotEqual(rectForImageView())
|
||||
if (iconImage != nil && isVerticalBackgroundExposed) || !isDisconcernable {
|
||||
if (iconImage != nil && isVerticalBackgroundExposed) || !isDiscernable {
|
||||
backgroundColor = AppAssets.uiIconBackgroundColor
|
||||
} else {
|
||||
backgroundColor = nil
|
||||
|
@ -17,15 +17,15 @@ final class IconView: NSView {
|
||||
|
||||
if NSApplication.shared.effectiveAppearance.isDarkMode {
|
||||
if self.iconImage?.isDark ?? false {
|
||||
self.isDisconcernable = false
|
||||
self.isDiscernable = false
|
||||
} else {
|
||||
self.isDisconcernable = true
|
||||
self.isDiscernable = true
|
||||
}
|
||||
} else {
|
||||
if self.iconImage?.isBright ?? false {
|
||||
self.isDisconcernable = false
|
||||
self.isDiscernable = false
|
||||
} else {
|
||||
self.isDisconcernable = true
|
||||
self.isDiscernable = true
|
||||
}
|
||||
}
|
||||
|
||||
@ -35,7 +35,7 @@ final class IconView: NSView {
|
||||
}
|
||||
}
|
||||
|
||||
private var isDisconcernable = true
|
||||
private var isDiscernable = true
|
||||
|
||||
override var isFlipped: Bool {
|
||||
return true
|
||||
@ -81,7 +81,7 @@ final class IconView: NSView {
|
||||
}
|
||||
|
||||
override func draw(_ dirtyRect: NSRect) {
|
||||
guard hasExposedVerticalBackground || !isDisconcernable else {
|
||||
guard hasExposedVerticalBackground || !isDiscernable else {
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -17,18 +17,18 @@ final class IconView: UIView {
|
||||
|
||||
if self.traitCollection.userInterfaceStyle == .dark {
|
||||
if self.iconImage?.isDark ?? false {
|
||||
self.isDisconcernable = false
|
||||
self.isDiscernable = false
|
||||
self.setNeedsLayout()
|
||||
} else {
|
||||
self.isDisconcernable = true
|
||||
self.isDiscernable = true
|
||||
self.setNeedsLayout()
|
||||
}
|
||||
} else {
|
||||
if self.iconImage?.isBright ?? false {
|
||||
self.isDisconcernable = false
|
||||
self.isDiscernable = false
|
||||
self.setNeedsLayout()
|
||||
} else {
|
||||
self.isDisconcernable = true
|
||||
self.isDiscernable = true
|
||||
self.setNeedsLayout()
|
||||
}
|
||||
}
|
||||
@ -37,7 +37,7 @@ final class IconView: UIView {
|
||||
}
|
||||
}
|
||||
|
||||
private var isDisconcernable = true
|
||||
private var isDiscernable = true
|
||||
|
||||
private let imageView: UIImageView = {
|
||||
let imageView = NonIntrinsicImageView(image: AppAssets.faviconTemplateImage)
|
||||
@ -79,7 +79,7 @@ final class IconView: UIView {
|
||||
|
||||
override func layoutSubviews() {
|
||||
imageView.setFrameIfNotEqual(rectForImageView())
|
||||
if !isBackgroundSuppressed && ((iconImage != nil && isVerticalBackgroundExposed) || !isDisconcernable) {
|
||||
if !isBackgroundSuppressed && ((iconImage != nil && isVerticalBackgroundExposed) || !isDiscernable) {
|
||||
backgroundColor = AppAssets.iconBackgroundColor
|
||||
} else {
|
||||
backgroundColor = nil
|
||||
|
Loading…
Reference in New Issue
Block a user