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

Unified Diff: chrome/browser/ui/views/toolbar/reload_button.cc

Issue 1406613002: For some vector icons, get the size from the vector definition. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/toolbar/reload_button.cc
diff --git a/chrome/browser/ui/views/toolbar/reload_button.cc b/chrome/browser/ui/views/toolbar/reload_button.cc
index 3d1f2f65227ac8cb2a2d8f7fbdf680cd3524727c..45e57cb25ffd22229b613ec6d2dae58f01f93de5 100644
--- a/chrome/browser/ui/views/toolbar/reload_button.cc
+++ b/chrome/browser/ui/views/toolbar/reload_button.cc
@@ -233,15 +233,14 @@ void ReloadButton::ChangeModeInternal(Mode mode) {
const gfx::VectorIconId icon_id = (mode == MODE_RELOAD)
? gfx::VectorIconId::NAVIGATE_RELOAD
: gfx::VectorIconId::NAVIGATE_STOP;
- const int kButtonSize = 16;
const SkColor normal_color =
tp->GetColor(ThemeProperties::COLOR_TOOLBAR_BUTTON_ICON);
const SkColor disabled_color =
tp->GetColor(ThemeProperties::COLOR_TOOLBAR_BUTTON_ICON_INACTIVE);
SetImage(views::Button::STATE_NORMAL,
- gfx::CreateVectorIcon(icon_id, kButtonSize, normal_color));
+ gfx::CreatePrimaryVectorIcon(icon_id, normal_color));
SetImage(views::Button::STATE_DISABLED,
- gfx::CreateVectorIcon(icon_id, kButtonSize, disabled_color));
+ gfx::CreatePrimaryVectorIcon(icon_id, disabled_color));
} else {
SetImage(views::Button::STATE_NORMAL,
*(tp->GetImageSkiaNamed((mode == MODE_RELOAD) ? IDR_RELOAD

Powered by Google App Engine
This is Rietveld 408576698