Fix variable name

This commit is contained in:
Maurice Parker 2021-03-06 16:25:10 -06:00
parent 13dd1d1bb5
commit d0e3ec6d1c
4 changed files with 24 additions and 24 deletions

View File

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

View File

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

View File

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

View File

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