Permalink
Browse files

Little layout change

  • Loading branch information...
indragie committed Nov 26, 2011
1 parent 886e887 commit 098114b16c1231d09a9af903a0fcbea54d61c9e6
Showing with 3 additions and 8 deletions.
  1. +3 −8 BCCollectionViewLayoutOperation.m
@@ -16,20 +16,15 @@ - (void)main
return;
NSInteger numberOfRows = 0;
- NSInteger startingX = 0;
- NSInteger x = 0;
NSInteger y = 0;
NSUInteger colIndex = 0;
NSRect visibleRect = [collectionView visibleRect];
NSSize cellSize = [collectionView cellSize];
NSSize inset = NSZeroSize;
NSInteger maxColumns = [[collectionView layoutManager] maximumNumberOfItemsPerRow];
- NSUInteger gap = (NSWidth([collectionView frame]) - maxColumns*cellSize.width)/(maxColumns-1);
- if (maxColumns < 4) {
- gap = (NSWidth([collectionView frame]) - maxColumns*cellSize.width)/(maxColumns+1);
- startingX = gap;
- x = gap;
- }
+ NSUInteger gap = (NSWidth([collectionView frame]) - maxColumns*cellSize.width)/(maxColumns+1);
+ NSInteger startingX = gap;
+ NSInteger x = gap;
if ([[collectionView delegate] respondsToSelector:@selector(insetMarginForSelectingItemsInCollectionView:)])
inset = [[collectionView delegate] insetMarginForSelectingItemsInCollectionView:collectionView];

0 comments on commit 098114b

Please sign in to comment.