From 1b9a2799b24833df9ca48fe68c36ddffeb531e80 Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Fri, 25 Aug 2023 15:40:07 -0500 Subject: [PATCH] updated colorconfiguration to look at isEnabled Signed-off-by: Matt Bruce --- VDS/Classes/ColorConfiguration.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/VDS/Classes/ColorConfiguration.swift b/VDS/Classes/ColorConfiguration.swift index 317a16d3..4e1e8952 100644 --- a/VDS/Classes/ColorConfiguration.swift +++ b/VDS/Classes/ColorConfiguration.swift @@ -143,7 +143,7 @@ public class ControlColorConfiguration: KeyColorConfigurable { ///Meant to be used with any object that implements Surfaceable and Disabling. More than likely this is any View. public class ViewColorConfiguration: KeyColorConfigurable { public typealias KeyType = Bool - public typealias ObjectType = Surfaceable & Disabling + public typealias ObjectType = Surfaceable & Enabling public var keyColors: [KeyColorConfiguration] = [] public required init() { } @@ -161,7 +161,7 @@ public class ViewColorConfiguration: KeyColorConfigurable { /// - Parameter object: Object that implements Surfaceable and Disabling /// - Returns: UIColor correspoding to either true/false for the disabled state and surface public func getColor(_ object: ObjectType) -> UIColor { - if let keyColor = keyColors.first(where: {$0.key == object.disabled }) { + if let keyColor = keyColors.first(where: {$0.key == !object.isEnabled }) { return keyColor.surfaceConfig.getColor(object) } else { return .clear //default