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

Unified Diff: ui/views/examples/button_example.cc

Issue 1870573003: Full Keyboard Access: Second Approach (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 | « ui/views/controls/webview/webview.cc ('k') | ui/views/examples/tree_view_example.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/examples/button_example.cc
diff --git a/ui/views/examples/button_example.cc b/ui/views/examples/button_example.cc
index 2cf42afa9e3e5b4a0ae61595d380e0cfb46cea18..f48c8be36d3f632e07f4f5a877466b0f05652257 100644
--- a/ui/views/examples/button_example.cc
+++ b/ui/views/examples/button_example.cc
@@ -15,6 +15,7 @@
#include "ui/views/controls/button/md_text_button.h"
#include "ui/views/layout/box_layout.h"
#include "ui/views/resources/grit/views_resources.h"
+#include "ui/views/style/platform_style.h"
#include "ui/views/view.h"
using base::ASCIIToUTF16;
@@ -49,7 +50,7 @@ void ButtonExample::CreateExampleView(View* container) {
container->SetLayoutManager(layout);
label_button_ = new LabelButton(this, ASCIIToUTF16(kLabelButton));
- label_button_->SetFocusable(true);
+ PlatformStyle::ConfigureFocus(PlatformStyle::CONTROL::BUTTON, label_button_);
container->AddChildView(label_button_);
LabelButton* styled_button =
@@ -78,7 +79,7 @@ void ButtonExample::CreateExampleView(View* container) {
ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
image_button_ = new ImageButton(this);
- image_button_->SetFocusable(true);
+ PlatformStyle::ConfigureFocus(PlatformStyle::CONTROL::BUTTON, image_button_);
image_button_->SetImage(ImageButton::STATE_NORMAL,
rb.GetImageNamed(IDR_CLOSE).ToImageSkia());
image_button_->SetImage(ImageButton::STATE_HOVERED,
« no previous file with comments | « ui/views/controls/webview/webview.cc ('k') | ui/views/examples/tree_view_example.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698