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

Unified Diff: chrome/browser/ui/views/profiles/profile_chooser_view.cc

Issue 2910153002: Remove views::Label::SetDisabledColor(). Replace with typography colors. (Closed)
Patch Set: rebase for r476345 Created 3 years, 7 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/profiles/profile_chooser_view.cc
diff --git a/chrome/browser/ui/views/profiles/profile_chooser_view.cc b/chrome/browser/ui/views/profiles/profile_chooser_view.cc
index e7535c427a7e64acecb5a002f9a28dca7c355654..119348d87f9d940d202a9d3bb86b0e9836e157a5 100644
--- a/chrome/browser/ui/views/profiles/profile_chooser_view.cc
+++ b/chrome/browser/ui/views/profiles/profile_chooser_view.cc
@@ -244,6 +244,9 @@ class BackgroundColorHoverButton : public views::LabelButton {
}
void UpdateColors() {
+ // TODO(tapted): This should use views::style::GetColor() to obtain grey
+ // text where it's needed. But note |subtitle_| is used to draw an email,
+ // which might not be grey in Harmony.
bool is_selected = HasFocus();
set_background(
@@ -261,8 +264,7 @@ class BackgroundColorHoverButton : public views::LabelButton {
title_->SetEnabledColor(text_color);
if (subtitle_) {
- DCHECK(!subtitle_->enabled());
- subtitle_->SetDisabledColor(GetNativeTheme()->GetSystemColor(
+ subtitle_->SetEnabledColor(GetNativeTheme()->GetSystemColor(
is_selected
? ui::NativeTheme::kColorId_DisabledMenuItemForegroundColor
: ui::NativeTheme::kColorId_LabelDisabledColor));
@@ -1171,7 +1173,6 @@ views::View* ProfileChooserView::CreateCurrentProfileView(
current_profile_card->set_subtitle(email_label);
email_label->SetAutoColorReadabilityEnabled(false);
email_label->SetElideBehavior(gfx::ELIDE_EMAIL);
- email_label->SetEnabled(false);
email_label->SetHorizontalAlignment(gfx::ALIGN_LEFT);
grid_layout->StartRow(1, 0);
// Skip first column for the profile icon.

Powered by Google App Engine
This is Rietveld 408576698