| Index: ui/message_center/views/notification_view.cc
|
| diff --git a/ui/message_center/views/notification_view.cc b/ui/message_center/views/notification_view.cc
|
| index f4a0572414d4d1e489d8cd67def9d2b967e62122..9736e668272af02a0d54151cbecd6fe45f9b3f32 100644
|
| --- a/ui/message_center/views/notification_view.cc
|
| +++ b/ui/message_center/views/notification_view.cc
|
| @@ -224,6 +224,7 @@ class NotificationButton : public views::CustomButton {
|
| // Overridden from views::View:
|
| virtual gfx::Size GetPreferredSize() OVERRIDE;
|
| virtual int GetHeightForWidth(int width) OVERRIDE;
|
| + virtual void OnFocus() OVERRIDE;
|
|
|
| // Overridden from views::CustomButton:
|
| virtual void StateChanged() OVERRIDE;
|
| @@ -288,6 +289,10 @@ int NotificationButton::GetHeightForWidth(int width) {
|
| return kButtonHeight;
|
| }
|
|
|
| +void NotificationButton::OnFocus() {
|
| + ScrollRectToVisible(GetLocalBounds());
|
| +}
|
| +
|
| void NotificationButton::StateChanged() {
|
| if (state() == STATE_HOVERED || state() == STATE_PRESSED)
|
| set_background(MakeBackground(kHoveredButtonBackgroundColor));
|
| @@ -498,6 +503,12 @@ void NotificationView::Layout() {
|
| }
|
| }
|
|
|
| +void NotificationView::ScrollRectToVisible(const gfx::Rect& rect) {
|
| + // Notification want to show the whole notification when a part of it (like
|
| + // a button) gets focused.
|
| + views::View::ScrollRectToVisible(GetLocalBounds());
|
| +}
|
| +
|
| void NotificationView::ButtonPressed(views::Button* sender,
|
| const ui::Event& event) {
|
| // See if the button pressed was an action button.
|
|
|