summaryrefslogtreecommitdiffstats
path: root/chrome/browser/autocomplete/autocomplete_popup_view_mac.h
diff options
context:
space:
mode:
authorshess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-14 22:07:53 +0000
committershess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-14 22:07:53 +0000
commitc07ed843bd990def22004505571f3c1c5e7c7784 (patch)
tree6180b99c3a2c9453c878d8f29d1e405bdfc0f220 /chrome/browser/autocomplete/autocomplete_popup_view_mac.h
parent8987b765bd29634520d43db146b287710d7c0255 (diff)
downloadchromium_src-c07ed843bd990def22004505571f3c1c5e7c7784.zip
chromium_src-c07ed843bd990def22004505571f3c1c5e7c7784.tar.gz
chromium_src-c07ed843bd990def22004505571f3c1c5e7c7784.tar.bz2
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
Diffstat (limited to 'chrome/browser/autocomplete/autocomplete_popup_view_mac.h')
-rw-r--r--chrome/browser/autocomplete/autocomplete_popup_view_mac.h8
1 files changed, 5 insertions, 3 deletions
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.