Commit 3a5b0457 authored by rsesek@chromium.org's avatar rsesek@chromium.org

[Mac] Fix avatar size after new icon drop. The image scaling behaves weird in a button cell.

BUG=none
TEST=With multi profiles enabled, avatars aren't smaller than they should be.


Review URL: http://codereview.chromium.org/7584015

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@96490 0039d316-1c4b-4281-b951-d872f2087c98
parent 0b6e3993
...@@ -78,6 +78,9 @@ class Observer : public NotificationObserver { ...@@ -78,6 +78,9 @@ class Observer : public NotificationObserver {
[button_ setButtonType:NSMomentaryLightButton]; [button_ setButtonType:NSMomentaryLightButton];
[button_ setImagePosition:NSImageOnly]; [button_ setImagePosition:NSImageOnly];
[[button_ cell] setImageScaling:NSImageScaleProportionallyDown]; [[button_ cell] setImageScaling:NSImageScaleProportionallyDown];
[[button_ cell] setImagePosition:NSImageBelow];
// AppKit sets a title for some reason when using |-setImagePosition:|.
[button_ setTitle:nil];
[[button_ cell] setImageDimsWhenDisabled:NO]; [[button_ cell] setImageDimsWhenDisabled:NO];
[[button_ cell] setHighlightsBy:NSContentsCellMask]; [[button_ cell] setHighlightsBy:NSContentsCellMask];
[[button_ cell] setShowsStateBy:NSContentsCellMask]; [[button_ cell] setShowsStateBy:NSContentsCellMask];
......
...@@ -371,8 +371,8 @@ willPositionSheet:(NSWindow*)sheet ...@@ -371,8 +371,8 @@ willPositionSheet:(NSWindow*)sheet
// Now lay out incognito badge together with the tab strip. // Now lay out incognito badge together with the tab strip.
if (avatarButton_.get()) { if (avatarButton_.get()) {
CGFloat sizeSquare = tabStripHeight - 5.0; [avatarButton_ setFrameSize:NSMakeSize(tabStripHeight,
[avatarButton_ setFrameSize:NSMakeSize(sizeSquare, sizeSquare)]; tabStripHeight - 5.0)];
// Actually place the badge *above* |maxY|, by +2 to miss the divider. On // Actually place the badge *above* |maxY|, by +2 to miss the divider. On
// Lion or later, shift the badge left to move it away from the fullscreen // Lion or later, shift the badge left to move it away from the fullscreen
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment