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

Side by Side Diff: ui/app_list/views/folder_header_view.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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/app_list/views/folder_header_view.h" 5 #include "ui/app_list/views/folder_header_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); 66 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
67 if (!app_list::switches::IsExperimentalAppListEnabled()) { 67 if (!app_list::switches::IsExperimentalAppListEnabled()) {
68 back_button_ = new views::ImageButton(this); 68 back_button_ = new views::ImageButton(this);
69 back_button_->SetImage( 69 back_button_->SetImage(
70 views::ImageButton::STATE_NORMAL, 70 views::ImageButton::STATE_NORMAL,
71 rb.GetImageSkiaNamed(IDR_APP_LIST_FOLDER_BACK_NORMAL)); 71 rb.GetImageSkiaNamed(IDR_APP_LIST_FOLDER_BACK_NORMAL));
72 back_button_->SetImageAlignment(views::ImageButton::ALIGN_CENTER, 72 back_button_->SetImageAlignment(views::ImageButton::ALIGN_CENTER,
73 views::ImageButton::ALIGN_MIDDLE); 73 views::ImageButton::ALIGN_MIDDLE);
74 AddChildView(back_button_); 74 AddChildView(back_button_);
75 views::Button::ConfigureDefaultFocus(back_button_); 75 views::Button::ConfigureDefaultFocus(back_button_);
76 back_button_->set_request_focus_on_press(true);
76 back_button_->SetAccessibleName( 77 back_button_->SetAccessibleName(
77 ui::ResourceBundle::GetSharedInstance().GetLocalizedString( 78 ui::ResourceBundle::GetSharedInstance().GetLocalizedString(
78 IDS_APP_LIST_FOLDER_CLOSE_FOLDER_ACCESSIBILE_NAME)); 79 IDS_APP_LIST_FOLDER_CLOSE_FOLDER_ACCESSIBILE_NAME));
79 } 80 }
80 81
81 folder_name_view_->SetFontList( 82 folder_name_view_->SetFontList(
82 rb.GetFontList(ui::ResourceBundle::MediumFont)); 83 rb.GetFontList(ui::ResourceBundle::MediumFont));
83 folder_name_view_->set_placeholder_text_color(kFolderTitleHintTextColor); 84 folder_name_view_->set_placeholder_text_color(kFolderTitleHintTextColor);
84 folder_name_view_->set_placeholder_text(folder_name_placeholder_text_); 85 folder_name_view_->set_placeholder_text(folder_name_placeholder_text_);
85 folder_name_view_->SetBorder(views::Border::NullBorder()); 86 folder_name_view_->SetBorder(views::Border::NullBorder());
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 void FolderHeaderView::ButtonPressed(views::Button* sender, 246 void FolderHeaderView::ButtonPressed(views::Button* sender,
246 const ui::Event& event) { 247 const ui::Event& event) {
247 delegate_->NavigateBack(folder_item_, event); 248 delegate_->NavigateBack(folder_item_, event);
248 } 249 }
249 250
250 void FolderHeaderView::ItemNameChanged() { 251 void FolderHeaderView::ItemNameChanged() {
251 Update(); 252 Update();
252 } 253 }
253 254
254 } // namespace app_list 255 } // namespace app_list
OLDNEW
« no previous file with comments | « ui/app_list/views/app_list_item_view.cc ('k') | ui/message_center/views/message_center_button_bar.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698