Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed layout of variable height views

  • Loading branch information...
commit 8fc9b7f455d8b275eab389b29f5adc1c2d3dc558 1 parent c19c119
Indragie Karunaratne authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 JAListView.m
View
4 JAListView.m
@@ -780,7 +780,8 @@ - (void)standardLayoutAnimated:(BOOL)animated removeViews:(NSArray *)viewsToRemo
for(JAListViewItem *view in viewsToAdd) {
CGFloat y = self.cachedLocations[[self.cachedViews indexOfObject:view]];
- NSRect viewFrame = NSMakeRect(view.ignoresListViewPadding ? 0.0f : self.padding.left, y, view.ignoresListViewPadding ? self.bounds.size.width : self.bounds.size.width - (self.padding.left + self.padding.right), view.bounds.size.height);
+ CGFloat height = [self heightForView:view proposedHeight:view.bounds.size.height];
+ NSRect viewFrame = NSMakeRect(view.ignoresListViewPadding ? 0.0f : self.padding.left, y, view.ignoresListViewPadding ? self.bounds.size.width : self.bounds.size.width - (self.padding.left + self.padding.right), height);
view.frame = NSIntegralRect(viewFrame);
id viewOrProxy = animated ? [self animator] : self;
@@ -793,7 +794,6 @@ - (void)standardLayoutAnimated:(BOOL)animated removeViews:(NSArray *)viewsToRemo
continue;
}
CGFloat y = self.cachedLocations[indexOfView]; //!!!: boom - bad access
-
id viewOrProxy = animated ? [view animator] : view;
[viewOrProxy setFrame:NSMakeRect(view.ignoresListViewPadding ? 0.0f : self.padding.left, y, view.bounds.size.width, view.bounds.size.height)];
}
Please sign in to comment.
Something went wrong with that request. Please try again.