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

Unified Diff: ui/views/controls/textfield/textfield.cc

Issue 341713002: Remove Label::PaintText overrides. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync and rebase. Created 6 years, 6 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 | « ui/views/controls/label_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/textfield/textfield.cc
diff --git a/ui/views/controls/textfield/textfield.cc b/ui/views/controls/textfield/textfield.cc
index 2dd6fb43b0d5436ee563cf0fd2485a8bdbcbfeb4..a1759901e6b01629360e529a462a91244c9503d2 100644
--- a/ui/views/controls/textfield/textfield.cc
+++ b/ui/views/controls/textfield/textfield.cc
@@ -992,8 +992,8 @@ void Textfield::WriteDragDataForView(View* sender,
const base::string16& selected_text(GetSelectedText());
data->SetString(selected_text);
Label label(selected_text, GetFontList());
- const SkColor background = GetBackgroundColor();
- label.SetBackgroundColor(SkColorSetA(background, SK_AlphaTRANSPARENT));
+ label.SetBackgroundColor(GetBackgroundColor());
+ label.set_subpixel_rendering_enabled(false);
gfx::Size size(label.GetPreferredSize());
gfx::NativeView native_view = GetWidget()->GetNativeView();
gfx::Display display = gfx::Screen::GetScreenFor(native_view)->
@@ -1005,7 +1005,7 @@ void Textfield::WriteDragDataForView(View* sender,
label.SetEnabledColor(GetTextColor());
#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
// Desktop Linux Aura does not yet support transparency in drag images.
- canvas->DrawColor(background);
+ canvas->DrawColor(GetBackgroundColor());
#endif
label.Paint(canvas.get(), views::CullSet());
const gfx::Vector2d kOffset(-15, 0);
« no previous file with comments | « ui/views/controls/label_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698