diff --git a/MVMCoreUI/Atomic/Atoms/Buttons/ButtonModel.swift b/MVMCoreUI/Atomic/Atoms/Buttons/ButtonModel.swift index 49149026..714a343b 100644 --- a/MVMCoreUI/Atomic/Atoms/Buttons/ButtonModel.swift +++ b/MVMCoreUI/Atomic/Atoms/Buttons/ButtonModel.swift @@ -61,9 +61,6 @@ public class ButtonModel: ButtonModelProtocol, MoleculeModelProtocol, FormGroupW public var disabledTextColor_inverted: Color? public var disabledBorderColor_inverted: Color? - public var borderWidth: CGFloat? - public var borderWidth_inverted: CGFloat? - //-------------------------------------------------- // MARK: - Default Button Facades //-------------------------------------------------- @@ -105,11 +102,7 @@ public class ButtonModel: ButtonModelProtocol, MoleculeModelProtocol, FormGroupW //-------------------------------------------------- // MARK: - Methods //-------------------------------------------------- - - public func getBorderWidth() -> CGFloat? { - return isInverted ? borderWidth_inverted : borderWidth - } - + public func enabled_fillColor() -> UIColor? { return (isInverted ? enabledFillColor_inverted : enabledFillColor)?.uiColor } @@ -145,7 +138,6 @@ public class ButtonModel: ButtonModelProtocol, MoleculeModelProtocol, FormGroupW enabledTextColor_inverted = Color(uiColor: .mvmBlack) disabledFillColor_inverted = Color(uiColor: .mvmCoolGray6) disabledTextColor_inverted = Color(uiColor: .mvmBlack) - borderWidth = 0 } /// Defines the default appearance for the Secondary style. @@ -159,7 +151,6 @@ public class ButtonModel: ButtonModelProtocol, MoleculeModelProtocol, FormGroupW enabledBorderColor_inverted = Color(uiColor: .mvmWhite) disabledTextColor_inverted = Color(uiColor: .mvmCoolGray6) disabledBorderColor_inverted = Color(uiColor: .mvmCoolGray6) - borderWidth = 1 } //-------------------------------------------------- diff --git a/MVMCoreUI/Atomic/Atoms/Buttons/PillButton.swift b/MVMCoreUI/Atomic/Atoms/Buttons/PillButton.swift index 1cfa59f7..5fe7a972 100644 --- a/MVMCoreUI/Atomic/Atoms/Buttons/PillButton.swift +++ b/MVMCoreUI/Atomic/Atoms/Buttons/PillButton.swift @@ -58,7 +58,7 @@ open class PillButton: Button, MVMCoreUIViewConstrainingProtocol { buttonModel?.style = .primary enabledTitleColor = buttonModel?.enabledColors.text ?? .mvmWhite disabledTitleColor = buttonModel?.disabledColors.text ?? .mvmWhite - layer.borderWidth = buttonModel?.getBorderWidth() ?? 0 + layer.borderWidth = 0 backgroundColor = isEnabled ? buttonModel?.enabledColors.fill ?? .mvmBlack : buttonModel?.disabledColors.fill ?? .mvmCoolGray6 } @@ -69,7 +69,7 @@ open class PillButton: Button, MVMCoreUIViewConstrainingProtocol { enabledTitleColor = buttonModel?.enabledColors.text ?? .mvmBlack disabledTitleColor = buttonModel?.disabledColors.text ?? .mvmCoolGray6 backgroundColor = .clear - layer.borderWidth = buttonModel?.getBorderWidth() ?? 1 + layer.borderWidth = 1 borderColor = isEnabled ? buttonModel?.enabledColors.border ?? .mvmBlack : buttonModel?.disabledColors.border ?? .mvmCoolGray6 } @@ -98,7 +98,7 @@ open class PillButton: Button, MVMCoreUIViewConstrainingProtocol { } if let borderColor = buttonModel?.enabledColors.border { - layer.borderWidth = buttonModel?.getBorderWidth() ?? 1 + layer.borderWidth = 1 self.borderColor = borderColor } } else { @@ -107,7 +107,7 @@ open class PillButton: Button, MVMCoreUIViewConstrainingProtocol { } if let borderColor = buttonModel?.disabledColors.border { - layer.borderWidth = buttonModel?.getBorderWidth() ?? 1 + layer.borderWidth = 1 self.borderColor = borderColor } }