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

Unified Diff: ash/common/system/tray/tray_popup_utils.cc

Issue 2667963006: Apply subpixel rendering to labels in cros system menu. (Closed)
Patch Set: docs Created 3 years, 11 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 | « ash/common/system/chromeos/ime_menu/ime_list_view.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/system/tray/tray_popup_utils.cc
diff --git a/ash/common/system/tray/tray_popup_utils.cc b/ash/common/system/tray/tray_popup_utils.cc
index 608d5679547b067eda283d05e6a9bc762dcf7777..cc0632fb29a109e30616b54766e6a097f0c79581 100644
--- a/ash/common/system/tray/tray_popup_utils.cc
+++ b/ash/common/system/tray/tray_popup_utils.cc
@@ -221,15 +221,12 @@ views::Label* TrayPopupUtils::CreateDefaultLabel() {
label->SetHorizontalAlignment(gfx::ALIGN_LEFT);
label->SetBorder(
views::CreateEmptyBorder(0, 0, 0, kTrayPopupLabelRightPadding));
-
- // TODO(bruthig): Fix this so that |label| uses the kBackgroundColor to
- // perform subpixel rendering instead of disabling subpixel rendering.
- //
- // Text rendered on a non-opaque background looks ugly and it is possible for
- // labels to given a a clear canvas at paint time when an ink drop is visible.
- // See http://crbug.com/661714.
- label->SetSubpixelRenderingEnabled(false);
-
+ // Frequently the label will paint to a layer that's non-opaque, so subpixel
+ // rendering won't work unless we explicitly set a background. See
+ // crbug.com/686363
+ label->set_background(
+ views::Background::CreateSolidBackground(kBackgroundColor));
+ label->SetBackgroundColor(kBackgroundColor);
return label;
}
« no previous file with comments | « ash/common/system/chromeos/ime_menu/ime_list_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698