<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>.gitignore</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -107,6 +107,7 @@ static const CGFloat kMaxCaptionHeight = 100;
   
   if (!_photo.size.width) {
     _photo.size = image.size;
+    [self.superview setNeedsLayout];
   }
 }
 </diff>
      <filename>src/TTPhotoView.m</filename>
    </modified>
    <modified>
      <diff>@@ -5,13 +5,14 @@
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
 static CGFloat kSpacing = 4;
-static CGFloat kThumbSize = 75;
+static CGFloat kDefaultThumbSize = 75;
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
 @implementation TTThumbsTableViewCell
 
-@synthesize delegate = _delegate, photo = _photo;
+@synthesize delegate = _delegate, photo = _photo, thumbSize = _thumbSize,
+           thumbOrigin = _thumbOrigin;
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 // private
@@ -43,6 +44,21 @@ static CGFloat kThumbSize = 75;
   [_delegate thumbsTableViewCell:self didSelectPhoto:photo];
 }
 
+- (void)layoutThumbViews {
+  CGRect thumbFrame = CGRectMake(self.thumbOrigin.x, self.thumbOrigin.y,
+                                 self.thumbSize, self.thumbSize);
+  _thumbView1.frame = thumbFrame;
+  
+  thumbFrame.origin.x = self.thumbOrigin.x + kSpacing + self.thumbSize;
+  _thumbView2.frame = thumbFrame;
+  
+  thumbFrame.origin.x = self.thumbOrigin.x + 2*kSpacing + 2*self.thumbSize;
+  _thumbView3.frame = thumbFrame;
+  
+  thumbFrame.origin.x = self.thumbOrigin.x + 3*kSpacing + 3*self.thumbSize;
+  _thumbView4.frame = thumbFrame;
+}
+
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 // NSObject
 
@@ -50,26 +66,25 @@ static CGFloat kThumbSize = 75;
   if (self = [super initWithFrame:frame reuseIdentifier:identifier]) {
     _photo = nil;
     _delegate = nil;
-    _thumbView1 = [[TTThumbView alloc]
-      initWithFrame:CGRectMake(kSpacing, 0, kThumbSize, kThumbSize)];
+    _thumbSize = kDefaultThumbSize;
+    _thumbOrigin = CGPointMake(kSpacing, 0);
+
+    _thumbView1 = [[TTThumbView alloc] initWithFrame:CGRectZero];
     [_thumbView1 addTarget:self action:@selector(thumbTouched:)
       forControlEvents:UIControlEventTouchUpInside];
     [self.contentView addSubview:_thumbView1];
 
-    _thumbView2 = [[TTThumbView alloc]
-      initWithFrame:CGRectMake(kSpacing*2+kThumbSize, 0, kThumbSize, kThumbSize)];
+    _thumbView2 = [[TTThumbView alloc] initWithFrame:CGRectZero];
     [_thumbView2 addTarget:self action:@selector(thumbTouched:)
       forControlEvents:UIControlEventTouchUpInside];
     [self.contentView addSubview:_thumbView2];
 
-    _thumbView3 = [[TTThumbView alloc]
-      initWithFrame:CGRectMake(kSpacing*3+kThumbSize*2, 0, kThumbSize, kThumbSize)];
+    _thumbView3 = [[TTThumbView alloc] initWithFrame:CGRectZero];
     [_thumbView3 addTarget:self action:@selector(thumbTouched:)
       forControlEvents:UIControlEventTouchUpInside];
     [self.contentView addSubview:_thumbView3];
 
-    _thumbView4 = [[TTThumbView alloc]
-      initWithFrame:CGRectMake(kSpacing*4+kThumbSize*3, 0, kThumbSize, kThumbSize)];
+    _thumbView4 = [[TTThumbView alloc] initWithFrame:CGRectZero];
     [_thumbView4 addTarget:self action:@selector(thumbTouched:)
       forControlEvents:UIControlEventTouchUpInside];
     [self.contentView addSubview:_thumbView4];
@@ -90,6 +105,14 @@ static CGFloat kThumbSize = 75;
 }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
