New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 688408 link

Starred by 4 users

Issue metadata

Status: Fixed
Owner:
Closed: Apr 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Chrome
Pri: 3
Type: Bug

Blocking:
issue 591803



Sign in to add a comment

Adjust the vertical padding for Answers in Suggest in Views

Project Member Reported by jdonnelly@chromium.org, Feb 3 2017

Issue description

There is insufficient padding after the second line of an answer suggestion. And possibly a bit too much between the two lines of answer suggestions.

See attached screenshots.
 
Screenshot from 2017-01-31 14:35:04.png
48.0 KB View Download
Screenshot from 2017-01-31 14:43:56.png
45.2 KB View Download
pkasting: in the discussion in https://codereview.chromium.org/2654163005/ you suggested that adding vertical padding to the suggestion lines (as currently happens for the first line and as I proposed doing for the second line) was not the right approach. Was it the aspect of using GetAnswerLineHeight() and GetContentLineHeight() to add extra space that you objected to? Or just the use of a fixed DIP value? If the latter, what's the right way to add this padding?
Fixed DIP values are OK, my issue is with where this stuff is being computed.

My suspicion is that when there's no answer line, we want n DIP of padding below the content line, but when there is an answer line, we want that n to be below the answer line, and we want m DIP between the two, where m != n (probably m < n).

In other words, we really want padding "outside the content plus optional answer lines" and padding "between the content and answer lines".  Either that padding shouldn't be computed in the content/answer line height at all, or we have to do something like, when there is an answer line, the content line height is "top padding + content + middle padding" and the answer line height is "answer + bottom padding".

Comment 3 by k...@chromium.org, Feb 23 2017

That all sounds right. Currently it's a bit off because GetContentLineHeight() adds padding, but GetAnswerLineHeight() does not. I suspect the padding needs to move higher up the stack, to GetPreferredSize(), and PaintMatch(), which have the bigger picture.
Cc: maxwalker@chromium.org jdonnelly@chromium.org
 Issue 711462  has been merged into this issue.
Status: Started (was: Assigned)
Blocking: 591803
Status: Fixed (was: Started)
Labels: Merge-Request-59
Project Member

Comment 10 by sheriffbot@chromium.org, Apr 26 2017

Labels: -Merge-Request-59 Hotlist-Merge-Approved Merge-Approved-59
Your change meets the bar and is auto-approved for M59. Please go ahead and merge the CL to branch 3071 manually. Please contact milestone owner if you have questions.
Owners: amineer@(Android), cmasso@(iOS), gkihumba@(ChromeOS), Abdul Syed@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Project Member

Comment 11 by bugdroid1@chromium.org, Apr 27 2017

Labels: -merge-approved-59 merge-merged-3071
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d8866c55f567914fee36ee395fd2b8b3f3af6358

commit d8866c55f567914fee36ee395fd2b8b3f3af6358
Author: Justin Donnelly <jdonnelly@chromium.org>
Date: Thu Apr 27 15:46:46 2017

Refine the layout of omnibox answer suggestions.

BUG= 688408 

Review-Url: https://codereview.chromium.org/2834073004
Cr-Commit-Position: refs/heads/master@{#467038}
(cherry picked from commit acba7d57f5705edc143bc9a3f864ced5e411e138)

Review-Url: https://codereview.chromium.org/2851533002 .
Cr-Commit-Position: refs/branch-heads/3071@{#264}
Cr-Branched-From: a106f0abbf69dad349d4aaf4bcc4f5d376dd2377-refs/heads/master@{#464641}

[modify] https://crrev.com/d8866c55f567914fee36ee395fd2b8b3f3af6358/chrome/browser/ui/views/omnibox/omnibox_result_view.cc
[modify] https://crrev.com/d8866c55f567914fee36ee395fd2b8b3f3af6358/chrome/browser/ui/views/omnibox/omnibox_result_view.h

Sign in to add a comment