diff options
author | andybons@chromium.org <andybons@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-08 16:35:53 +0000 |
---|---|---|
committer | andybons@chromium.org <andybons@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-08 16:35:53 +0000 |
commit | 1d414b8789fd4fd81778505b0cadc1d44fb059ba (patch) | |
tree | b9de91d11f881e034dc26a8f45545c6b2b721b81 /chrome/browser/cocoa/toolbar_controller.mm | |
parent | 586ffa48f1529739ce7cfbcc38e22fc907438ca4 (diff) | |
download | chromium_src-1d414b8789fd4fd81778505b0cadc1d44fb059ba.zip chromium_src-1d414b8789fd4fd81778505b0cadc1d44fb059ba.tar.gz chromium_src-1d414b8789fd4fd81778505b0cadc1d44fb059ba.tar.bz2 |
[Mac] Tighten up the top chrome (move the buttons closer, reduce the toolbar height). Replace the stop/reload images with ones that fit the weight better. Also replace the wrench menu icon.
BUG=none
TEST=make sure dat toolbar is TIGHT.
Review URL: http://codereview.chromium.org/2811047
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51851 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/toolbar_controller.mm')
-rw-r--r-- | chrome/browser/cocoa/toolbar_controller.mm | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/chrome/browser/cocoa/toolbar_controller.mm b/chrome/browser/cocoa/toolbar_controller.mm index 7487241..6875433 100644 --- a/chrome/browser/cocoa/toolbar_controller.mm +++ b/chrome/browser/cocoa/toolbar_controller.mm @@ -57,7 +57,7 @@ NSString* const kHomeButtonImageName = @"home_Template.pdf"; NSString* const kWrenchButtonImageName = @"menu_chrome_Template.pdf"; // Height of the toolbar in pixels when the bookmark bar is closed. -const CGFloat kBaseToolbarHeight = 36.0; +const CGFloat kBaseToolbarHeight = 35.0; // The minimum width of the location bar in pixels. const CGFloat kMinimumLocationBarWidth = 100.0; @@ -481,18 +481,6 @@ class PrefObserverBridge : public NotificationObserver { return frame; } -// Computes the padding between the buttons that should have a -// separation from the positions in the nib. |homeButton_| is right -// of |forwardButton_| unless it has been hidden, in which case -// |reloadButton_| is in that spot. -- (CGFloat)interButtonSpacing { - const NSRect forwardFrame = [forwardButton_ frame]; - NSButton* nextButton = [homeButton_ isHidden] ? reloadButton_ : homeButton_; - const NSRect nextButtonFrame = [nextButton frame]; - DCHECK_GT(NSMinX(nextButtonFrame), NSMaxX(forwardFrame)); - return NSMinX(nextButtonFrame) - NSMaxX(forwardFrame); -} - // Show or hide the home button based on the pref. - (void)showOptionalHomeButton { // Ignore this message if only showing the URL bar. @@ -502,10 +490,10 @@ class PrefObserverBridge : public NotificationObserver { if (hide == [homeButton_ isHidden]) return; // Nothing to do, view state matches pref state. - // Always shift the star and text field by the width of the home button plus - // the appropriate gap width. If we're hiding the button, we have to - // reverse the direction of the movement (to the left). - CGFloat moveX = [self interButtonSpacing] + [homeButton_ frame].size.width; + // Always shift the text field by the width of the home button minus one pixel + // since the frame edges of each button are right on top of each other. When + // hiding the button, reverse the direction of the movement (to the left). + CGFloat moveX = [homeButton_ frame].size.width - 1.0; if (hide) moveX *= -1; // Reverse the direction of the move. |