+// UIView
+
+- (void)layoutSubviews {
+  [super layoutSubviews];
+  [self layoutThumbViews];
+}
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
 // TTTableViewCell
 
 - (id)object {
@@ -103,6 +126,16 @@ static CGFloat kThumbSize = 75;
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 // public
 
+- (void)setThumbSize:(CGFloat)thumbSize {
+  _thumbSize = thumbSize;
+  [self setNeedsLayout];
+}
+
+- (void)setThumbOrigin:(CGPoint)thumbOrigin {
+  _thumbOrigin = thumbOrigin;
+  [self setNeedsLayout];  
+}
+
 - (void)setPhoto:(id&lt;TTPhoto&gt;)photo {
   if (_photo != photo) {
     [_photo release];</diff>
      <filename>src/TTThumbsTableViewCell.m</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,5 @@
 #import &quot;Three20/TTThumbsViewController.h&quot;
 #import &quot;Three20/TTPhotoViewController.h&quot;
-#import &quot;Three20/TTPhotoSource.h&quot;
 #import &quot;Three20/TTURLRequest.h&quot;
 #import &quot;Three20/TTUnclippedView.h&quot;
 #import &quot;Three20/TTTableField.h&quot;
@@ -15,15 +14,6 @@ static CGFloat kThumbnailRowHeight = 79;
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-@interface TTThumbsDataSource : TTDataSource
-          &lt;TTPhotoSourceDelegate, TTThumbsTableViewCellDelegate&gt; {
-  TTThumbsViewController* _controller;
-}
-
-- (id)initWithController:(TTThumbsViewController*)controller;
-
-@end
-
 @implementation TTThumbsDataSource
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////</diff>
      <filename>src/TTThumbsViewController.m</filename>
    </modified>
    <modified>
      <diff>@@ -10,10 +10,14 @@
   TTThumbView* _thumbView2;
   TTThumbView* _thumbView3;
   TTThumbView* _thumbView4;
+  CGFloat _thumbSize;
+  CGPoint _thumbOrigin;
 }
 
 @property(nonatomic,retain) id&lt;TTPhoto&gt; photo;
 @property(nonatomic,assign) id&lt;TTThumbsTableViewCellDelegate&gt; delegate;
+@property(nonatomic) CGFloat thumbSize;
+@property(nonatomic) CGPoint thumbOrigin;
 
 - (void)suspendLoading:(BOOL)suspended;
 </diff>
      <filename>src/Three20/TTThumbsTableViewCell.h</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,6 @@
 #import &quot;Three20/TTTableViewController.h&quot;
 #import &quot;Three20/TTThumbsTableViewCell.h&quot;
+#import &quot;Three20/TTPhotoSource.h&quot;
 
 @protocol TTThumbsViewControllerDelegate, TTPhotoSource;
 @class TTPhotoViewController;
@@ -16,6 +17,19 @@
 
 @end
 
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+@interface TTThumbsDataSource : TTDataSource
+          &lt;TTPhotoSourceDelegate, TTThumbsTableViewCellDelegate&gt; {
+  TTThumbsViewController* _controller;
+}
+
+- (id)initWithController:(TTThumbsViewController*)controller;
+
+@end
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
 @protocol TTThumbsViewControllerDelegate &lt;NSObject&gt;
 
 - (void)thumbsViewController:(TTThumbsViewController*)controller didSelectPhoto:(id&lt;TTPhoto&gt;)photo;</diff>
      <filename>src/Three20/TTThumbsViewController.h</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>6724100917903b63d708a6b8dc9555f0f174a014</id>
    </parent>
  </parents>
  <author>
    <name>Joe Hewitt</name>
    <email>joe@joehewitt.com</email>
  </author>
  <url>http://github.com/timburks/three20/commit/85caca23093d781fe1badb46b6eaa90398d4a389</url>
  <id>85caca23093d781fe1badb46b6eaa90398d4a389</id>
  <committed-date>2009-04-18T03:12:41-07:00</committed-date>
  <authored-date>2009-04-18T03:12:41-07:00</authored-date>
  <message>* Merging a bunch of changes from dougbarth. Thanks, Doug!</message>
  <tree>a4800966302fa4965b3295519d3d70953b68e8f5</tree>
  <committer>
    <name>Joe Hewitt</name>
    <email>joe@joehewitt.com</email>
  </committer>
</commit>
