bug for configuration

Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
Matt Bruce 2023-06-05 11:56:56 -05:00
parent 16a6a41178
commit 6b97472103

View File

@ -129,8 +129,10 @@ public class ControlColorConfiguration: KeyColorConfigurable {
public func getColor(_ object: any ObjectType) -> UIColor {
let state = object.state
let surface = object.surface
if let keyColor = keyColors.first(where: {$0.key.isSubset(of: state) }) {
if let keyColor = keyColors.first(where: {$0.key == state }) {
return keyColor.surfaceConfig.getColor(surface)
} else if let keyColor = keyColors.first(where: {$0.key.isSubset(of: state) }) {
return keyColor.surfaceConfig.getColor(surface)
} else {
return .clear