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

Unified Diff: chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.mm

Issue 1819753003: Allow various font weights in gfx. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Mac fixes Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 479d8e911f92699003cec4eeb628c987b3418d51..eda59508ff7d501d0d6edaa1ee09d3c4c092512b 100644
--- a/chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.mm
+++ b/chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.mm
@@ -1075,14 +1075,16 @@ void OmniboxViewMac::FocusLocation(bool select_all) {
NSFont* OmniboxViewMac::GetFieldFont(int style) {
tapted 2016/03/27 23:10:02 Callers only ever pass in BOLD or NORMAL to this m
Mikus 2016/03/29 10:55:38 Done.
// This value should be kept in sync with InstantPage::InitializeFonts.
ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
- return rb.GetFontList(ui::ResourceBundle::BaseFont).Derive(1, style)
- .GetPrimaryFont().GetNativeFont();
+ return rb.GetFontList(ui::ResourceBundle::BaseFont)
+ .Derive(1, style, gfx::Font::Weight::NORMAL)
+ .GetPrimaryFont()
+ .GetNativeFont();
Peter Kasting 2016/03/26 00:56:51 Nit: Maybe: namespace { NSFont* GetFontForSizeAn
Mikus 2016/03/29 10:55:38 Not really needed anymore.
}
NSFont* OmniboxViewMac::GetLargeFont(int style) {
ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
return rb.GetFontList(ui::ResourceBundle::LargeFont)
- .Derive(1, style)
+ .Derive(1, style, gfx::Font::Weight::NORMAL)
.GetPrimaryFont()
.GetNativeFont();
}
@@ -1090,7 +1092,7 @@ NSFont* OmniboxViewMac::GetLargeFont(int style) {
NSFont* OmniboxViewMac::GetSmallFont(int style) {
ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
return rb.GetFontList(ui::ResourceBundle::SmallFont)
- .Derive(1, style)
+ .Derive(1, style, gfx::Font::Weight::NORMAL)
.GetPrimaryFont()
.GetNativeFont();
}

Powered by Google App Engine
This is Rietveld 408576698