diff options
author | falken@chromium.org <falken@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-23 04:17:04 +0000 |
---|---|---|
committer | falken@chromium.org <falken@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-23 04:17:04 +0000 |
commit | e8e2ab171b90fbe71ca4fca5205cd25dc07dbfd0 (patch) | |
tree | 932a993202f0c165cdd38c30f31b4844ddd11e56 /chrome | |
parent | 8093382a5f49c50cdb6262329a30b14f3c241ee6 (diff) | |
download | chromium_src-e8e2ab171b90fbe71ca4fca5205cd25dc07dbfd0.zip chromium_src-e8e2ab171b90fbe71ca4fca5205cd25dc07dbfd0.tar.gz chromium_src-e8e2ab171b90fbe71ca4fca5205cd25dc07dbfd0.tar.bz2 |
Use ResourceBundle::BaseFont for GTK tooltips.
If no font is specified, the font used can differ from the base font. This
happens when we set the UI font manually using IDS_UI_FONT_FAMILY_CROS.
BUG=chromium-os:7737
TEST=manually tested on netbook and Linux
Review URL: http://codereview.chromium.org/6476023
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75719 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/browser_main.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/chrome/browser/browser_main.cc b/chrome/browser/browser_main.cc index 1cc9d36..577d58e 100644 --- a/chrome/browser/browser_main.cc +++ b/chrome/browser/browser_main.cc @@ -903,6 +903,17 @@ void MaybeChangeUIFont() { return; } gtk_util::SetGtkFont(font_name); + + // Override the font set for tooltips in the gtkrc file so tooltips use the + // IDS_UI_FONT_FAMILY_CROS font. + // TODO(falken): this is a hack: make adding locale-specific changes to GTK + // settings cleaner. See http://crosbug.com/12257 + std::string tooltip_style = + "style \"OverrideTooltipFontStyle\" = \"TooltipStyle\" {\n" + " font_name = \"" + font_name + "\"\n" + "}\n" + "widget \"gtk-tooltip*\" style \"OverrideTooltipFontStyle\"\n"; + gtk_rc_parse_string(tooltip_style.c_str()); } #endif |