diff options
author | dschuyler <dschuyler@chromium.org> | 2015-05-28 14:41:57 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-05-28 21:42:25 +0000 |
commit | 330027c8db08545748e034bced2a3962d08759a3 (patch) | |
tree | bbcba781ea5d4beb5e5f70d2d8eaa0c61dbf208f /chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.mm | |
parent | db4d433ae7ce4cd1a0770798328db86f933bcc03 (diff) | |
download | chromium_src-330027c8db08545748e034bced2a3962d08759a3.zip chromium_src-330027c8db08545748e034bced2a3962d08759a3.tar.gz chromium_src-330027c8db08545748e034bced2a3962d08759a3.tar.bz2 |
[AiS] answer font styling
Answers in Suggest calls for mixed font styling. This CL allows for font size, color, and baseline to be controlled via the downloaded answer test style types.
BUG=449593
Review URL: https://codereview.chromium.org/1125513002
Cr-Commit-Position: refs/heads/master@{#331858}
Diffstat (limited to 'chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.mm')
-rw-r--r-- | chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.mm | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.mm b/chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.mm index efa97fe..0e8f701 100644 --- a/chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.mm +++ b/chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.mm @@ -1021,6 +1021,22 @@ NSFont* OmniboxViewMac::GetFieldFont(int style) { .GetPrimaryFont().GetNativeFont(); } +NSFont* OmniboxViewMac::GetLargeFont(int style) { + ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); + return rb.GetFontList(ui::ResourceBundle::LargeFont) + .Derive(1, style) + .GetPrimaryFont() + .GetNativeFont(); +} + +NSFont* OmniboxViewMac::GetSmallFont(int style) { + ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); + return rb.GetFontList(ui::ResourceBundle::SmallFont) + .Derive(1, style) + .GetPrimaryFont() + .GetNativeFont(); +} + int OmniboxViewMac::GetOmniboxTextLength() const { return static_cast<int>(GetTextLength()); } |