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

Unified Diff: ash/common/system/user/rounded_image_view.cc

Issue 2498293003: CrOS md user row adjustments (Closed)
Patch Set: is_active_user() Created 4 years, 1 month 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/user/rounded_image_view.h ('k') | ash/common/system/user/tray_user_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/system/user/rounded_image_view.cc
diff --git a/ash/common/system/user/rounded_image_view.cc b/ash/common/system/user/rounded_image_view.cc
index a13931984e4422bad9ab2066b3f48490aba1dd05..b6fa23ccd17256035f00dba89b6b818a5ec4f9f0 100644
--- a/ash/common/system/user/rounded_image_view.cc
+++ b/ash/common/system/user/rounded_image_view.cc
@@ -3,6 +3,8 @@
// found in the LICENSE file.
#include "ash/common/system/user/rounded_image_view.h"
+
+#include "ash/common/material_design/material_design_controller.h"
#include "skia/ext/image_operations.h"
#include "third_party/skia/include/core/SkPaint.h"
#include "third_party/skia/include/core/SkPath.h"
@@ -64,8 +66,10 @@ void RoundedImageView::OnPaint(gfx::Canvas* canvas) {
path.addRoundRect(gfx::RectToSkRect(image_bounds), kRadius);
SkPaint paint;
paint.setAntiAlias(true);
- paint.setBlendMode(active_user_ ? SkBlendMode::kSrcOver
- : SkBlendMode::kLuminosity);
+ const bool grayscale =
+ !active_user_ && !MaterialDesignController::IsSystemTrayMenuMaterial();
+ paint.setBlendMode(grayscale ? SkBlendMode::kLuminosity
+ : SkBlendMode::kSrcOver);
canvas->DrawImageInPath(resized_, image_bounds.x(), image_bounds.y(), path,
paint);
}
« no previous file with comments | « ash/common/system/user/rounded_image_view.h ('k') | ash/common/system/user/tray_user_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698