Commit 5202b90d authored by Gauthier Ambard's avatar Gauthier Ambard Committed by Commit Bot

[iOS] Adjust top/bottom insets of Popup Menu

The bottom insets of the popup menus were wrong because of a rounding
error. This CL adjusts it by rounding at the end of the additions
instead of doing everytime a new element is computed.

Bug: 850516
Cq-Include-Trybots: luci.chromium.try:ios-simulator-full-configs;master.tryserver.chromium.mac:ios-simulator-cronet
Change-Id: Ic99c3d71e1f7d8a0b47a3e6453242d4a36007e66
Reviewed-on: https://chromium-review.googlesource.com/1174253
Commit-Queue: Stepan Khapugin <stkhapugin@chromium.org>
Reviewed-by: default avatarStepan Khapugin <stkhapugin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#582902}
parent fe13f9d6
......@@ -171,14 +171,14 @@ const CGFloat kScrollIndicatorVerticalInsets = 11;
[self.tableViewModel itemsInSectionWithIdentifier:sectionIdentifier]) {
CGSize sizeForCell = [item cellSizeForWidth:self.view.bounds.size.width];
width = MAX(width, ceil(sizeForCell.width));
height += ceil(sizeForCell.height);
height += sizeForCell.height;
}
// Add the separator height (only available the non-final sections).
height += [self tableView:self.tableView heightForFooterInSection:section];
}
height +=
self.tableView.contentInset.top + self.tableView.contentInset.bottom;
return CGSizeMake(width, height);
return CGSizeMake(width, ceil(height));
}
#pragma mark - UITableViewDelegate
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment