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

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

Issue 2863013: [Mac] UI changes for the Browser Actions toolbar container.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 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/cocoa/extensions/browser_actions_controller.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/cocoa/toolbar_controller.mm
===================================================================
--- chrome/browser/cocoa/toolbar_controller.mm (revision 50348)
+++ chrome/browser/cocoa/toolbar_controller.mm (working copy)
@@ -55,10 +55,6 @@
// Height of the toolbar in pixels when the bookmark bar is closed.
const CGFloat kBaseToolbarHeight = 36.0;
-// The distance from the location bar to the Browser Actions container
-// in pixels.
-const CGFloat kBrowserActionsContainerLeftPadding = 5.0;
-
// The minimum width of the location bar in pixels.
const CGFloat kMinimumLocationBarWidth = 100.0;
@@ -558,9 +554,6 @@
NSWidth([browserActionsContainerView_ frame]);
if (containerWidth > 0.0)
[self adjustLocationSizeBy:(containerWidth * -1) animate:NO];
- // Right border should always be visible because wrench menu can no longer
- // hide.
- [browserActionsContainerView_ setRightBorderShown:YES];
}
- (void)adjustBrowserActionsContainerForNewWindow:
@@ -592,22 +585,20 @@
- (void)pinLocationBarToLeftOfBrowserActionsContainerAndAnimate:(BOOL)animate {
CGFloat locationBarXPos = NSMaxX([locationBar_ frame]);
- CGFloat leftPadding;
+ CGFloat leftDistance;
if ([browserActionsContainerView_ isHidden]) {
CGFloat edgeXPos = [wrenchButton_ frame].origin.x;
- leftPadding = edgeXPos - locationBarXPos;
+ leftDistance = edgeXPos - locationBarXPos;
} else {
NSRect containerFrame = animate ?
[browserActionsContainerView_ animationEndFrame] :
[browserActionsContainerView_ frame];
- leftPadding = containerFrame.origin.x - locationBarXPos;
+ leftDistance = containerFrame.origin.x - locationBarXPos;
}
- if (leftPadding != kBrowserActionsContainerLeftPadding) {
- CGFloat dX = leftPadding - kBrowserActionsContainerLeftPadding;
- [self adjustLocationSizeBy:dX animate:animate];
- }
+ if (leftDistance != 0.0)
+ [self adjustLocationSizeBy:leftDistance animate:animate];
}
- (void)maintainMinimumLocationBarWidth {
@@ -633,8 +624,7 @@
NSRect containerFrame = [browserActionsContainerView_ frame];
// Determine how much the container needs to move in case it's overlapping
// with the location bar.
- CGFloat dX = NSMaxX([locationBar_ frame]) -
- containerFrame.origin.x + kBrowserActionsContainerLeftPadding;
+ CGFloat dX = NSMaxX([locationBar_ frame]) - containerFrame.origin.x;
containerFrame = NSOffsetRect(containerFrame, dX, 0);
containerFrame.size.width -= dX;
[browserActionsContainerView_ setFrame:containerFrame];
« no previous file with comments | « chrome/browser/cocoa/extensions/browser_actions_controller.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698