Updated some of the graphics to be more correct and added the Edit button to the Master view.

This commit is contained in:
Maurice Parker
2019-04-16 20:56:02 -05:00
parent 056b524122
commit 694def74bf
17 changed files with 36 additions and 17 deletions

View File

@@ -21,13 +21,14 @@ struct MasterTableViewCellLayout {
let titleRect: CGRect
let unreadCountRect: CGRect
init(cellSize: CGSize, shouldShowImage: Bool, label: UILabel, unreadCountView: MasterUnreadCountView) {
init(cellSize: CGSize, shouldShowImage: Bool, label: UILabel, unreadCountView: MasterUnreadCountView, isEditing: Bool) {
let bounds = CGRect(x: 0.0, y: 0.0, width: floor(cellSize.width), height: floor(cellSize.height))
var rFavicon = CGRect.zero
if shouldShowImage {
rFavicon = CGRect(x: MasterTableViewCellLayout.imageMarginLeft, y: 0.0, width: MasterTableViewCellLayout.imageSize.width, height: MasterTableViewCellLayout.imageSize.height)
let indent = isEditing ? MasterTableViewCellLayout.imageMarginLeft + 40 : MasterTableViewCellLayout.imageMarginLeft
rFavicon = CGRect(x: indent, y: 0.0, width: MasterTableViewCellLayout.imageSize.width, height: MasterTableViewCellLayout.imageSize.height)
rFavicon = MasterTableViewCellLayout.centerVertically(rFavicon, bounds)
}
self.faviconRect = rFavicon