| Index: chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.mm
|
| diff --git a/chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.mm b/chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.mm
|
| index 68cf08801908b9cac716b7767a7fc70405aed54e..344e24f01dee4e8f10d5e27a37d28eabb1dcdc9f 100644
|
| --- a/chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.mm
|
| +++ b/chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.mm
|
| @@ -71,6 +71,9 @@ using content::WebContents;
|
| // things work on other platforms.
|
|
|
| namespace {
|
| +const int kOmniboxLargeFontSizeDelta = 9;
|
| +const int kOmniboxNormalFontSizeDelta = 1;
|
| +const int kOmniboxSmallFontSizeDelta = 0;
|
|
|
| // TODO(shess): This is ugly, find a better way. Using it right now
|
| // so that I can crib from gtk and still be able to see that I'm using
|
| @@ -518,7 +521,7 @@ void OmniboxViewMac::EmphasizeURLComponents() {
|
| void OmniboxViewMac::ApplyTextStyle(
|
| NSMutableAttributedString* attributedString) {
|
| [attributedString addAttribute:NSFontAttributeName
|
| - value:GetFieldFont(gfx::Font::NORMAL)
|
| + value:GetNormalFieldFont()
|
| range:NSMakeRange(0, [attributedString length])];
|
|
|
| // Make a paragraph style locking in the standard line height as the maximum,
|
| @@ -1078,26 +1081,35 @@ void OmniboxViewMac::FocusLocation(bool select_all) {
|
| }
|
|
|
| // static
|
| -NSFont* OmniboxViewMac::GetFieldFont(int style) {
|
| - // This value should be kept in sync with InstantPage::InitializeFonts.
|
| +NSFont* OmniboxViewMac::GetNormalFieldFont() {
|
| ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
|
| - return rb.GetFontList(ui::ResourceBundle::BaseFont).Derive(1, style)
|
| - .GetPrimaryFont().GetNativeFont();
|
| + return rb
|
| + .GetFontWithDelta(kOmniboxNormalFontSizeDelta, gfx::Font::NORMAL,
|
| + gfx::Font::Weight::NORMAL)
|
| + .GetNativeFont();
|
| +}
|
| +
|
| +NSFont* OmniboxViewMac::GetBoldFieldFont() {
|
| + ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
|
| + return rb
|
| + .GetFontWithDelta(kOmniboxNormalFontSizeDelta, gfx::Font::NORMAL,
|
| + gfx::Font::Weight::BOLD)
|
| + .GetNativeFont();
|
| }
|
|
|
| -NSFont* OmniboxViewMac::GetLargeFont(int style) {
|
| +NSFont* OmniboxViewMac::GetLargeFont() {
|
| ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
|
| - return rb.GetFontList(ui::ResourceBundle::LargeFont)
|
| - .Derive(1, style)
|
| - .GetPrimaryFont()
|
| + return rb
|
| + .GetFontWithDelta(kOmniboxLargeFontSizeDelta, gfx::Font::NORMAL,
|
| + gfx::Font::Weight::NORMAL)
|
| .GetNativeFont();
|
| }
|
|
|
| -NSFont* OmniboxViewMac::GetSmallFont(int style) {
|
| +NSFont* OmniboxViewMac::GetSmallFont() {
|
| ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
|
| - return rb.GetFontList(ui::ResourceBundle::SmallFont)
|
| - .Derive(1, style)
|
| - .GetPrimaryFont()
|
| + return rb
|
| + .GetFontWithDelta(kOmniboxSmallFontSizeDelta, gfx::Font::NORMAL,
|
| + gfx::Font::Weight::NORMAL)
|
| .GetNativeFont();
|
| }
|
|
|
|
|