Change indent width to match other iOS outline view indent widths

This commit is contained in:
Maurice Parker 2019-04-29 09:20:45 -05:00
parent 2dcde1ab8e
commit d2482233ab
2 changed files with 3 additions and 4 deletions

View File

@ -11,7 +11,6 @@ import RSCore
struct MasterFeedTableViewCellLayout {
private static let indent = CGFloat(integerLiteral: 14)
private static let editingControlIndent = CGFloat(integerLiteral: 40)
private static let imageSize = CGSize(width: 20, height: 20)
private static let marginLeft = CGFloat(integerLiteral: 8)
@ -34,7 +33,7 @@ struct MasterFeedTableViewCellLayout {
var initialIndent = MasterFeedTableViewCellLayout.marginLeft + insets.left
if indent {
initialIndent += MasterFeedTableViewCellLayout.indent
initialIndent += MasterFeedTableViewCellLayout.imageSize.width + MasterFeedTableViewCellLayout.imageMarginRight
}
if showingEditingControl {
initialIndent += MasterFeedTableViewCellLayout.editingControlIndent

View File

@ -92,7 +92,7 @@ class MasterFeedTableViewSectionHeader: UITableViewHeaderFooterView {
// cell below.
unreadCountView.unreadCount = 888
let layout = MasterFeedTableViewCellLayout(cellWidth: size.width, insets: safeAreaInsets, shouldShowImage: false, label: titleView, unreadCountView: unreadCountView, showingEditingControl: false, indent: true, shouldShowDisclosure: true)
let layout = MasterFeedTableViewCellLayout(cellWidth: size.width, insets: safeAreaInsets, shouldShowImage: false, label: titleView, unreadCountView: unreadCountView, showingEditingControl: false, indent: false, shouldShowDisclosure: true)
return CGSize(width: bounds.width, height: layout.height)
@ -100,7 +100,7 @@ class MasterFeedTableViewSectionHeader: UITableViewHeaderFooterView {
override func layoutSubviews() {
super.layoutSubviews()
let layout = MasterFeedTableViewCellLayout(cellWidth: bounds.size.width, insets: safeAreaInsets, shouldShowImage: false, label: titleView, unreadCountView: unreadCountView, showingEditingControl: false, indent: true, shouldShowDisclosure: true)
let layout = MasterFeedTableViewCellLayout(cellWidth: bounds.size.width, insets: safeAreaInsets, shouldShowImage: false, label: titleView, unreadCountView: unreadCountView, showingEditingControl: false, indent: false, shouldShowDisclosure: true)
layoutWith(layout)
}