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

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

Issue 1439423002: Make browser frame square when running on windows 10 with a theme. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@but
Patch Set: rebased Created 4 years, 8 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 | « chrome/browser/ui/views/frame/opaque_browser_frame_view_layout.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/window/frame_background.cc
diff --git a/ui/views/window/frame_background.cc b/ui/views/window/frame_background.cc
index 3e0e4ff5c06d71233c2a379e9973a6df3ab6e051..8e6466a202a096fbaa0be5731f2f5f3cee779576 100644
--- a/ui/views/window/frame_background.cc
+++ b/ui/views/window/frame_background.cc
@@ -62,6 +62,12 @@ void FrameBackground::PaintRestored(gfx::Canvas* canvas,
if (!theme_overlay_image_.isNull())
canvas->DrawImageInt(theme_overlay_image_, 0, 0);
+ if (!left_edge_ || !right_edge_ ||!bottom_edge_ || !top_edge_ ||
+ !top_left_corner_ || !top_right_corner_ || !bottom_right_corner_ ||
+ !bottom_left_corner_) {
+ return;
+ }
+
// Draw the top corners and edge, scaling the corner images down if they
// are too big and relative to the vertical space available.
int top_left_height =
@@ -151,6 +157,9 @@ void FrameBackground::PaintFrameColor(gfx::Canvas* canvas,
if (remaining_height <= 0)
return;
+ if (!left_edge_ || !right_edge_ ||!bottom_edge_)
+ return;
+
// Fill down the sides.
canvas->FillRect(gfx::Rect(0, top_area_height_, left_edge_->width(),
remaining_height), frame_color_);
« no previous file with comments | « chrome/browser/ui/views/frame/opaque_browser_frame_view_layout.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698