From 5c85bad48a721d055446346d553d46e9f1f93f63 Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Wed, 4 Oct 2023 15:31:29 -0500 Subject: [PATCH 1/2] CXTDT-470665 - Button - Text wrapping in two lines Signed-off-by: Matt Bruce --- VDS/Components/Buttons/ButtonBase.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/VDS/Components/Buttons/ButtonBase.swift b/VDS/Components/Buttons/ButtonBase.swift index 64dbea7e..c10baabc 100644 --- a/VDS/Components/Buttons/ButtonBase.swift +++ b/VDS/Components/Buttons/ButtonBase.swift @@ -116,6 +116,7 @@ open class ButtonBase: UIButton, ViewProtocol, UserInfoable, Clickable { titleLabel?.adjustsFontSizeToFitWidth = false titleLabel?.lineBreakMode = .byTruncatingTail + titleLabel?.numberOfLines = 1 } open func updateView() { From 6ce86b5ac1e367eccb238678f0f1404c7e871d0f Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Wed, 4 Oct 2023 15:35:16 -0500 Subject: [PATCH 2/2] always allow the buttons to highlight regardless of a click handler Signed-off-by: Matt Bruce --- VDS/Components/Buttons/ButtonBase.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VDS/Components/Buttons/ButtonBase.swift b/VDS/Components/Buttons/ButtonBase.swift index c10baabc..879588d1 100644 --- a/VDS/Components/Buttons/ButtonBase.swift +++ b/VDS/Components/Buttons/ButtonBase.swift @@ -81,7 +81,7 @@ open class ButtonBase: UIButton, ViewProtocol, UserInfoable, Clickable { public var isHighlighting = false /// Whether the Button should handle the isHighlighted state. - open var shouldHighlight: Bool { isHighlighting == false && onClickSubscriber != nil } + open var shouldHighlight: Bool { isHighlighting == false } /// Whether the Control is highlighted or not. open override var isHighlighted: Bool {