Chromium Code Reviews| Index: ui/views/controls/button/text_button.cc |
| diff --git a/ui/views/controls/button/text_button.cc b/ui/views/controls/button/text_button.cc |
| index 32f1b216eeb8ed325e0c91ee88fda6a872ffe9ef..fa01915564223903dbad7cfa3a6de4b05131de70 100644 |
| --- a/ui/views/controls/button/text_button.cc |
| +++ b/ui/views/controls/button/text_button.cc |
| @@ -469,6 +469,7 @@ void TextButtonBase::GetExtraParams( |
| params->button.checked = false; |
| params->button.indeterminate = false; |
| params->button.is_default = false; |
| + params->button.is_focused = false; |
| params->button.has_border = false; |
| params->button.classic_state = 0; |
| params->button.background_color = |
| @@ -850,7 +851,8 @@ void NativeTextButton::OnPaintFocusBorder(gfx::Canvas* canvas) { |
| canvas->DrawFocusRect(rect); |
| } |
| #else |
| - TextButton::OnPaintFocusBorder(canvas); |
| + // Paint nothing, focus will be indicated with a border highlight drawn by |
| + // NativeThemeBase::PaintButton. |
| #endif |
| } |
| @@ -858,6 +860,10 @@ void NativeTextButton::GetExtraParams( |
| ui::NativeTheme::ExtraParams* params) const { |
| TextButton::GetExtraParams(params); |
| params->button.has_border = true; |
| +#if !defined(OS_WIN) |
| + params->button.is_focused = HasFocus() && |
|
sky
2012/06/05 20:25:36
Add a comment as to why this is ifdef'd.
|
| + (focusable() || IsAccessibilityFocusable()); |
| +#endif |
| } |
| } // namespace views |