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

Unified Diff: ui/views/controls/button/label_button.cc

Issue 13639003: Make LabelButton STYLE_NATIVE_TEXTBUTTON focusable; etc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comment. Created 7 years, 9 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 | « no previous file | ui/views/focus/focus_manager_unittest_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/button/label_button.cc
diff --git a/ui/views/controls/button/label_button.cc b/ui/views/controls/button/label_button.cc
index 6ca6a98194017f3476d310474ed5df20cbee658a..da9c0448580200bc1b496e1a6c53c45807c1114e 100644
--- a/ui/views/controls/button/label_button.cc
+++ b/ui/views/controls/button/label_button.cc
@@ -123,8 +123,10 @@ void LabelButton::SetStyle(ButtonStyle style) {
// Inset the button focus rect from the actual border; roughly match Windows.
if (style == STYLE_TEXTBUTTON || style == STYLE_NATIVE_TEXTBUTTON)
set_focus_border(FocusBorder::CreateDashedFocusBorder(3, 3, 3, 3));
- if (style == STYLE_BUTTON || style_ == STYLE_NATIVE_TEXTBUTTON)
+ if (style == STYLE_BUTTON || style == STYLE_NATIVE_TEXTBUTTON)
label_->SetHorizontalAlignment(gfx::ALIGN_CENTER);
+ if (style == STYLE_NATIVE_TEXTBUTTON)
+ set_focusable(true);
if (style == STYLE_BUTTON) {
set_min_size(gfx::Size(70, 31));
const SkColor color = GetNativeTheme()->GetSystemColor(
« no previous file with comments | « no previous file | ui/views/focus/focus_manager_unittest_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698