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

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

Issue 2569773002: Fix SysTray focus rect position (Closed)
Patch Set: Created 4 years 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 | « no previous file | 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_background_view.cc
diff --git a/ash/common/system/tray/tray_background_view.cc b/ash/common/system/tray/tray_background_view.cc
index 0b4f6bc96e661ad17a63dea2744b13678e74eb54..ba74af583f3e39f6f8c8048be9a2b58d3a192fbd 100644
--- a/ash/common/system/tray/tray_background_view.cc
+++ b/ash/common/system/tray/tray_background_view.cc
@@ -584,7 +584,10 @@ gfx::Rect TrayBackgroundView::GetFocusBounds() {
void TrayBackgroundView::OnPaintFocus(gfx::Canvas* canvas) {
gfx::RectF paint_bounds(GetFocusBounds());
- paint_bounds.Inset(gfx::Insets(2, -2));
+ if (MaterialDesignController::IsShelfMaterial())
+ paint_bounds.Inset(gfx::Insets(-2, 2, -2, 3));
Evan Stade 2016/12/12 23:47:50 ick at these magic numbers. Where do they come fro
Greg Levin 2016/12/13 17:08:07 Agree with ick. That said, I'm not sure about the
tdanderson 2016/12/13 23:17:09 Leaving the non-md change in here is fine by me. N
Evan Stade 2016/12/14 00:48:16 I'm not really ok with these magic numbers though,
Greg Levin 2016/12/15 17:30:56 I don't know the details of the code, but the way
+ else
+ paint_bounds.Inset(gfx::Insets(1, 1));
canvas->DrawSolidFocusRect(paint_bounds, kFocusBorderColor,
kFocusBorderThickness);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698