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

Unified Diff: chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm

Issue 2208593002: [Mac][Material Design] Increase space between home button and Omnibox. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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/cocoa/toolbar/toolbar_controller.mm
diff --git a/chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm b/chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm
index 423babf0c572afd77141ad7c1fba8debc989b1af..a0122c82aa37ec0950454523bc60a48b22b41c6a 100644
--- a/chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm
+++ b/chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm
@@ -368,6 +368,10 @@ class NotificationBridge : public AppMenuIconController::Delegate {
NSRect locationBarFrame = [locationBar_ frame];
locationBarFrame.origin.x = NSMaxX(homeButtonFrame) +
kMaterialDesignButtonInset;
+ if (![homeButton_ isHidden]) {
+ // Ensure proper spacing between the home button and the location bar.
+ locationBarFrame.origin.x += kMaterialDesignElementPadding;
+ }
locationBarFrame.origin.y = NSMaxY(toolbarBounds) -
kMaterialDesignLocationBarPadding - kMaterialDesignLocationBarHeight;
locationBarFrame.size.width =
@@ -798,6 +802,9 @@ class NotificationBridge : public AppMenuIconController::Delegate {
CGFloat moveX = [homeButton_ frame].size.width;
if (!ui::MaterialDesignController::IsModeMaterial()) {
moveX -= 1.0;
+ } else {
+ // Ensure proper spacing between the home button and the location bar.
+ moveX += kMaterialDesignElementPadding;
}
if (hide)
moveX *= -1; // Reverse the direction of the move.
« 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