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

Unified Diff: chrome/browser/ui/views/frame/glass_browser_frame_view.cc

Issue 2056583002: Fix glass extension on MD for Win 7 and below. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Resync Created 4 years, 6 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/browser_desktop_window_tree_host_win.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/frame/glass_browser_frame_view.cc
diff --git a/chrome/browser/ui/views/frame/glass_browser_frame_view.cc b/chrome/browser/ui/views/frame/glass_browser_frame_view.cc
index 96e3143a1539801394f11a2b08afbf58cd11d36f..0f4d3c0a30efa47c425565dad427a1981bb679b9 100644
--- a/chrome/browser/ui/views/frame/glass_browser_frame_view.cc
+++ b/chrome/browser/ui/views/frame/glass_browser_frame_view.cc
@@ -478,10 +478,8 @@ void GlassBrowserFrameView::PaintClientEdge(gfx::Canvas* canvas) const {
const gfx::Rect toolbar_bounds(browser_view()->GetToolbarBounds());
const int y =
client_bounds.y() + (md ? toolbar_bounds.y() : toolbar_bounds.bottom());
- const int w = client_bounds.width();
const int right = client_bounds.right();
const int bottom = std::max(y, height() - ClientBorderThickness(false));
- const int height = bottom - y;
// Draw the client edge images. For non-MD, we fill the toolbar color
// underneath these images so they will lighten/darken it appropriately to
@@ -491,19 +489,23 @@ void GlassBrowserFrameView::PaintClientEdge(gfx::Canvas* canvas) const {
const SkColor toolbar_color = tp->GetColor(ThemeProperties::COLOR_TOOLBAR);
if (!md)
FillClientEdgeRects(x, y, right, bottom, toolbar_color, canvas);
- const gfx::ImageSkia* const right_image =
- tp->GetImageSkiaNamed(IDR_CONTENT_RIGHT_SIDE);
- const int img_w = right_image->width();
- canvas->TileImageInt(*right_image, right, y, img_w, height);
- canvas->DrawImageInt(*tp->GetImageSkiaNamed(IDR_CONTENT_BOTTOM_RIGHT_CORNER),
- right, bottom);
- const gfx::ImageSkia* const bottom_image =
- tp->GetImageSkiaNamed(IDR_CONTENT_BOTTOM_CENTER);
- canvas->TileImageInt(*bottom_image, x, bottom, w, bottom_image->height());
- canvas->DrawImageInt(*tp->GetImageSkiaNamed(IDR_CONTENT_BOTTOM_LEFT_CORNER),
- x - img_w, bottom);
- canvas->TileImageInt(*tp->GetImageSkiaNamed(IDR_CONTENT_LEFT_SIDE), x - img_w,
- y, img_w, height);
+ if (!md || (base::win::GetVersion() < base::win::VERSION_WIN10)) {
Peter Kasting 2016/06/16 20:21:26 This isn't a visible behavior change, it just turn
+ const gfx::ImageSkia* const right_image =
+ tp->GetImageSkiaNamed(IDR_CONTENT_RIGHT_SIDE);
+ const int img_w = right_image->width();
+ const int height = bottom - y;
+ canvas->TileImageInt(*right_image, right, y, img_w, height);
+ canvas->DrawImageInt(
+ *tp->GetImageSkiaNamed(IDR_CONTENT_BOTTOM_RIGHT_CORNER), right, bottom);
+ const gfx::ImageSkia* const bottom_image =
+ tp->GetImageSkiaNamed(IDR_CONTENT_BOTTOM_CENTER);
+ canvas->TileImageInt(*bottom_image, x, bottom, client_bounds.width(),
+ bottom_image->height());
+ canvas->DrawImageInt(*tp->GetImageSkiaNamed(IDR_CONTENT_BOTTOM_LEFT_CORNER),
+ x - img_w, bottom);
+ canvas->TileImageInt(*tp->GetImageSkiaNamed(IDR_CONTENT_LEFT_SIDE),
+ x - img_w, y, img_w, height);
+ }
if (md)
FillClientEdgeRects(x, y, right, bottom, toolbar_color, canvas);
}
« no previous file with comments | « chrome/browser/ui/views/frame/browser_desktop_window_tree_host_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698