Skip to content

Commit

Permalink
Further fix for toolbar item sizing.
Browse files Browse the repository at this point in the history
Reviewed by me.
  • Loading branch information
Francisco Ryan Tolmasky I committed Oct 3, 2008
1 parent 5f7514b commit 344d2eb
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions AppKit/CPToolbarItem.j
Expand Up @@ -260,7 +260,21 @@ var _CPToolbarSeparatorItemView = nil;
{
_image = anImage;

// FIXME: We can't keep assuming this.
[_view setImage:anImage];

if (!_image)
return;

var imageSize = [_image size];

if (_minSize.width == 0 && _minSize.height == 0 &&
_maxSize.width == 0 && _maxSize.height == 0 &&
(imageSize.width > 0 || imageSize.height > 0))
{
[self setMinSize:imageSize];
[self setMaxSize:imageSize];
}
}

/*
Expand All @@ -271,6 +285,7 @@ var _CPToolbarSeparatorItemView = nil;
{
_alternateImage = anImage;

// FIXME: We can't keep assuming this.
[_view setAlternateImage:anImage];
}

Expand Down

0 comments on commit 344d2eb

Please sign in to comment.