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

Side by Side Diff: ui/message_center/views/notification_button.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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/message_center/views/notification_button.h" 5 #include "ui/message_center/views/notification_button.h"
6 6
7 #include "ui/gfx/canvas.h" 7 #include "ui/gfx/canvas.h"
8 #include "ui/message_center/message_center_style.h" 8 #include "ui/message_center/message_center_style.h"
9 #include "ui/message_center/views/constants.h" 9 #include "ui/message_center/views/constants.h"
10 #include "ui/views/background.h" 10 #include "ui/views/background.h"
(...skipping 10 matching lines...) Expand all
21 icon_(NULL), 21 icon_(NULL),
22 title_(NULL), 22 title_(NULL),
23 focus_painter_(views::Painter::CreateSolidFocusPainter( 23 focus_painter_(views::Painter::CreateSolidFocusPainter(
24 message_center::kFocusBorderColor, 24 message_center::kFocusBorderColor,
25 gfx::Insets(1, 2, 2, 2))) { 25 gfx::Insets(1, 2, 2, 2))) {
26 Button::ConfigureDefaultFocus(this); 26 Button::ConfigureDefaultFocus(this);
27 // Create a background so that it does not change when the MessageView 27 // Create a background so that it does not change when the MessageView
28 // background changes to show touch feedback 28 // background changes to show touch feedback
29 set_background(views::Background::CreateSolidBackground( 29 set_background(views::Background::CreateSolidBackground(
30 kNotificationBackgroundColor)); 30 kNotificationBackgroundColor));
31 set_request_focus_on_press(false);
32 set_notify_enter_exit_on_child(true); 31 set_notify_enter_exit_on_child(true);
33 SetLayoutManager( 32 SetLayoutManager(
34 new views::BoxLayout(views::BoxLayout::kHorizontal, 33 new views::BoxLayout(views::BoxLayout::kHorizontal,
35 message_center::kButtonHorizontalPadding, 34 message_center::kButtonHorizontalPadding,
36 kButtonVecticalPadding, 35 kButtonVecticalPadding,
37 message_center::kButtonIconToTitlePadding)); 36 message_center::kButtonIconToTitlePadding));
38 } 37 }
39 38
40 NotificationButton::~NotificationButton() { 39 NotificationButton::~NotificationButton() {
41 } 40 }
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 if (state() == STATE_HOVERED || state() == STATE_PRESSED) { 113 if (state() == STATE_HOVERED || state() == STATE_PRESSED) {
115 set_background(views::Background::CreateSolidBackground( 114 set_background(views::Background::CreateSolidBackground(
116 message_center::kHoveredButtonBackgroundColor)); 115 message_center::kHoveredButtonBackgroundColor));
117 } else { 116 } else {
118 set_background(views::Background::CreateSolidBackground( 117 set_background(views::Background::CreateSolidBackground(
119 kNotificationBackgroundColor)); 118 kNotificationBackgroundColor));
120 } 119 }
121 } 120 }
122 121
123 } // namespace message_center 122 } // namespace message_center
OLDNEW
« no previous file with comments | « ui/message_center/views/message_center_button_bar.cc ('k') | ui/message_center/views/notifier_settings_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698