Skip to content

Commit

Permalink
Refactor FXIOS-8530 - Update Fonts in ContextualHintView to use FXFon…
Browse files Browse the repository at this point in the history
…tStyles (#19358)

* Update the fonts to use FXFontStyles

* Remove unused fontsize

* Update fonts to use FXFontStyles
  • Loading branch information
rojinpra7 authored Mar 25, 2024
1 parent bf1ca24 commit 19e6fe9
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,12 @@ public class ContextualHintView: UIView, ThemeApplicable {
private var viewModel: ContextualHintViewModel!

struct UX {
static let actionButtonTextSize: CGFloat = 17
static let closeButtonSize = CGSize(width: 35, height: 35)
static let closeButtonTrailing: CGFloat = 5
static let closeButtonTop: CGFloat = 23
static let closeButtonBottom: CGFloat = 12
static let closeButtonInsets = NSDirectionalEdgeInsets(top: 0, leading: 7.5, bottom: 15, trailing: 7.5)
static let actionButtonInsets = NSDirectionalEdgeInsets(top: 0, leading: 0, bottom: 0, trailing: 0)
static let descriptionTextSize: CGFloat = 17
static let stackViewLeading: CGFloat = 16
static let stackViewTopArrowTopConstraint: CGFloat = 16
static let stackViewBottomArrowTopConstraint: CGFloat = 5
Expand All @@ -37,7 +35,7 @@ public class ContextualHintView: UIView, ThemeApplicable {
}

private lazy var descriptionLabel: UILabel = .build { label in
label.font = DefaultDynamicFontHelper.preferredFont(withTextStyle: .body, size: UX.descriptionTextSize)
label.font = FXFontStyles.Regular.body.scaledFont()
label.textAlignment = .left
label.numberOfLines = 0
}
Expand Down Expand Up @@ -156,7 +154,7 @@ public class ContextualHintView: UIView, ThemeApplicable {

if viewModel.isActionType {
let textAttributes: [NSAttributedString.Key: Any] = [
.font: DefaultDynamicFontHelper.preferredFont(withTextStyle: .body, size: UX.actionButtonTextSize),
.font: FXFontStyles.Regular.body.scaledFont(),
.foregroundColor: theme.colors.textOnDark,
.underlineStyle: NSUnderlineStyle.single.rawValue
]
Expand Down

0 comments on commit 19e6fe9

Please sign in to comment.