mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-22 20:50:44 +00:00
Merge pull request #319 from johnathan-becker/johnb-fix-textbox
Fix issue with NSCollectionView and single column views
This commit is contained in:
commit
bc53ea0ecf
1 changed files with 5 additions and 2 deletions
|
@ -688,7 +688,7 @@ static NSString *_placeholderItem = nil;
|
|||
NSRect itemFrame = NSMakeRect (0,0,0,0);
|
||||
NSInteger index;
|
||||
NSUInteger count = [_items count];
|
||||
CGFloat x = _horizontalMargin;
|
||||
CGFloat x = 0;
|
||||
CGFloat y = -_itemSize.height;
|
||||
|
||||
if (_maxNumberOfColumns > 0 && _maxNumberOfRows > 0)
|
||||
|
@ -700,7 +700,7 @@ static NSString *_placeholderItem = nil;
|
|||
{
|
||||
if (index % _numberOfColumns == 0)
|
||||
{
|
||||
x = _horizontalMargin;
|
||||
x = 0;
|
||||
y += _verticalMargin + _itemSize.height;
|
||||
}
|
||||
|
||||
|
@ -731,6 +731,9 @@ static NSString *_placeholderItem = nil;
|
|||
|
||||
x += _itemSize.width + _horizontalMargin;
|
||||
}
|
||||
if(_maxNumberOfColumns == 1) {
|
||||
itemFrame.size.width = self.frame.size.width;
|
||||
}
|
||||
return itemFrame;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue