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

Unified Diff: chrome/browser/ui/cocoa/browser_window_layout.mm

Issue 1989633002: Revert "[Material][Mac] Reduced the area above tabs by 2 pts" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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
Index: chrome/browser/ui/cocoa/browser_window_layout.mm
diff --git a/chrome/browser/ui/cocoa/browser_window_layout.mm b/chrome/browser/ui/cocoa/browser_window_layout.mm
index 3a57168444ee27b8dc7c6b0d1ed918988b54084f..23ca75e9c224bc8040a7022e452b7cdde194d18a 100644
--- a/chrome/browser/ui/cocoa/browser_window_layout.mm
+++ b/chrome/browser/ui/cocoa/browser_window_layout.mm
@@ -10,20 +10,11 @@
#include "base/logging.h"
#include "base/mac/mac_util.h"
#import "chrome/browser/ui/cocoa/tabs/tab_strip_controller.h"
-#include "ui/base/material_design/material_design_controller.h"
namespace chrome {
// The height of the tab strip.
const CGFloat kTabStripHeight = 37;
-const CGFloat kMaterialTabStripHeight = 35;
-
-CGFloat TabStripHeight() {
- if (ui::MaterialDesignController::IsModeMaterial())
- return kMaterialTabStripHeight;
-
- return kTabStripHeight;
-}
} // namespace chrome
@@ -204,8 +195,8 @@ const CGFloat kLocationBarRightOffset = 35;
// Lay out the tab strip.
maxY_ = parameters_.windowSize.height + fullscreenYOffset_;
CGFloat width = parameters_.contentViewSize.width;
- layout.frame = NSMakeRect(0, maxY_ - chrome::TabStripHeight(), width,
- chrome::TabStripHeight());
+ layout.frame = NSMakeRect(
+ 0, maxY_ - chrome::kTabStripHeight, width, chrome::kTabStripHeight);
maxY_ = NSMinY(layout.frame);
// In Yosemite, there is no longer an exit fullscreen button in the top-right
@@ -235,14 +226,14 @@ const CGFloat kLocationBarRightOffset = 35;
// Center the button, but make sure that it's pixel aligned on non-retina
// displays. Use trunc() instead of round() to mimic the behavior of
// autoresizesSubviews.
- badgeYOffset = trunc((chrome::TabStripHeight() - buttonHeight) / 2);
+ badgeYOffset = trunc((chrome::kTabStripHeight - buttonHeight) / 2);
} else {
// Actually place the badge *above* |maxY|, by +2 to miss the divider.
badgeYOffset = 2 * parameters_.avatarLineWidth;
}
NSSize size = NSMakeSize(parameters_.avatarSize.width,
- std::min(buttonHeight, chrome::TabStripHeight()));
+ std::min(buttonHeight, chrome::kTabStripHeight));
NSPoint origin =
NSMakePoint(width - parameters_.avatarSize.width + badgeXOffset,
maxY_ + badgeYOffset);
@@ -386,7 +377,7 @@ const CGFloat kLocationBarRightOffset = 35;
CGFloat totalHeight = 0;
if (parameters_.hasTabStrip)
- totalHeight += chrome::TabStripHeight();
+ totalHeight += chrome::kTabStripHeight;
if (parameters_.hasToolbar) {
totalHeight += parameters_.toolbarHeight;
« no previous file with comments | « chrome/browser/ui/cocoa/browser_window_layout.h ('k') | chrome/browser/ui/cocoa/browser_window_layout_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698