diff --git a/VDS/Components/Buttons/ButtonBase.swift b/VDS/Components/Buttons/ButtonBase.swift index 121b349b..0623bb3b 100644 --- a/VDS/Components/Buttons/ButtonBase.swift +++ b/VDS/Components/Buttons/ButtonBase.swift @@ -61,7 +61,7 @@ open class ButtonBase: UIButton, ViewProtocol, UserInfoable, Clickable { open var surface: Surface = .light { didSet { setNeedsUpdate() } } /// Text that will be used in the titleLabel. - open var text: String? { didSet { setNeedsUpdate() } } + open var text: String? { didSet { textSetMode = .text; setNeedsUpdate() } } /// Array of LabelAttributeModel objects used in rendering the text. open var textAttributes: [any LabelAttributeModel]? { nil } @@ -163,8 +163,7 @@ open class ButtonBase: UIButton, ViewProtocol, UserInfoable, Clickable { override public func setTitle(_ title: String?, for state: UIControl.State) { // When text is set, we may need to re-style it as attributedText // with the correct paragraph style to achieve the desired line height. - textSetMode = .text - styleText(title, for: state) + text = title } /// :nodoc: