Digital ACT-191 CXTDT-544460 defect: Fixed issue for Button Icon - Incorrect Icon Sizes
This commit is contained in:
parent
2aae39f5ea
commit
bb00f4c457
@ -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
|
// MARK: - Private Properties
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
@ -430,7 +443,7 @@ open class ButtonIcon: Control, Changeable, FormFieldable {
|
|||||||
icon.name = currentIconName
|
icon.name = currentIconName
|
||||||
let color = iconColorConfiguration.getColor(self)
|
let color = iconColorConfiguration.getColor(self)
|
||||||
icon.color = color
|
icon.color = color
|
||||||
icon.size = size.value
|
icon.size = iconSize
|
||||||
icon.customSize = customSize
|
icon.customSize = customSize
|
||||||
icon.isEnabled = isEnabled
|
icon.isEnabled = isEnabled
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user