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

Unified Diff: chrome/browser/ui/views/sync/profile_signin_confirmation_dialog_views.cc

Issue 17756003: Colors in views::StyledLabel. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 7 years, 5 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/autofill/autofill_dialog_views.cc ('k') | ui/views/controls/link.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/sync/profile_signin_confirmation_dialog_views.cc
diff --git a/chrome/browser/ui/views/sync/profile_signin_confirmation_dialog_views.cc b/chrome/browser/ui/views/sync/profile_signin_confirmation_dialog_views.cc
index a5853678c41e556dc9e6a21c9ab492128af66689..e9183afe877f20fe83b447353495586040383651 100644
--- a/chrome/browser/ui/views/sync/profile_signin_confirmation_dialog_views.cc
+++ b/chrome/browser/ui/views/sync/profile_signin_confirmation_dialog_views.cc
@@ -153,6 +153,10 @@ void ProfileSigninConfirmationDialogViews::ViewHierarchyChanged(
if (!details.is_add || details.child != this)
return;
+ const SkColor kPromptBarBackgroundColor =
+ ui::GetSigninConfirmationPromptBarColor(
+ ui::kSigninConfirmationPromptBarBackgroundAlpha);
+
// Create the prompt label.
size_t offset;
const string16 domain = ASCIIToUTF16(gaia::ExtractDomainName(username_));
@@ -162,6 +166,8 @@ void ProfileSigninConfirmationDialogViews::ViewHierarchyChanged(
IDS_ENTERPRISE_SIGNIN_ALERT_NEW_STYLE,
domain, &offset);
views::StyledLabel* prompt_label = new views::StyledLabel(prompt_text, this);
+ prompt_label->SetDisplayedOnBackgroundColor(kPromptBarBackgroundColor);
+
views::StyledLabel::RangeStyleInfo bold_style;
bold_style.font_style = gfx::Font::BOLD;
prompt_label->AddStyleRange(
@@ -174,11 +180,8 @@ void ProfileSigninConfirmationDialogViews::ViewHierarchyChanged(
1, 0, 1, 0,
ui::GetSigninConfirmationPromptBarColor(
ui::kSigninConfirmationPromptBarBorderAlpha)));
- // TODO(dconnelly): set the background color on the label (crbug.com/244630)
- prompt_bar->set_background(
- views::Background::CreateSolidBackground(
- ui::GetSigninConfirmationPromptBarColor(
- ui::kSigninConfirmationPromptBarBackgroundAlpha)));
+ prompt_bar->set_background(views::Background::CreateSolidBackground(
+ kPromptBarBackgroundColor));
// Create the explanation label.
std::vector<size_t> offsets;
« no previous file with comments | « chrome/browser/ui/views/autofill/autofill_dialog_views.cc ('k') | ui/views/controls/link.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698