| Index: chrome/browser/ui/libgtk2ui/gtk2_ui.cc
|
| diff --git a/chrome/browser/ui/libgtk2ui/gtk2_ui.cc b/chrome/browser/ui/libgtk2ui/gtk2_ui.cc
|
| index 27302163220f9ca8aa9ce1d37ebd2fa695596c78..e12b6072fd6cd2b33b26d1c05b16be809865213f 100644
|
| --- a/chrome/browser/ui/libgtk2ui/gtk2_ui.cc
|
| +++ b/chrome/browser/ui/libgtk2ui/gtk2_ui.cc
|
| @@ -246,9 +246,12 @@ void PickButtonTintFromColors(const GdkColor& accent_gdk_color,
|
| // 125] will tint green instead of gray). Slight differences (+/-10 (4%) to
|
| // all color components) should be interpreted as this color being gray and
|
| // we should switch into a special grayscale mode.
|
| - int rb_diff = abs(SkColorGetR(accent_color) - SkColorGetB(accent_color));
|
| - int rg_diff = abs(SkColorGetR(accent_color) - SkColorGetG(accent_color));
|
| - int bg_diff = abs(SkColorGetB(accent_color) - SkColorGetG(accent_color));
|
| + int rb_diff = abs(static_cast<int>(SkColorGetR(accent_color)) -
|
| + static_cast<int>(SkColorGetB(accent_color)));
|
| + int rg_diff = abs(static_cast<int>(SkColorGetR(accent_color)) -
|
| + static_cast<int>(SkColorGetG(accent_color)));
|
| + int bg_diff = abs(static_cast<int>(SkColorGetB(accent_color)) -
|
| + static_cast<int>(SkColorGetG(accent_color)));
|
| if (rb_diff < 10 && rg_diff < 10 && bg_diff < 10) {
|
| // Our accent is white/gray/black. Only the luminance of the accent color
|
| // matters.
|
|
|