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

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

Issue 1505223004: Do not use assets for Ash window control button backgrounds (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ash layout constants file added Created 5 years 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
Index: chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.cc
diff --git a/chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.cc b/chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.cc
index ce101084edd5d418afce03a2b9e09177bd1c9aca..55166baf6f21430caa7cae592bdc5e537d61bc9d 100644
--- a/chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.cc
+++ b/chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.cc
@@ -176,8 +176,17 @@ int BrowserNonClientFrameViewAsh::GetTopInset(bool restored) const {
return 0;
if (browser_view()->IsTabStripVisible()) {
- return ((frame()->IsMaximized() || frame()->IsFullscreen()) && !restored) ?
- kTabstripTopSpacingShort : kTabstripTopSpacingTall;
+ // TODO(tdanderson): Remove this temporary hack to prevent the buttons in
+ // the header from overlapping the tabstrip/toolbar
+ // separator in material design.
+ if (ui::MaterialDesignController::IsModeMaterial()) {
+ return header_painter_->GetHeaderHeight() -
+ browser_view()->GetTabStripHeight();
+ } else {
Peter Kasting 2015/12/18 18:59:15 Nit: No else after return. (This also allows undo
tdanderson 2016/01/04 23:11:15 Done.
+ return ((frame()->IsMaximized() ||
+ frame()->IsFullscreen()) &&
+ !restored) ? kTabstripTopSpacingShort : kTabstripTopSpacingTall;
+ }
}
if (UsePackagedAppHeaderStyle() || UseWebAppHeaderStyle())

Powered by Google App Engine
This is Rietveld 408576698