diff options
author | rhashimoto@chromium.org <rhashimoto@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-17 00:03:47 +0000 |
---|---|---|
committer | rhashimoto@chromium.org <rhashimoto@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-17 00:03:47 +0000 |
commit | ebb1b5894a55befe47b40648762491ad0d4c0b9d (patch) | |
tree | c1fca358720754953335457c5221154a7ab3d962 /ui/base | |
parent | 92443f9adddaa4aa27ffa1db2d6a6b48d115c8f8 (diff) | |
download | chromium_src-ebb1b5894a55befe47b40648762491ad0d4c0b9d.zip chromium_src-ebb1b5894a55befe47b40648762491ad0d4c0b9d.tar.gz chromium_src-ebb1b5894a55befe47b40648762491ad0d4c0b9d.tar.bz2 |
Use large bold font for associated network on touch.
The CrOS network menu shows the associated network in bold face and non-associated networks in regular face. The size of these fonts matches for non-touch builds but are different for touch builds.
BUG=none
TEST=on touch build, open network menu and check if all items are the same size
Review URL: http://codereview.chromium.org/7044121
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89427 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/base')
-rw-r--r-- | ui/base/resource/resource_bundle.cc | 7 | ||||
-rw-r--r-- | ui/base/resource/resource_bundle.h | 3 |
2 files changed, 10 insertions, 0 deletions
diff --git a/ui/base/resource/resource_bundle.cc b/ui/base/resource/resource_bundle.cc index e2646ab..848821c 100644 --- a/ui/base/resource/resource_bundle.cc +++ b/ui/base/resource/resource_bundle.cc @@ -177,6 +177,8 @@ const gfx::Font& ResourceBundle::GetFont(FontStyle style) { return *medium_bold_font_; case LargeFont: return *large_font_; + case LargeBoldFont: + return *large_bold_font_; default: return *base_font_; } @@ -223,6 +225,11 @@ void ResourceBundle::LoadFontsIfNecessary() { large_font_.reset(new gfx::Font()); *large_font_ = base_font_->DeriveFont(kLargeFontSizeDelta); + + large_bold_font_.reset(new gfx::Font()); + *large_bold_font_ = + base_font_->DeriveFont(kLargeFontSizeDelta, + base_font_->GetStyle() | gfx::Font::BOLD); } } diff --git a/ui/base/resource/resource_bundle.h b/ui/base/resource/resource_bundle.h index 00ab79d..8fc8866 100644 --- a/ui/base/resource/resource_bundle.h +++ b/ui/base/resource/resource_bundle.h @@ -69,6 +69,8 @@ class ResourceBundle { // NOTE: depending upon the locale, this may *not* result in a bold font. MediumBoldFont, LargeFont, + // NOTE: depending upon the locale, this may *not* result in a bold font. + LargeBoldFont, }; // Initialize the ResourceBundle for this process. Returns the language @@ -281,6 +283,7 @@ class ResourceBundle { scoped_ptr<gfx::Font> medium_font_; scoped_ptr<gfx::Font> medium_bold_font_; scoped_ptr<gfx::Font> large_font_; + scoped_ptr<gfx::Font> large_bold_font_; scoped_ptr<gfx::Font> web_font_; static ResourceBundle* g_shared_instance_; |