Merge branch 'bugfix/buttonIcon' into 'develop'

CXTDT-544442- Button Icon - Selected state needs to allow custom color

See merge request BPHV_MIPS/vds_ios!209
This commit is contained in:
Bruce, Matt R 2024-04-18 20:59:52 +00:00
commit 5c857738f1
2 changed files with 15 additions and 5 deletions

View File

@ -138,6 +138,8 @@ open class ButtonIcon: Control, Changeable, FormFieldable {
/// Icon Name used within the Icon within the Selected State.
open var selectedIconName: Icon.Name? { didSet { setNeedsUpdate() } }
open var selectedIconColorConfiguration: SurfaceColorConfiguration? { didSet { setNeedsUpdate() } }
/// Sets the size of button icon and icon.
open var size: Size = .large { didSet { setNeedsUpdate() } }
@ -180,12 +182,16 @@ open class ButtonIcon: Control, Changeable, FormFieldable {
// MARK: - Configuration
//--------------------------------------------------
private var iconColorConfiguration: AnyColorable {
if kind == .highContrast {
return highContrastIconColorConfiguration
} else if kind == .lowContrast {
return (surfaceType == .colorFill) ? lowContrastIconColorConfiguration : (floating ? lowContrastIconColorConfiguration : standardIconColorConfiguration)
if let selectedIconColorConfiguration, isSelected {
return selectedIconColorConfiguration.eraseToAnyColorable()
} else {
return standardIconColorConfiguration
if kind == .highContrast {
return highContrastIconColorConfiguration
} else if kind == .lowContrast {
return (surfaceType == .colorFill) ? lowContrastIconColorConfiguration : (floating ? lowContrastIconColorConfiguration : standardIconColorConfiguration)
} else {
return standardIconColorConfiguration
}
}
}

View File

@ -1,3 +1,7 @@
1.0.60
----------------
CXTDT-544442- Button Icon - Selected state needs to allow custom color
1.0.59
----------------
- ONEAPP-7135 - DropdownSelect - Finished Development