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

Side by Side Diff: ash/system/toast/toast_overlay.cc

Issue 2070143003: Add MD ink drop ripple to app list button (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@b612539_shelf_button_ripple
Patch Set: Addressed review comments Created 4 years, 5 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "ash/system/toast/toast_overlay.h" 5 #include "ash/system/toast/toast_overlay.h"
6 6
7 #include "ash/common/shell_window_ids.h" 7 #include "ash/common/shell_window_ids.h"
8 #include "ash/screen_util.h" 8 #include "ash/screen_util.h"
9 #include "ash/shelf/shelf.h" 9 #include "ash/shelf/shelf.h"
10 #include "ash/shelf/shelf_layout_manager.h" 10 #include "ash/shelf/shelf_layout_manager.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 95
96 private: 96 private:
97 friend class ToastOverlay; // for ToastOverlay::ClickDismissButtonForTesting. 97 friend class ToastOverlay; // for ToastOverlay::ClickDismissButtonForTesting.
98 98
99 DISALLOW_COPY_AND_ASSIGN(ToastOverlayButton); 99 DISALLOW_COPY_AND_ASSIGN(ToastOverlayButton);
100 }; 100 };
101 101
102 ToastOverlayButton::ToastOverlayButton(views::ButtonListener* listener, 102 ToastOverlayButton::ToastOverlayButton(views::ButtonListener* listener,
103 const base::string16& text) 103 const base::string16& text)
104 : views::LabelButton(listener, text) { 104 : views::LabelButton(listener, text) {
105 SetHasInkDrop(true); 105 SetHasInkDrop(INK_DROP_WITH_GESTURE_HANDLING);
106 set_has_ink_drop_action_on_click(true); 106 set_has_ink_drop_action_on_click(true);
107 set_ink_drop_base_color(SK_ColorWHITE); 107 set_ink_drop_base_color(SK_ColorWHITE);
108 108
109 ui::ResourceBundle* rb = &ui::ResourceBundle::GetSharedInstance(); 109 ui::ResourceBundle* rb = &ui::ResourceBundle::GetSharedInstance();
110 110
111 SetEnabledTextColors(kButtonTextColor); 111 SetEnabledTextColors(kButtonTextColor);
112 SetFontList(rb->GetFontList(kTextFontStyle)); 112 SetFontList(rb->GetFontList(kTextFontStyle));
113 113
114 // Treat the space below the baseline as a margin. 114 // Treat the space below the baseline as a margin.
115 int verticalSpacing = kToastVerticalSpacing - 115 int verticalSpacing = kToastVerticalSpacing -
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 277
278 views::Widget* ToastOverlay::widget_for_testing() { 278 views::Widget* ToastOverlay::widget_for_testing() {
279 return overlay_widget_.get(); 279 return overlay_widget_.get();
280 } 280 }
281 281
282 void ToastOverlay::ClickDismissButtonForTesting(const ui::Event& event) { 282 void ToastOverlay::ClickDismissButtonForTesting(const ui::Event& event) {
283 overlay_view_->button()->NotifyClick(event); 283 overlay_view_->button()->NotifyClick(event);
284 } 284 }
285 285
286 } // namespace ash 286 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698