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:
commit
5c857738f1
@ -138,6 +138,8 @@ open class ButtonIcon: Control, Changeable, FormFieldable {
|
|||||||
/// Icon Name used within the Icon within the Selected State.
|
/// Icon Name used within the Icon within the Selected State.
|
||||||
open var selectedIconName: Icon.Name? { didSet { setNeedsUpdate() } }
|
open var selectedIconName: Icon.Name? { didSet { setNeedsUpdate() } }
|
||||||
|
|
||||||
|
open var selectedIconColorConfiguration: SurfaceColorConfiguration? { didSet { setNeedsUpdate() } }
|
||||||
|
|
||||||
/// Sets the size of button icon and icon.
|
/// Sets the size of button icon and icon.
|
||||||
open var size: Size = .large { didSet { setNeedsUpdate() } }
|
open var size: Size = .large { didSet { setNeedsUpdate() } }
|
||||||
|
|
||||||
@ -180,12 +182,16 @@ open class ButtonIcon: Control, Changeable, FormFieldable {
|
|||||||
// MARK: - Configuration
|
// MARK: - Configuration
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
private var iconColorConfiguration: AnyColorable {
|
private var iconColorConfiguration: AnyColorable {
|
||||||
if kind == .highContrast {
|
if let selectedIconColorConfiguration, isSelected {
|
||||||
return highContrastIconColorConfiguration
|
return selectedIconColorConfiguration.eraseToAnyColorable()
|
||||||
} else if kind == .lowContrast {
|
|
||||||
return (surfaceType == .colorFill) ? lowContrastIconColorConfiguration : (floating ? lowContrastIconColorConfiguration : standardIconColorConfiguration)
|
|
||||||
} else {
|
} else {
|
||||||
return standardIconColorConfiguration
|
if kind == .highContrast {
|
||||||
|
return highContrastIconColorConfiguration
|
||||||
|
} else if kind == .lowContrast {
|
||||||
|
return (surfaceType == .colorFill) ? lowContrastIconColorConfiguration : (floating ? lowContrastIconColorConfiguration : standardIconColorConfiguration)
|
||||||
|
} else {
|
||||||
|
return standardIconColorConfiguration
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,3 +1,7 @@
|
|||||||
|
1.0.60
|
||||||
|
----------------
|
||||||
|
CXTDT-544442- Button Icon - Selected state needs to allow custom color
|
||||||
|
|
||||||
1.0.59
|
1.0.59
|
||||||
----------------
|
----------------
|
||||||
- ONEAPP-7135 - DropdownSelect - Finished Development
|
- ONEAPP-7135 - DropdownSelect - Finished Development
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user