Skip to content

Commit

Permalink
fix height calculation based on font size (microsoft#2031)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderboswell authored May 22, 2024
1 parent db897b8 commit 0a4e94b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ios/FluentUI/Table View/TableViewCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ open class TableViewCell: UITableViewCell, TokenizedControlInternal {
subtitleHeight: labelSize(text: subtitle,
attributedText: attributedSubtitle,
isAttributedTextSet: isAttributedSubtitleSet,
font: subtitleFont ?? (layoutType == .twoLines ? tokenSet[.subtitleTwoLinesFont].uiFont : tokenSet[.subtitleThreeLinesFont].uiFont),
font: subtitleFont ?? (layoutType == .threeLines ? tokenSet[.subtitleThreeLinesFont].uiFont : tokenSet[.subtitleTwoLinesFont].uiFont),
numberOfLines: subtitleNumberOfLines,
textAreaWidth: textAreaWidth,
leadingAccessoryView: subtitleLeadingAccessoryView,
Expand Down Expand Up @@ -1232,7 +1232,7 @@ open class TableViewCell: UITableViewCell, TokenizedControlInternal {
titleLabel.font = tokenSet[.titleFont].uiFont
}
if !isAttributedSubtitleSet {
subtitleLabel.font = (layoutType == .twoLines ? tokenSet[.subtitleTwoLinesFont].uiFont : tokenSet[.subtitleThreeLinesFont].uiFont)
subtitleLabel.font = (layoutType == .threeLines ? tokenSet[.subtitleThreeLinesFont].uiFont : tokenSet[.subtitleTwoLinesFont].uiFont)
}
if !isAttributedFooterSet {
footerLabel.font = tokenSet[.footerFont].uiFont
Expand Down

0 comments on commit 0a4e94b

Please sign in to comment.