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

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

Issue 1624803002: Don't allow pre-MD pre-Win 10 tabstrips to overlap the toolbar corner on glass. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 | « no previous file | 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 0675c125cd3354c71015a699dd5b9f2fc8bb8988..551e02f7c394254786e9e4eb1a0777af4d03b1d7 100644
--- a/chrome/browser/ui/views/frame/glass_browser_frame_view.cc
+++ b/chrome/browser/ui/views/frame/glass_browser_frame_view.cc
@@ -546,6 +546,7 @@ void GlassBrowserFrameView::LayoutNewStyleAvatar() {
}
void GlassBrowserFrameView::LayoutIncognitoIcon() {
+ const bool md = ui::MaterialDesignController::IsModeMaterial();
const gfx::Insets insets(GetLayoutInsets(AVATAR_ICON));
gfx::Size size;
// During startup it's possible to reach here before the browser view has been
@@ -562,11 +563,17 @@ void GlassBrowserFrameView::LayoutIncognitoIcon() {
x = width() - frame()->GetMinimizeButtonOffset() +
(new_avatar_button() ?
(new_avatar_button()->width() + kNewAvatarButtonOffset) : 0);
+ } else if (!md && !avatar_button() &&
+ (base::win::GetVersion() < base::win::VERSION_WIN10)) {
+ // In non-MD before Win 10, the toolbar has a rounded corner that we don't
+ // want the tabstrip to overlap.
+ x += browser_view()->GetToolbarBounds().x() - kContentEdgeShadowThickness +
+ GetThemeProvider()->GetImageSkiaNamed(
+ IDR_CONTENT_TOP_LEFT_CORNER)->width();
}
const int bottom = GetTopInset(false) + browser_view()->GetTabStripHeight() -
insets.bottom();
- const int y = (ui::MaterialDesignController::IsModeMaterial() ||
- !frame()->IsMaximized()) ?
+ const int y = (md || !frame()->IsMaximized()) ?
(bottom - size.height()) : FrameTopBorderHeight(false);
incognito_bounds_.SetRect(x + (avatar_button() ? insets.left() : 0), y,
avatar_button() ? size.width() : 0, bottom - y);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698