Merge pull request #1212 from jbennett/feature/1194-align-feed-icon-w-first-line

Align feed icon with first line of label
This commit is contained in:
Maurice Parker 2019-10-28 12:54:25 -05:00 committed by GitHub
commit beab7bbbc8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -54,7 +54,9 @@ struct MasterFeedTableViewCellLayout {
var rFavicon = CGRect.zero
if !shouldShowDisclosure {
let x = bounds.origin.x + ((MasterFeedTableViewCellLayout.disclosureButtonSize.width - MasterFeedTableViewCellLayout.imageSize.width) / 2)
let y = UIFontMetrics.default.scaledValue(for: MasterFeedTableViewCellLayout.verticalPadding)
let y = UIFontMetrics.default.scaledValue(for: MasterFeedTableViewCellLayout.verticalPadding) +
label.font.lineHeight / 2.0 -
MasterFeedTableViewCellLayout.imageSize.height / 2.0
rFavicon = CGRect(x: x, y: y, width: MasterFeedTableViewCellLayout.imageSize.width, height: MasterFeedTableViewCellLayout.imageSize.height)
}