Commit 593e71e1 authored by Olesia Marukhno's avatar Olesia Marukhno Committed by Commit Bot

[omnibox] Fix pedal buttons misplacement

The first time when match changes its height, pedal button is misplaced
and overlaps with another match. This was caused by setting wrong bounds
for button row.

Previous cl was reverted because wrong bounds were set and that caused
button mouse events not working. This is fixed in this patch.

Bug: 1121934
Change-Id: I7c1dbbd0b1ec7e59c602a2608f0a7501a26a2490
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2390905Reviewed-by: default avatarBret Sepulveda <bsep@chromium.org>
Commit-Queue: Olesia Marukhno <olesiamarukhno@google.com>
Cr-Commit-Position: refs/heads/master@{#804214}
parent b50cbe20
...@@ -413,10 +413,9 @@ void OmniboxResultView::Layout() { ...@@ -413,10 +413,9 @@ void OmniboxResultView::Layout() {
// TODO(orinj): Determine and use the best way to set bounds; probably // TODO(orinj): Determine and use the best way to set bounds; probably
// GetPreferredSize() with a layout manager. // GetPreferredSize() with a layout manager.
// Put it below the suggestion view. // Put it below the suggestion view.
button_row_->SetBounds(0, button_row_->height(), button_row_->SetBounds(0, suggestion_height,
suggestion_width - suggestion_indent, suggestion_width - suggestion_indent,
suggestion_height); button_row_->GetPreferredSize().height());
button_row_->Layout();
} }
} }
......
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