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

Side by Side Diff: chrome/browser/ui/views/bar_control_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
« no previous file with comments | « no previous file | chrome/browser/ui/views/location_bar/bubble_icon_view.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/bar_control_button.h" 5 #include "chrome/browser/ui/views/bar_control_button.h"
6 6
7 #include "ui/gfx/color_utils.h" 7 #include "ui/gfx/color_utils.h"
8 #include "ui/gfx/paint_vector_icon.h" 8 #include "ui/gfx/paint_vector_icon.h"
9 #include "ui/gfx/vector_icons_public.h" 9 #include "ui/gfx/vector_icons_public.h"
10 #include "ui/views/animation/button_ink_drop_delegate.h" 10 #include "ui/views/animation/button_ink_drop_delegate.h"
(...skipping 29 matching lines...) Expand all
40 views::ImageButton::ALIGN_MIDDLE); 40 views::ImageButton::ALIGN_MIDDLE);
41 } 41 }
42 42
43 void BarControlButton::OnThemeChanged() { 43 void BarControlButton::OnThemeChanged() {
44 SkColor icon_color = 44 SkColor icon_color =
45 color_utils::DeriveDefaultIconColor(get_text_color_callback_.Run()); 45 color_utils::DeriveDefaultIconColor(get_text_color_callback_.Run());
46 gfx::ImageSkia image = gfx::CreateVectorIcon(id_, 16, icon_color); 46 gfx::ImageSkia image = gfx::CreateVectorIcon(id_, 16, icon_color);
47 SetImage(views::CustomButton::STATE_NORMAL, &image); 47 SetImage(views::CustomButton::STATE_NORMAL, &image);
48 image = gfx::CreateVectorIcon(id_, 16, SkColorSetA(icon_color, 0xff / 2)); 48 image = gfx::CreateVectorIcon(id_, 16, SkColorSetA(icon_color, 0xff / 2));
49 SetImage(views::CustomButton::STATE_DISABLED, &image); 49 SetImage(views::CustomButton::STATE_DISABLED, &image);
50 set_ink_drop_base_color(icon_color);
50 } 51 }
51 52
52 void BarControlButton::OnNativeThemeChanged(const ui::NativeTheme* theme) { 53 void BarControlButton::OnNativeThemeChanged(const ui::NativeTheme* theme) {
53 OnThemeChanged(); 54 OnThemeChanged();
54 } 55 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/views/location_bar/bubble_icon_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698