Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4416)

Unified Diff: chrome/browser/ui/views/ime/ime_warning_bubble_view.cc

Issue 2734113006: "Bootstrap" a toolkit-views Typography spec. (Closed)
Patch Set: fix windows Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/ime/ime_warning_bubble_view.cc
diff --git a/chrome/browser/ui/views/ime/ime_warning_bubble_view.cc b/chrome/browser/ui/views/ime/ime_warning_bubble_view.cc
index 5752d89933d37bfdc31eb7d6e821f6165476ab84..81c49fb3e99baf692ea1635c44ae43a5343e9759 100644
--- a/chrome/browser/ui/views/ime/ime_warning_bubble_view.cc
+++ b/chrome/browser/ui/views/ime/ime_warning_bubble_view.cc
@@ -28,9 +28,9 @@ namespace {
// The column width of the warning bubble.
const int kColumnWidth = 285;
-views::Label* CreateLabel(const base::string16& text,
- const gfx::FontList& font) {
- views::Label* label = new views::Label(text, font);
+views::Label* CreateExtensionNameLabel(const base::string16& text) {
+ views::Label* label =
+ new views::Label(text, views::TextContext::DIALOG_TEXT_SMALL);
label->SetMultiLine(true);
label->SetHorizontalAlignment(gfx::ALIGN_LEFT);
return label;
@@ -172,13 +172,11 @@ void ImeWarningBubbleView::InitLayout() {
main_cs->AddColumn(views::GridLayout::LEADING, views::GridLayout::LEADING, 0,
views::GridLayout::FIXED, kColumnWidth, 0);
- ResourceBundle& rb = ResourceBundle::GetSharedInstance();
layout->StartRow(0, cs_id);
base::string16 extension_name = base::UTF8ToUTF16(extension_->name());
base::i18n::AdjustStringForLocaleDirection(&extension_name);
- views::Label* warning = CreateLabel(
- l10n_util::GetStringFUTF16(IDS_IME_API_ACTIVATED_WARNING, extension_name),
- rb.GetFontList(ResourceBundle::BaseFont));
+ views::Label* warning = CreateExtensionNameLabel(l10n_util::GetStringFUTF16(
+ IDS_IME_API_ACTIVATED_WARNING, extension_name));
layout->AddView(warning);
layout->AddPaddingRow(0, views::kRelatedControlVerticalSpacing);

Powered by Google App Engine
This is Rietveld 408576698