Index: ui/base/native_theme/native_theme_base.cc |
diff --git a/ui/base/native_theme/native_theme_base.cc b/ui/base/native_theme/native_theme_base.cc |
index a44c59e0aec60ba7e3178858863e4e1714a9cf6c..0d80718591a61d8c4f682b9c27e51d5308c0db8d 100644 |
--- a/ui/base/native_theme/native_theme_base.cc |
+++ b/ui/base/native_theme/native_theme_base.cc |
@@ -531,10 +531,13 @@ void NativeThemeBase::PaintButton(SkCanvas* canvas, |
paint.setShader(NULL); |
if (button.has_border) { |
- const int kBorderAlpha = state == kHovered ? 0x80 : 0x55; |
+ const int kBorderAlpha = button.is_focused ? 0xff : |
+ state == kHovered ? 0x80 : 0x55; |
tony
2012/06/04 19:20:45
Nit: Nested ternary operators are hard to read. C
flackr
2012/06/05 14:13:18
Done.
|
+ if (button.is_focused) |
+ paint.setColor(GetSystemColor(kColorId_FocusedBorderColor)); |
paint.setStyle(SkPaint::kStroke_Style); |
paint.setStrokeWidth(SkIntToScalar(1)); |
- paint.setARGB(kBorderAlpha, 0, 0, 0); |
+ paint.setAlpha(kBorderAlpha); |
skrect.inset(SkFloatToScalar(.5f), SkFloatToScalar(.5f)); |
canvas->drawRoundRect(skrect, SkIntToScalar(1), SkIntToScalar(1), paint); |
} |