Index: chrome/browser/chromeos/ui/accessibility_focus_ring_layer.cc |
diff --git a/chrome/browser/chromeos/ui/accessibility_focus_ring_layer.cc b/chrome/browser/chromeos/ui/accessibility_focus_ring_layer.cc |
index b5436bd0ab59431804d0fd79ed3d911b1726df1e..60fb5d8f524455adbe9aa911da4c615c87ad96c5 100644 |
--- a/chrome/browser/chromeos/ui/accessibility_focus_ring_layer.cc |
+++ b/chrome/browser/chromeos/ui/accessibility_focus_ring_layer.cc |
@@ -16,7 +16,7 @@ namespace chromeos { |
namespace { |
// The number of pixels in the color gradient that fades to transparent. |
-const int kGradientWidth = 10; |
+const int kGradientWidth = 6; |
// The color of the focus ring. In the future this might be a parameter. |
const int kFocusRingColorRed = 247; |
@@ -118,10 +118,11 @@ void AccessibilityFocusRingLayer::OnPaintLayer(gfx::Canvas* canvas) { |
paint.setStrokeWidth(2); |
SkPath path; |
- for (int i = 0; i < kGradientWidth; i++) { |
+ int w = kGradientWidth; |
xiyuan
2014/09/24 19:40:35
nit: const int w
dmazzoni
2014/09/24 21:40:56
Done.
|
+ for (int i = 0; i < w; i++) { |
xiyuan
2014/09/24 19:40:35
nit: ++i
dmazzoni
2014/09/24 21:40:57
Done.
|
paint.setColor( |
SkColorSetARGBMacro( |
- 255 - (255 * i / kGradientWidth), |
+ 255 * (w - i) * (w - i) / (w * w), |
kFocusRingColorRed, kFocusRingColorGreen, kFocusRingColorBlue)); |
path = MakePath(ring_, i, offset); |
canvas->DrawPath(path, paint); |