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

Unified Diff: views/controls/button/text_button.cc

Issue 8439015: Make infobar controls focusable by default. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 2 months 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 | « views/controls/button/text_button.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/controls/button/text_button.cc
===================================================================
--- views/controls/button/text_button.cc (revision 107928)
+++ views/controls/button/text_button.cc (working copy)
@@ -744,6 +744,14 @@
return kViewClassName;
}
+void TextButton::OnPaintFocusBorder(gfx::Canvas* canvas) {
+ if ((IsFocusable() || IsAccessibilityFocusableInRootView()) && HasFocus()) {
+ gfx::Rect rect(GetLocalBounds());
+ rect.Inset(3, 3);
Peter Kasting 2011/11/01 21:46:04 Please, no context-free magic numbers.
dmazzoni 2011/11/01 21:49:07 Updated to use a constant instead.
+ canvas->DrawFocusRect(rect);
+ }
+}
+
gfx::NativeTheme::Part TextButton::GetThemePart() const {
return gfx::NativeTheme::kPushButton;
}
« no previous file with comments | « views/controls/button/text_button.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698