summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/chromeos/status/network_menu.cc12
-rw-r--r--chrome/browser/defaults.cc8
-rw-r--r--chrome/browser/defaults.h4
-rw-r--r--ui/base/resource/resource_bundle.cc7
-rw-r--r--ui/base/resource/resource_bundle.h3
5 files changed, 31 insertions, 3 deletions
diff --git a/chrome/browser/chromeos/status/network_menu.cc b/chrome/browser/chromeos/status/network_menu.cc
index 2987ab0..1eeec5d 100644
--- a/chrome/browser/chromeos/status/network_menu.cc
+++ b/chrome/browser/chromeos/status/network_menu.cc
@@ -14,6 +14,7 @@
#include "chrome/browser/chromeos/cros/cros_library.h"
#include "chrome/browser/chromeos/customization_document.h"
#include "chrome/browser/chromeos/sim_dialog_delegate.h"
+#include "chrome/browser/defaults.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_list.h"
#include "chrome/browser/ui/views/window.h"
@@ -430,9 +431,14 @@ string16 NetworkMenuModel::GetLabelAt(int index) const {
}
const gfx::Font* NetworkMenuModel::GetLabelFontAt(int index) const {
- return (menu_items_[index].flags & FLAG_ASSOCIATED) ?
- &ResourceBundle::GetSharedInstance().GetFont(ResourceBundle::BoldFont) :
- NULL;
+ const gfx::Font* font = NULL;
+ if (menu_items_[index].flags & FLAG_ASSOCIATED) {
+ ResourceBundle& resource_bundle = ResourceBundle::GetSharedInstance();
+ font = &resource_bundle.GetFont(
+ browser_defaults::kAssociatedNetworkFontStyle);
+ }
+
+ return font;
}
bool NetworkMenuModel::IsItemCheckedAt(int index) const {
diff --git a/chrome/browser/defaults.cc b/chrome/browser/defaults.cc
index 4c40480..1d86f8f 100644
--- a/chrome/browser/defaults.cc
+++ b/chrome/browser/defaults.cc
@@ -88,4 +88,12 @@ const int kBookmarkBarHeight = 28;
const int kNewtabBookmarkBarHeight = 57;
#endif
+#ifdef TOUCH_UI
+const ui::ResourceBundle::FontStyle kAssociatedNetworkFontStyle =
+ ui::ResourceBundle::LargeBoldFont;
+#else
+const ui::ResourceBundle::FontStyle kAssociatedNetworkFontStyle =
+ ui::ResourceBundle::BoldFont;
+#endif
+
} // namespace browser_defaults
diff --git a/chrome/browser/defaults.h b/chrome/browser/defaults.h
index 952d1ac..4aee909 100644
--- a/chrome/browser/defaults.h
+++ b/chrome/browser/defaults.h
@@ -10,6 +10,7 @@
#include "build/build_config.h"
#include "chrome/browser/prefs/session_startup_pref.h"
+#include "ui/base/resource/resource_bundle.h"
namespace browser_defaults {
@@ -87,6 +88,9 @@ extern bool enable_help_app;
extern const int kBookmarkBarHeight;
extern const int kNewtabBookmarkBarHeight;
+// ChromiumOS network menu font
+extern const ui::ResourceBundle::FontStyle kAssociatedNetworkFontStyle;
+
} // namespace browser_defaults
#endif // CHROME_BROWSER_DEFAULTS_H_
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_;