Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions BrowserKit/Sources/MenuKit/MenuMainView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ public final class MenuMainView: UIView,

tableView.topAnchor.constraint(equalTo: accountHeaderView.bottomAnchor),
tableView.bottomAnchor.constraint(equalTo: self.bottomAnchor),
tableView.leadingAnchor.constraint(equalTo: self.leadingAnchor, constant: -UX.horizontalTableViewMargin),
tableView.trailingAnchor.constraint(equalTo: self.trailingAnchor, constant: UX.horizontalTableViewMargin)
tableView.leadingAnchor.constraint(equalTo: self.leadingAnchor),
tableView.trailingAnchor.constraint(equalTo: self.trailingAnchor)
])
}

Expand Down
6 changes: 5 additions & 1 deletion BrowserKit/Sources/MenuKit/MenuTableView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ class MenuTableView: UIView,
UITableViewDataSource, ThemeApplicable {
private struct UX {
static let topPadding: CGFloat = 12
static let tableViewMargin: CGFloat = 16
static let distanceBetweenSections: CGFloat = 32
}

private var tableView: UITableView
Expand All @@ -25,6 +27,8 @@ class MenuTableView: UIView,

override init(frame: CGRect) {
tableView = UITableView(frame: .zero, style: .insetGrouped)
tableView.layoutMargins = UIEdgeInsets(top: 0, left: UX.tableViewMargin, bottom: 0, right: UX.tableViewMargin)
tableView.sectionFooterHeight = 0
menuData = []
super.init(frame: .zero)
setupView()
Expand Down Expand Up @@ -69,7 +73,7 @@ class MenuTableView: UIView,
_ tableView: UITableView,
heightForHeaderInSection section: Int
) -> CGFloat {
return section == 0 ? UX.topPadding : UITableView.automaticDimension
return section == 0 ? UX.topPadding : UX.distanceBetweenSections
}

func tableView(
Expand Down