Merge branch 'bugfix/buttonIcon' into 'develop'

Fixed issues for Button Icon - Icon Sizes

See merge request BPHV_MIPS/vds_ios!206
This commit is contained in:
Bruce, Matt R 2024-04-17 12:35:40 +00:00
commit 6c2b57252a

View File

@ -61,6 +61,19 @@ open class ButtonIcon: Control, Changeable, FormFieldable {
}
}
private var iconSize: Size.ValueType {
switch (size, kind) {
case (.large, .ghost):
return Icon.Size.large
case (.small, .ghost):
return Icon.Size.medium
case (.large, .lowContrast), (.large, .highContrast):
return Icon.Size.medium
case (.small, .lowContrast), (.small, .highContrast):
return Icon.Size.small
}
}
//--------------------------------------------------
// MARK: - Private Properties
//--------------------------------------------------
@ -430,7 +443,7 @@ open class ButtonIcon: Control, Changeable, FormFieldable {
icon.name = currentIconName
let color = iconColorConfiguration.getColor(self)
icon.color = color
icon.size = size.value
icon.size = iconSize
icon.customSize = customSize
icon.isEnabled = isEnabled
} else {