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

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

Issue 1963563002: Views: Flip default value of CustomButton::request_focus_on_press_ to false. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 7 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/button/label_button.cc ('k') | ui/views/examples/tree_view_example.h » ('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 b8a8047486eca4c366d8545ced6073c3c642c7ab..fa13372a27ee90325912c743e886463ca6106065 100644
--- a/ui/views/examples/button_example.cc
+++ b/ui/views/examples/button_example.cc
@@ -45,6 +45,7 @@ void ButtonExample::CreateExampleView(View* container) {
label_button_ = new LabelButton(this, ASCIIToUTF16(kLabelButton));
Button::ConfigureDefaultFocus(label_button_);
+ label_button_->set_request_focus_on_press(true);
container->AddChildView(label_button_);
styled_button_ = new LabelButton(this, ASCIIToUTF16("Styled Button"));
@@ -72,6 +73,7 @@ void ButtonExample::CreateExampleView(View* container) {
ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
image_button_ = new ImageButton(this);
Button::ConfigureDefaultFocus(image_button_);
+ image_button_->set_request_focus_on_press(true);
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/button/label_button.cc ('k') | ui/views/examples/tree_view_example.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698