Skip to content

Commit

Permalink
Refactor FXIOS-9165 [Fonts] - Updated Fonts On SettingsViewController…
Browse files Browse the repository at this point in the history
… to FXFontStyles (#20323)
  • Loading branch information
tisumi99 authored May 23, 2024
1 parent 2699f50 commit 71116e8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ class ContentBlockerSettingViewController: SettingsTableViewController {
let title: String = .TrackerProtectionLearnMore

let theme = themeManager.currentTheme(for: windowUUID)
let font = DefaultDynamicFontHelper.preferredFont(withTextStyle: .subheadline, size: 12.0)
let font = FXFontStyles.Regular.caption1.scaledFont()
var attributes = [NSAttributedString.Key: AnyObject]()
attributes[NSAttributedString.Key.foregroundColor] = theme.colors.actionPrimary
attributes[NSAttributedString.Key.font] = font
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,6 @@ class StringSetting: Setting, UITextFieldDelegate {
private struct UX {
static let padding: CGFloat = 15
static let textFieldHeight: CGFloat = 44
static let fontSize: CGFloat = 17
static let textFieldIdentifierSuffix = "TextField"
}

Expand Down Expand Up @@ -575,11 +574,7 @@ class StringSetting: Setting, UITextFieldDelegate {
cell.accessibilityTraits = UIAccessibilityTraits.none
cell.contentView.addSubview(textField)

textField.font = DefaultDynamicFontHelper.preferredFont(
withTextStyle: .body,
size: UX.fontSize,
weight: .regular
)
textField.font = FXFontStyles.Regular.body.scaledFont()

NSLayoutConstraint.activate(
[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ class ThemeSettingsController: ThemedTableViewController, StoreSubscriber {
struct UX {
static var rowHeight: CGFloat = 70
static var moonSunIconSize: CGFloat = 18
static var footerFontSize: CGFloat = 12
static var sliderLeftRightInset: CGFloat = 16
static var spaceBetweenTableSections: CGFloat = 20
}
Expand Down Expand Up @@ -202,8 +201,7 @@ class ThemeSettingsController: ThemedTableViewController, StoreSubscriber {
let label: UILabel = .build { label in
label.text = .DisplayThemeSectionFooter
label.numberOfLines = 0
label.font = DefaultDynamicFontHelper.preferredFont(withTextStyle: .footnote,
size: UX.footerFontSize)
label.font = FXFontStyles.Regular.caption1.scaledFont()
label.textColor = self.themeManager.currentTheme(for: self.windowUUID).colors.textSecondary
}
footer.addSubview(label)
Expand Down

0 comments on commit 71116e8

Please sign in to comment.