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

Unified Diff: chrome/browser/chromeos/frame/panel_controller.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
Index: chrome/browser/chromeos/frame/panel_controller.cc
===================================================================
--- chrome/browser/chromeos/frame/panel_controller.cc (revision 104959)
+++ chrome/browser/chromeos/frame/panel_controller.cc (working copy)
@@ -238,11 +238,9 @@
urgent_ = urgent;
if (title_window_) {
gtk_window_set_urgency_hint(panel_, urgent ? TRUE : FALSE);
+ title_content_->title_label()->SetDisabledColor(urgent ?
+ kTitleUrgentTextColor : kTitleInactiveTextColor);
title_content_->SchedulePaint();
- if (urgent)
- title_content_->title_label()->SetColor(kTitleUrgentTextColor);
- else
- title_content_->title_label()->SetColor(kTitleInactiveTextColor);
}
}
@@ -441,6 +439,10 @@
AddChildView(title_icon_);
title_label_ = new views::Label(string16());
title_label_->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
+ title_label_->SetAutoColorReadabilityEnabled(false);
+ title_label_->SetEnabledColor(kTitleActiveTextColor);
+ title_label_->SetDisabledColor(kTitleInactiveTextColor);
+ title_label_->SetEnabled(false);
AddChildView(title_label_);
set_background(
@@ -490,14 +492,14 @@
}
void PanelController::TitleContentView::OnFocusIn() {
- title_label_->SetColor(kTitleActiveTextColor);
+ title_label_->SetEnabled(true);
title_label_->SetFont(*active_font);
Layout();
SchedulePaint();
}
void PanelController::TitleContentView::OnFocusOut() {
- title_label_->SetColor(kTitleInactiveTextColor);
+ title_label_->SetEnabled(false);
title_label_->SetFont(*inactive_font);
Layout();
SchedulePaint();
« no previous file with comments | « chrome/browser/chromeos/drop_shadow_label.cc ('k') | chrome/browser/chromeos/input_method/candidate_window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698