mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2024-12-20 14:33:04 +01:00
Made timeline layout tweaks to make indicator, avatar, and first line of text line up better. Issue #689
This commit is contained in:
parent
2d91e64148
commit
00ee775170
@ -28,7 +28,7 @@ extension MasterTimelineCellLayout {
|
||||
var r = CGRect.zero
|
||||
r.size = CGSize(width: MasterTimelineDefaultCellLayout.unreadCircleDimension, height: MasterTimelineDefaultCellLayout.unreadCircleDimension)
|
||||
r.origin.x = point.x
|
||||
r.origin.y = point.y + 8
|
||||
r.origin.y = point.y + 4
|
||||
return r
|
||||
}
|
||||
|
||||
@ -38,14 +38,15 @@ extension MasterTimelineCellLayout {
|
||||
r.size.width = MasterTimelineDefaultCellLayout.starDimension
|
||||
r.size.height = MasterTimelineDefaultCellLayout.starDimension
|
||||
r.origin.x = floor(point.x - ((MasterTimelineDefaultCellLayout.starDimension - MasterTimelineDefaultCellLayout.unreadCircleDimension) / 2.0))
|
||||
r.origin.y = point.y + 5
|
||||
r.origin.y = point.y + 2
|
||||
return r
|
||||
}
|
||||
|
||||
static func rectForAvatar(_ point: CGPoint) -> CGRect {
|
||||
var r = CGRect.zero
|
||||
r.size = MasterTimelineDefaultCellLayout.avatarSize
|
||||
r.origin = point
|
||||
r.origin.x = point.x
|
||||
r.origin.y = point.y + 4
|
||||
return r
|
||||
}
|
||||
|
||||
|
@ -17,7 +17,7 @@ struct MasterTimelineDefaultCellLayout: MasterTimelineCellLayout {
|
||||
static let unreadCircleDimension = CGFloat(integerLiteral: 12)
|
||||
static let unreadCircleMarginRight = CGFloat(integerLiteral: 8)
|
||||
|
||||
static let starDimension = CGFloat(integerLiteral: 13)
|
||||
static let starDimension = CGFloat(integerLiteral: 16)
|
||||
|
||||
static let avatarSize = CGSize(width: 48.0, height: 48.0)
|
||||
static let avatarMarginRight = CGFloat(integerLiteral: 8)
|
||||
|
Loading…
Reference in New Issue
Block a user