Chromium Code Reviews| 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..da43572d5c8d8ffe8d418f790278d67918e2b243 100644 |
| --- a/ui/base/native_theme/native_theme_base.cc |
| +++ b/ui/base/native_theme/native_theme_base.cc |
| @@ -487,9 +487,9 @@ void NativeThemeBase::PaintRadio(SkCanvas* canvas, |
| } |
| void NativeThemeBase::PaintButton(SkCanvas* canvas, |
| - State state, |
| - const gfx::Rect& rect, |
| - const ButtonExtraParams& button) const { |
| + State state, |
| + const gfx::Rect& rect, |
| + const ButtonExtraParams& button) const { |
| SkPaint paint; |
| const int kRight = rect.right(); |
| const int kBottom = rect.bottom(); |
| @@ -531,10 +531,14 @@ void NativeThemeBase::PaintButton(SkCanvas* canvas, |
| paint.setShader(NULL); |
| if (button.has_border) { |
| - const int kBorderAlpha = state == kHovered ? 0x80 : 0x55; |
| + int kBorderAlpha = state == kHovered ? 0x80 : 0x55; |
| + if (button.is_focused) { |
| + kBorderAlpha = 0xff; |
|
xiyuan
2012/06/05 17:12:53
nit: Change kBorderAlpha to border_alpha since thi
flackr
2012/06/05 18:20:03
Done.
|
| + 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); |
| } |