Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(48)

Issue 2057043002: Align the Mac Omnibox items vertically again. (Closed)

Created:
4 years, 6 months ago by Mikus
Modified:
4 years, 2 months ago
Reviewers:
tapted
CC:
chromium-reviews, James Su
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Align the Mac Omnibox items vertically again. The recent refactoring didn't quite work out and it needs to be reverted. BUG=617144

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+42 lines, -43 lines) Patch
M chrome/browser/ui/cocoa/location_bar/location_bar_decoration.mm View 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/ui/cocoa/omnibox/omnibox_popup_cell.mm View 2 chunks +10 lines, -5 lines 0 comments Download
M chrome/browser/ui/cocoa/omnibox/omnibox_popup_matrix.mm View 1 chunk +4 lines, -1 line 1 comment Download
M chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.h View 2 chunks +6 lines, -4 lines 0 comments Download
M chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.mm View 4 chunks +20 lines, -32 lines 1 comment Download

Messages

Total messages: 6 (2 generated)
Mikus
4 years, 6 months ago (2016-06-13 10:57:49 UTC) #3
tapted
What's the actual bug? If there's something going on that isn't understood, we can't just ...
4 years, 6 months ago (2016-06-14 00:08:36 UTC) #4
tapted
So really we should lock the baseline in the popup - I'm not convinced that ...
4 years, 6 months ago (2016-06-14 05:51:34 UTC) #5
joleksy
4 years, 6 months ago (2016-06-15 13:28:23 UTC) #6
On 2016/06/14 05:51:34, tapted wrote:
> So really we should lock the baseline in the popup - I'm not convinced that
some
> OS font change will preserve the baseline.
> 
>
https://codereview.chromium.org/2057043002/diff/1/chrome/browser/ui/cocoa/omn...
> File chrome/browser/ui/cocoa/omnibox/omnibox_popup_matrix.mm (right):
> 
>
https://codereview.chromium.org/2057043002/diff/1/chrome/browser/ui/cocoa/omn...
> chrome/browser/ui/cocoa/omnibox/omnibox_popup_matrix.mm:155: [layoutManager
> defaultLineHeightForFont:OmniboxViewMac::GetLargeFont(
> defaultLineHeightForFont has a rounding bug - see
> https://codereview.chromium.org/1252893002 -- but I don't think that's it.
> 
>
https://codereview.chromium.org/2057043002/diff/1/chrome/browser/ui/cocoa/omn...
> File chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.mm (left):
> 
>
https://codereview.chromium.org/2057043002/diff/1/chrome/browser/ui/cocoa/omn...
> chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.mm:1097: return rb
> So the minimal fix seems to be to do
> 
>   // Request a bold font, then make it larger. ResourceBundle will do the
>   // opposite which makes a large system normal font a non-system bold font.
>   // That gives a different baseline to making the non-system bold font
larger.
>   // And while the omnibox locks the baseline in ApplyTextStyle(),
>   // OmniboxPopupCellData does not.
>   return rb
>       .GetFontWithDelta(0, gfx::Font::NORMAL, gfx::Font::Weight::BOLD)
>       .Derive(kOmniboxNormalFontSizeDelta, gfx::Font::NORMAL,
>               gfx::Font::Weight::BOLD)
>       .GetNativeFont();

New review with suggested change created:
https://codereview.chromium.org/2068163002/

Powered by Google App Engine
This is Rietveld 408576698