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

Unified Diff: chrome/browser/ui/views/location_bar/suggested_text_view.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/ui/views/location_bar/suggested_text_view.cc
===================================================================
--- chrome/browser/ui/views/location_bar/suggested_text_view.cc (revision 104959)
+++ chrome/browser/ui/views/location_bar/suggested_text_view.cc (working copy)
@@ -14,6 +14,10 @@
SuggestedTextView::SuggestedTextView(AutocompleteEditModel* edit_model)
: edit_model_(edit_model),
bg_color_(0) {
+ SetHorizontalAlignment(views::Label::ALIGN_LEFT);
+ SetAutoColorReadabilityEnabled(false);
+ SetEnabledColor(LocationBarView::GetColor(ToolbarModel::NONE,
+ LocationBarView::DEEMPHASIZED_TEXT));
}
SuggestedTextView::~SuggestedTextView() {
@@ -32,8 +36,8 @@
// Reset the delegate so that we don't attempt to commit in AnimationEnded.
animation_->set_delegate(NULL);
animation_.reset(NULL);
- SetColor(LocationBarView::GetColor(ToolbarModel::NONE,
- LocationBarView::DEEMPHASIZED_TEXT));
+ SetEnabledColor(LocationBarView::GetColor(ToolbarModel::NONE,
+ LocationBarView::DEEMPHASIZED_TEXT));
SchedulePaint();
}
}
@@ -57,8 +61,7 @@
ToolbarModel::NONE, LocationBarView::DEEMPHASIZED_TEXT);
SkColor sel_fg_color = LocationBarView::GetColor(
ToolbarModel::NONE, LocationBarView::SELECTED_TEXT);
- SetColor(color_utils::AlphaBlend(
- sel_fg_color, fg_color,
+ SetEnabledColor(color_utils::AlphaBlend(sel_fg_color, fg_color,
ui::Tween::ValueBetween(animation->GetCurrentValue(), 0, 255)));
SchedulePaint();
« no previous file with comments | « chrome/browser/ui/views/location_bar/location_bar_view.cc ('k') | chrome/browser/ui/views/notifications/balloon_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698