Skip to content

Commit

Permalink
Fixed: toolbar search fields created in IB were cut in half height-wi…
Browse files Browse the repository at this point in the history
…se due to a too small max size.
  • Loading branch information
aljungberg committed Mar 14, 2012
1 parent 2940b5e commit c21d2fd
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Tools/nib2cib/NSToolbarItem.j
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,13 @@ NS_CPToolbarItemIdentifierMap =

[self setView:[aCoder decodeObjectForKey:@"NSToolbarItemView"]];

// A Cappuccino search field is 30 px normally while a Cocoa one is 22.
if ([_view isKindOfClass:CPSearchField] && _maxSize.height == 22.0)
{
_maxSize.height = [_view frameSize].height;
_minSize.height = _maxSize.height;
}

[self setVisibilityPriority:[aCoder decodeIntForKey:@"NSToolbarItemVisibilityPriority"]];
[self setAutovalidates:[aCoder decodeBoolForKey:"NSToolbarItemAutovalidates"]];
}
Expand Down

0 comments on commit c21d2fd

Please sign in to comment.