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

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, 10 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
« no previous file with comments | « ash/wm/caption_buttons/frame_maximize_button_unittest.cc ('k') | ash/wm/custom_frame_view_ash_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 994ad5c569eeb9a9b6fbbc93eefc419fc27364e3..f0a91b431194a6519b2dd5043edbd02b4abe51bf 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_BROWSER_WINDOW_HEADER_BASE_MAXIMIZED;
- else if (frame_->non_client_view()->frame_view()->ShouldPaintAsActive())
- theme_image_id = IDR_AURA_BROWSER_WINDOW_HEADER_BASE_RESTORED_ACTIVE;
+ if (paint_as_active)
+ theme_image_id = IDR_AURA_WINDOW_HEADER_BASE_ACTIVE;
else
- theme_image_id = IDR_AURA_BROWSER_WINDOW_HEADER_BASE_RESTORED_INACTIVE;
+ 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() {
« no previous file with comments | « ash/wm/caption_buttons/frame_maximize_button_unittest.cc ('k') | ash/wm/custom_frame_view_ash_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698