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

Unified Diff: chrome/browser/ui/views/first_run_bubble.cc

Issue 8221027: Make views::Label and views::Link auto-color themselves to be readable over their background colo... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 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
« no previous file with comments | « chrome/browser/ui/views/find_bar_view.cc ('k') | chrome/browser/ui/views/first_run_search_engine_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/first_run_bubble.cc
===================================================================
--- chrome/browser/ui/views/first_run_bubble.cc (revision 104959)
+++ chrome/browser/ui/views/first_run_bubble.cc (working copy)
@@ -111,6 +111,7 @@
label1_ = new views::Label(l10n_util::GetStringUTF16(IDS_FR_BUBBLE_TITLE));
label1_->SetFont(font.DeriveFont(3, gfx::Font::BOLD));
+ label1_->SetBackgroundColor(Bubble::kBackgroundColor);
label1_->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
AddChildView(label1_);
@@ -119,6 +120,7 @@
label2_ = new views::Label(l10n_util::GetStringUTF16(IDS_FR_BUBBLE_SUBTEXT));
label2_->SetMultiLine(true);
label2_->SetFont(font);
+ label2_->SetBackgroundColor(Bubble::kBackgroundColor);
label2_->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
label2_->SizeToFit(ps.width() - kBubblePadding * 2);
AddChildView(label2_);
@@ -129,6 +131,7 @@
label3_ = new views::Label(question_str);
label3_->SetMultiLine(true);
label3_->SetFont(font);
+ label3_->SetBackgroundColor(Bubble::kBackgroundColor);
label3_->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
label3_->SizeToFit(ps.width() - kBubblePadding * 2);
AddChildView(label3_);
@@ -275,13 +278,15 @@
label1_ = new views::Label(
l10n_util::GetStringUTF16(IDS_FR_OEM_BUBBLE_TITLE_1));
label1_->SetFont(font.DeriveFont(3, gfx::Font::BOLD));
- label1_->SetColor(SK_ColorRED);
+ label1_->SetBackgroundColor(Bubble::kBackgroundColor);
+ label1_->SetEnabledColor(SK_ColorRED);
label1_->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
AddChildView(label1_);
label2_ = new views::Label(
l10n_util::GetStringUTF16(IDS_FR_OEM_BUBBLE_TITLE_2));
label2_->SetFont(font.DeriveFont(3, gfx::Font::BOLD));
+ label2_->SetBackgroundColor(Bubble::kBackgroundColor);
label2_->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
AddChildView(label2_);
@@ -291,6 +296,7 @@
l10n_util::GetStringUTF16(IDS_FR_OEM_BUBBLE_SUBTEXT));
label3_->SetMultiLine(true);
label3_->SetFont(font);
+ label3_->SetBackgroundColor(Bubble::kBackgroundColor);
label3_->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
label3_->SizeToFit(ps.width() - kOEMBubblePadding * 2);
AddChildView(label3_);
@@ -423,6 +429,7 @@
IDS_FR_SE_BUBBLE_TITLE,
GetDefaultSearchEngineName(profile_)));
label1_->SetFont(font.DeriveFont(3, gfx::Font::BOLD));
+ label1_->SetBackgroundColor(Bubble::kBackgroundColor);
label1_->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
AddChildView(label1_);
@@ -432,6 +439,7 @@
l10n_util::GetStringUTF16(IDS_FR_BUBBLE_SUBTEXT));
label2_->SetMultiLine(true);
label2_->SetFont(font);
+ label2_->SetBackgroundColor(Bubble::kBackgroundColor);
label2_->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
label2_->SizeToFit(ps.width() - kBubblePadding * 2);
AddChildView(label2_);
« no previous file with comments | « chrome/browser/ui/views/find_bar_view.cc ('k') | chrome/browser/ui/views/first_run_search_engine_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698