From c07ed843bd990def22004505571f3c1c5e7c7784 Mon Sep 17 00:00:00 2001 From: "shess@chromium.org" Date: Thu, 14 May 2009 22:07:53 +0000 Subject: Use the Mac omnibox field's font as the basis for the fonts used in the field and popup. NSAttributedString has fixed default font, unless overridden, this basically makes the font used consistent with the field size. Theming will most likely change this again, but we can be prettier in the meanwhile. Review URL: http://codereview.chromium.org/115334 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16112 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/autocomplete/autocomplete_popup_view_mac.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'chrome/browser/autocomplete/autocomplete_popup_view_mac.h') diff --git a/chrome/browser/autocomplete/autocomplete_popup_view_mac.h b/chrome/browser/autocomplete/autocomplete_popup_view_mac.h index eb00d23..c58328b 100644 --- a/chrome/browser/autocomplete/autocomplete_popup_view_mac.h +++ b/chrome/browser/autocomplete/autocomplete_popup_view_mac.h @@ -71,8 +71,10 @@ class AutocompletePopupViewMac : public AutocompletePopupView { void AcceptInput(); // Return the text to show for the match, based on the match's - // contents and description. - static NSMutableAttributedString* MatchText(const AutocompleteMatch& match); + // contents and description. Result will be in |font|, with the + // boldfaced version used for matches. + static NSAttributedString* MatchText(const AutocompleteMatch& match, + NSFont* font); // Helper for MatchText() to allow sharing code between the contents // and description cases. Returns NSMutableAttributedString as a @@ -80,7 +82,7 @@ class AutocompletePopupViewMac : public AutocompletePopupView { static NSMutableAttributedString* DecorateMatchedString( const std::wstring &matchString, const AutocompleteMatch::ACMatchClassifications &classifications, - NSColor* textColor); + NSColor* textColor, NSFont* font); private: // Create the popup_ instance if needed. -- cgit v1.1