Chromium Code Reviews| Index: ash/frame/default_header_painter.cc |
| diff --git a/ash/frame/default_header_painter.cc b/ash/frame/default_header_painter.cc |
| index 125cb510e2c161da0730ab929f8529cdaea95fad..26107aeb87bcbd709d030a950f60927c316dcbd5 100644 |
| --- a/ash/frame/default_header_painter.cc |
| +++ b/ash/frame/default_header_painter.cc |
| @@ -242,6 +242,9 @@ void DefaultHeaderPainter::AnimationProgressed( |
| void DefaultHeaderPainter::PaintHighlightForInactiveRestoredWindow( |
| gfx::Canvas* canvas) { |
| + if (HasCustomFrameColors()) |
|
pkotwicz
2015/02/12 02:04:52
I think it would make more sense to add this logic
benwells
2015/02/12 02:36:10
Done.
|
| + return; |
| + |
| ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); |
| gfx::ImageSkia top_edge = *rb.GetImageSkiaNamed( |
| IDR_AURA_WINDOW_HEADER_SHADE_INACTIVE_TOP); |
| @@ -286,6 +289,9 @@ void DefaultHeaderPainter::PaintTitleBar(gfx::Canvas* canvas) { |
| } |
| void DefaultHeaderPainter::PaintHeaderContentSeparator(gfx::Canvas* canvas) { |
| + if (HasCustomFrameColors()) |
| + return; |
| + |
| SkColor color = (mode_ == MODE_ACTIVE) ? |
| kHeaderContentSeparatorColor : |
| kHeaderContentSeparatorInactiveColor; |
| @@ -340,6 +346,11 @@ gfx::Rect DefaultHeaderPainter::GetTitleBounds() const { |
| left_header_view_, caption_button_container_, GetTitleFontList()); |
| } |
| +bool DefaultHeaderPainter::HasCustomFrameColors() const { |
| + return active_frame_color_ != kDefaultFrameColor || |
| + inactive_frame_color_ != kDefaultFrameColor; |
| +} |
| + |
| SkColor DefaultHeaderPainter::GetInactiveFrameColor() const { |
| SkColor color = inactive_frame_color_; |
| if (!frame_->IsMaximized() && !frame_->IsFullscreen()) { |