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

Side by Side Diff: chrome/browser/ui/views/toolbar/reload_button.cc

Issue 1724963002: Color the ink drop ripple and hover effects based on theming. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sky review Created 4 years, 10 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 "chrome/browser/ui/views/toolbar/reload_button.h" 5 #include "chrome/browser/ui/views/toolbar/reload_button.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
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 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 : gfx::VectorIconId::NAVIGATE_STOP; 237 : gfx::VectorIconId::NAVIGATE_STOP;
238 const int kButtonSize = 16; 238 const int kButtonSize = 16;
239 const SkColor normal_color = 239 const SkColor normal_color =
240 tp->GetColor(ThemeProperties::COLOR_TOOLBAR_BUTTON_ICON); 240 tp->GetColor(ThemeProperties::COLOR_TOOLBAR_BUTTON_ICON);
241 const SkColor disabled_color = 241 const SkColor disabled_color =
242 tp->GetColor(ThemeProperties::COLOR_TOOLBAR_BUTTON_ICON_INACTIVE); 242 tp->GetColor(ThemeProperties::COLOR_TOOLBAR_BUTTON_ICON_INACTIVE);
243 SetImage(views::Button::STATE_NORMAL, 243 SetImage(views::Button::STATE_NORMAL,
244 gfx::CreateVectorIcon(icon_id, kButtonSize, normal_color)); 244 gfx::CreateVectorIcon(icon_id, kButtonSize, normal_color));
245 SetImage(views::Button::STATE_DISABLED, 245 SetImage(views::Button::STATE_DISABLED,
246 gfx::CreateVectorIcon(icon_id, kButtonSize, disabled_color)); 246 gfx::CreateVectorIcon(icon_id, kButtonSize, disabled_color));
247 set_ink_drop_base_color(normal_color);
247 } else { 248 } else {
248 SetImage(views::Button::STATE_NORMAL, 249 SetImage(views::Button::STATE_NORMAL,
249 *(tp->GetImageSkiaNamed((mode == MODE_RELOAD) ? IDR_RELOAD 250 *(tp->GetImageSkiaNamed((mode == MODE_RELOAD) ? IDR_RELOAD
250 : IDR_STOP))); 251 : IDR_STOP)));
251 SetImage(views::Button::STATE_DISABLED, 252 SetImage(views::Button::STATE_DISABLED,
252 *(tp->GetImageSkiaNamed((mode == MODE_RELOAD) ? IDR_RELOAD_D 253 *(tp->GetImageSkiaNamed((mode == MODE_RELOAD) ? IDR_RELOAD_D
253 : IDR_STOP_D))); 254 : IDR_STOP_D)));
254 } 255 }
255 } 256 }
256 257
257 visible_mode_ = mode; 258 visible_mode_ = mode;
258 SchedulePaint(); 259 SchedulePaint();
259 } 260 }
260 261
261 void ReloadButton::OnDoubleClickTimer() { 262 void ReloadButton::OnDoubleClickTimer() {
262 if (!IsMenuShowing()) 263 if (!IsMenuShowing())
263 ChangeMode(intended_mode_, false); 264 ChangeMode(intended_mode_, false);
264 } 265 }
265 266
266 void ReloadButton::OnStopToReloadTimer() { 267 void ReloadButton::OnStopToReloadTimer() {
267 DCHECK(!IsMenuShowing()); 268 DCHECK(!IsMenuShowing());
268 ChangeMode(intended_mode_, true); 269 ChangeMode(intended_mode_, true);
269 } 270 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/toolbar/app_menu_button.cc ('k') | chrome/browser/ui/views/toolbar/toolbar_action_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698