Commit 9ac44846 authored by Justin Cohen's avatar Justin Cohen Committed by Commit Bot

[ios] Fix accessory view layout for omnibox popup

Bug: 795683
Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
Change-Id: Iab78eeda08a1de8a56a662f8a0b2b4d4fe8696da
Reviewed-on: https://chromium-review.googlesource.com/847429Reviewed-by: default avatarStepan Khapugin <stkhapugin@chromium.org>
Commit-Queue: Justin Cohen <justincohen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#526922}
parent df0d9265
...@@ -107,16 +107,17 @@ const CGFloat kAppendButtonSize = 48.0; ...@@ -107,16 +107,17 @@ const CGFloat kAppendButtonSize = 48.0;
- (void)layoutAccessoryViews { - (void)layoutAccessoryViews {
LayoutRect imageViewLayout = LayoutRectMake( LayoutRect imageViewLayout = LayoutRectMake(
IsCompactTablet() ? kLeadingPaddingIpadCompact : kLeadingPaddingIpad, IsCompactTablet() ? kLeadingPaddingIpadCompact : kLeadingPaddingIpad,
CGRectGetWidth(self.bounds), CGRectGetWidth(self.contentView.bounds),
floor((_rowHeight - kImageDimensionLength) / 2), kImageDimensionLength, floor((_rowHeight - kImageDimensionLength) / 2), kImageDimensionLength,
kImageDimensionLength); kImageDimensionLength);
_imageView.frame = LayoutRectGetRect(imageViewLayout); _imageView.frame = LayoutRectGetRect(imageViewLayout);
LayoutRect trailingAccessoryLayout = LayoutRectMake( LayoutRect trailingAccessoryLayout =
CGRectGetWidth(self.bounds) - kAppendButtonSize - LayoutRectMake(CGRectGetWidth(self.contentView.bounds) -
kAppendButtonTrailingMargin, kAppendButtonSize - kAppendButtonTrailingMargin,
CGRectGetWidth(self.bounds), floor((_rowHeight - kAppendButtonSize) / 2), CGRectGetWidth(self.contentView.bounds),
kAppendButtonSize, kAppendButtonSize); floor((_rowHeight - kAppendButtonSize) / 2),
kAppendButtonSize, kAppendButtonSize);
_appendButton.frame = LayoutRectGetRect(trailingAccessoryLayout); _appendButton.frame = LayoutRectGetRect(trailingAccessoryLayout);
} }
......
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