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

Unified Diff: ui/views/window/custom_frame_view.cc

Issue 2628043002: Gtk3: Render a GtkHeaderBar as the background of the tab strip (Closed)
Patch Set: Guard kFrameTopArea with #if defined(OS_LINUX) && !defined(OS_CHROMEOS) Created 3 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
« no previous file with comments | « ui/native_theme/native_theme_base.cc ('k') | ui/views/window/frame_background.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/window/custom_frame_view.cc
diff --git a/ui/views/window/custom_frame_view.cc b/ui/views/window/custom_frame_view.cc
index bac98a4181af8df101cb57b90c406e25a584f47d..14d4630a1a49d4e93d3086f29dbcada03cb2e193 100644
--- a/ui/views/window/custom_frame_view.cc
+++ b/ui/views/window/custom_frame_view.cc
@@ -221,6 +221,14 @@ void CustomFrameView::OnPaint(gfx::Canvas* canvas) {
if (!ShouldShowTitleBarAndBorder())
return;
+ frame_background_->set_frame_color(GetFrameColor());
+ frame_background_->set_use_custom_frame(true);
+ frame_background_->set_is_active(ShouldPaintAsActive());
+ frame_background_->set_incognito(false);
+ const gfx::ImageSkia frame_image = GetFrameImage();
+ frame_background_->set_theme_image(frame_image);
+ frame_background_->set_top_area_height(frame_image.height());
+
if (frame_->IsMaximized())
PaintMaximizedFrameBorder(canvas);
else
@@ -359,11 +367,6 @@ bool CustomFrameView::ShouldShowClientEdge() const {
}
void CustomFrameView::PaintRestoredFrameBorder(gfx::Canvas* canvas) {
- frame_background_->set_frame_color(GetFrameColor());
- const gfx::ImageSkia frame_image = GetFrameImage();
- frame_background_->set_theme_image(frame_image);
- frame_background_->set_top_area_height(frame_image.height());
-
ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
frame_background_->SetCornerImages(
@@ -381,9 +384,6 @@ void CustomFrameView::PaintRestoredFrameBorder(gfx::Canvas* canvas) {
}
void CustomFrameView::PaintMaximizedFrameBorder(gfx::Canvas* canvas) {
- const gfx::ImageSkia frame_image = GetFrameImage();
- frame_background_->set_theme_image(frame_image);
- frame_background_->set_top_area_height(frame_image.height());
frame_background_->PaintMaximized(canvas, this);
ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
« no previous file with comments | « ui/native_theme/native_theme_base.cc ('k') | ui/views/window/frame_background.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698