Index: mash/wm/frame/default_header_painter.cc |
diff --git a/mash/wm/frame/default_header_painter.cc b/mash/wm/frame/default_header_painter.cc |
index ed2a66d1be487064279a10fe23211ba1df21bee2..dfc1ed14cef749860eb87cefa09f47ccfe046b2b 100644 |
--- a/mash/wm/frame/default_header_painter.cc |
+++ b/mash/wm/frame/default_header_painter.cc |
@@ -40,8 +40,6 @@ const SkColor kHeaderContentSeparatorInactiveColor = |
const SkColor kDefaultFrameColor = SkColorSetRGB(242, 242, 242); |
// Duration of crossfade animation for activating and deactivating frame. |
const int kActivationCrossfadeDurationMs = 200; |
-// Luminance below which to use white caption buttons. |
-const int kMaxLuminanceForLightButtons = 125; |
// Tiles an image into an area, rounding the top corners. |
void TileRoundRect(gfx::Canvas* canvas, |
@@ -269,9 +267,8 @@ void DefaultHeaderPainter::PaintHeaderContentSeparator(gfx::Canvas* canvas) { |
} |
bool DefaultHeaderPainter::ShouldUseLightImages() { |
- int luminance = color_utils::GetLuminanceForColor( |
+ return color_utils::IsDark( |
mode_ == MODE_INACTIVE ? inactive_frame_color_ : active_frame_color_); |
- return luminance < kMaxLuminanceForLightButtons; |
} |
void DefaultHeaderPainter::UpdateAllButtonImages() { |