Commit fb9da802 authored by Dave Schuyler's avatar Dave Schuyler Committed by Commit Bot

[Omnibox] fix size of entity image

This CL fixes a bug in sizing the entity images where they would be sized
too large if shown after an Answer result (such as weather). This
occurred because the old height for the answer result was being used in
the entity sizing.

Bug: None
Change-Id: Ia372c142a011657af150eb651403a61aeab2943d
Reviewed-on: https://chromium-review.googlesource.com/1024926Reviewed-by: default avatarJustin Donnelly <jdonnelly@chromium.org>
Commit-Queue: Dave Schuyler <dschuyler@chromium.org>
Cr-Commit-Position: refs/heads/master@{#552905}
parent f5ddd1ba
...@@ -293,7 +293,7 @@ void OmniboxSuggestionView::LayoutEntity() { ...@@ -293,7 +293,7 @@ void OmniboxSuggestionView::LayoutEntity() {
int x = GetIconAlignmentOffset() + HorizontalPadding() + int x = GetIconAlignmentOffset() + HorizontalPadding() +
LocationBarView::GetBorderThicknessDip(); LocationBarView::GetBorderThicknessDip();
int y = GetVerticalInsets(text_height_, is_answer_).top(); int y = GetVerticalInsets(text_height_, is_answer_).top();
int image_edge_length = text_height_ + description_view_->GetLineHeight(); int image_edge_length = text_height_ * 2;
image_view_->SetImageSize(gfx::Size(image_edge_length, image_edge_length)); image_view_->SetImageSize(gfx::Size(image_edge_length, image_edge_length));
image_view_->SetBounds(x, y, image_edge_length, image_edge_length); image_view_->SetBounds(x, y, image_edge_length, image_edge_length);
x += image_edge_length + HorizontalPadding(); x += image_edge_length + HorizontalPadding();
......
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