Index: chrome/browser/ui/views/sad_tab_view.cc |
diff --git a/chrome/browser/ui/views/sad_tab_view.cc b/chrome/browser/ui/views/sad_tab_view.cc |
index aeaa218893a6848b3db6169c8d8573266c9e9ed4..926d73a73fdcf2ec742a6bb48a4d64a54a7880ce 100644 |
--- a/chrome/browser/ui/views/sad_tab_view.cc |
+++ b/chrome/browser/ui/views/sad_tab_view.cc |
@@ -36,8 +36,10 @@ |
SadTabView::SadTabView(content::WebContents* web_contents, |
chrome::SadTabKind kind) |
: SadTab(web_contents, kind) { |
- set_background(views::Background::CreateThemedSolidBackground( |
- this, ui::NativeTheme::kColorId_DialogBackground)); |
+ // Set the background color. |
+ set_background( |
+ views::Background::CreateSolidBackground(GetNativeTheme()->GetSystemColor( |
+ ui::NativeTheme::kColorId_DialogBackground))); |
views::GridLayout* layout = new views::GridLayout(this); |
SetLayoutManager(layout); |
@@ -59,7 +61,7 @@ |
layout->StartRow(0, column_set_id); |
layout->AddView(image, 2, 1); |
- title_ = new views::Label(l10n_util::GetStringUTF16(GetTitle())); |
+ title_ = CreateLabel(l10n_util::GetStringUTF16(GetTitle())); |
ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); |
title_->SetFontList(rb.GetFontList(ui::ResourceBundle::LargeFont)); |
title_->SetMultiLine(true); |
@@ -68,10 +70,13 @@ |
views::kPanelVerticalSpacing); |
layout->AddView(title_, 2, 1); |
- message_ = new views::Label(l10n_util::GetStringUTF16(GetMessage())); |
+ const SkColor text_color = GetNativeTheme()->GetSystemColor( |
+ ui::NativeTheme::kColorId_LabelDisabledColor); |
+ |
+ message_ = CreateLabel(l10n_util::GetStringUTF16(GetMessage())); |
message_->SetMultiLine(true); |
- message_->SetEnabled(false); |
+ message_->SetEnabledColor(text_color); |
message_->SetHorizontalAlignment(gfx::ALIGN_LEFT); |
message_->SetLineHeight(views::kPanelSubVerticalSpacing); |
@@ -81,8 +86,8 @@ |
action_button_ = views::MdTextButton::CreateSecondaryUiBlueButton( |
this, l10n_util::GetStringUTF16(GetButtonTitle())); |
- help_link_ = new views::Link(l10n_util::GetStringUTF16(GetHelpLinkTitle())); |
- help_link_->set_listener(this); |
+ help_link_ = |
+ CreateLink(l10n_util::GetStringUTF16(GetHelpLinkTitle()), text_color); |
layout->StartRowWithPadding(0, column_set_id, 0, |
views::kPanelVerticalSpacing); |
layout->AddView(help_link_, 1, 1, views::GridLayout::LEADING, |
@@ -145,6 +150,21 @@ |
View::OnPaint(canvas); |
} |
+views::Label* SadTabView::CreateLabel(const base::string16& text) { |
+ views::Label* label = new views::Label(text); |
+ label->SetBackgroundColor(background()->get_color()); |
+ return label; |
+} |
+ |
+views::Link* SadTabView::CreateLink(const base::string16& text, |
+ const SkColor& color) { |
+ views::Link* link = new views::Link(text); |
+ link->SetBackgroundColor(background()->get_color()); |
+ link->SetEnabledColor(color); |
+ link->set_listener(this); |
+ return link; |
+} |
+ |
namespace chrome { |
SadTab* SadTab::Create(content::WebContents* web_contents, |