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

Unified Diff: ash/wm/custom_frame_view_ash.cc

Issue 148003003: Use white header for app windows part #2 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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: ash/wm/custom_frame_view_ash.cc
diff --git a/ash/wm/custom_frame_view_ash.cc b/ash/wm/custom_frame_view_ash.cc
index d30595d322be6a80aa65fb5f54cbfb00a3ff045c..5c03d18b536c7cf4d084f375752097a496d71ed9 100644
--- a/ash/wm/custom_frame_view_ash.cc
+++ b/ash/wm/custom_frame_view_ash.cc
@@ -263,20 +263,25 @@ void CustomFrameViewAsh::HeaderView::Layout() {
}
void CustomFrameViewAsh::HeaderView::OnPaint(gfx::Canvas* canvas) {
+ bool paint_as_active =
+ frame_->non_client_view()->frame_view()->ShouldPaintAsActive();
+ caption_button_container_->SetPaintAsActive(paint_as_active);
+
int theme_image_id = 0;
- if (frame_->IsMaximized() || frame_->IsFullscreen())
- theme_image_id = IDR_AURA_WINDOW_HEADER_BASE_MINIMAL;
- else if (frame_->non_client_view()->frame_view()->ShouldPaintAsActive())
+ if (paint_as_active)
theme_image_id = IDR_AURA_WINDOW_HEADER_BASE_ACTIVE;
else
theme_image_id = IDR_AURA_WINDOW_HEADER_BASE_INACTIVE;
+ HeaderPainter::Mode header_mode = paint_as_active ?
+ HeaderPainter::MODE_ACTIVE : HeaderPainter::MODE_INACTIVE;
header_painter_->PaintHeader(
canvas,
+ header_mode,
theme_image_id,
0);
header_painter_->PaintTitleBar(canvas, GetTitleFontList());
- header_painter_->PaintHeaderContentSeparator(canvas);
+ header_painter_->PaintHeaderContentSeparator(canvas, header_mode);
}
void CustomFrameViewAsh::HeaderView::OnImmersiveRevealStarted() {

Powered by Google App Engine
This is Rietveld 408576698