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

Side by Side Diff: ui/views/controls/button/md_text_button.cc

Issue 1690543004: MacViews: Implement Full Keyboard Access. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address review comments. Make patch smaller temporarily. Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/views/controls/button/md_text_button.h" 5 #include "ui/views/controls/button/md_text_button.h"
6 6
7 #include "base/i18n/case_conversion.h" 7 #include "base/i18n/case_conversion.h"
8 #include "ui/base/material_design/material_design_controller.h" 8 #include "ui/base/material_design/material_design_controller.h"
9 #include "ui/gfx/color_utils.h" 9 #include "ui/gfx/color_utils.h"
10 #include "ui/native_theme/native_theme.h" 10 #include "ui/native_theme/native_theme.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 void MdTextButton::SetText(const base::string16& text) { 50 void MdTextButton::SetText(const base::string16& text) {
51 LabelButton::SetText(base::i18n::ToUpper(text)); 51 LabelButton::SetText(base::i18n::ToUpper(text));
52 } 52 }
53 53
54 MdTextButton::MdTextButton(ButtonListener* listener) 54 MdTextButton::MdTextButton(ButtonListener* listener)
55 : LabelButton(listener, base::string16()), 55 : LabelButton(listener, base::string16()),
56 ink_drop_delegate_(this, this) { 56 ink_drop_delegate_(this, this) {
57 set_ink_drop_delegate(&ink_drop_delegate_); 57 set_ink_drop_delegate(&ink_drop_delegate_);
58 set_has_ink_drop_action_on_click(true); 58 set_has_ink_drop_action_on_click(true);
59 SetHorizontalAlignment(gfx::ALIGN_CENTER); 59 SetHorizontalAlignment(gfx::ALIGN_CENTER);
60 SetFocusable(true); 60 SetFocusBehavior(CONTROL);
61 // TODO(estade): create a focus painter. 61 // TODO(estade): create a focus painter.
62 SetFocusPainter(nullptr); 62 SetFocusPainter(nullptr);
63 SetMinSize(gfx::Size(kMinWidth, 0)); 63 SetMinSize(gfx::Size(kMinWidth, 0));
64 } 64 }
65 65
66 MdTextButton::~MdTextButton() {} 66 MdTextButton::~MdTextButton() {}
67 67
68 } // namespace views 68 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698