Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Update with fixes from R. Boucher

  • Loading branch information...
commit 8d9d934b7f91a13e134eae371808e74f64f4ea3b 1 parent 7f4bfc5
Howard M. Lewis Ship authored
9  src/main/webapp/app/TwitView.j
@@ -13,15 +13,14 @@
13 13
     _label = [[CPTextField alloc] initWithFrame:CGRectMakeZero()];
14 14
     [_label setFont:[CPFont systemFontOfSize:12]];
15 15
     [_label setTextColor:[CPColor whiteColor]];
16  
-    [_label setAutoresizingMask:CPViewWidthSizable];
  16
+    [_label setAutoresizingMask:CPViewWidthSizable|CPViewHeightSizable];
  17
+    [_label setFrame:[self bounds]];
  18
+    [_label setLineBreakMode:CPLineBreakByWordWrapping];
  19
+
17 20
     [self addSubview:_label];
18 21
   }
19 22
   
20 23
   [_label setStringValue:obj.text];
21  
-
22  
-  [_label setFrameSize:CGSizeMake(200, 60)];
23  
-  
24  
-  [_label setLineBreakMode:CPLineBreakByWordWrapping];
25 24
 }
26 25
 
27 26
 - (void)setSelected:(BOOL)isSelected
31  src/main/webapp/app/TwitterController.j
@@ -49,7 +49,7 @@
49 49
   [itemPrototype setView:[[TwitView alloc] initWithFrame:CGRectMakeZero()]];
50 50
 
51 51
   _timelineView = [[CPCollectionView alloc] initWithFrame:CGRectMake(0, 0, 
52  
-    CGRectGetWidth(scrollViewBounds), 60)];
  52
+    CGRectGetWidth(scrollViewBounds), 0)];
53 53
   [_timelineView setItemPrototype:itemPrototype];
54 54
   [_timelineView setDelegate:self];
55 55
   [_timelineView setMaxNumberOfColumns:1];
@@ -58,35 +58,17 @@
58 58
     
59 59
   [_scrollView setDocumentView:_timelineView];
60 60
   
61  
-  [[CPNotificationCenter defaultCenter] 
62  
-    addObserver:self 
63  
-    selector:@selector(scrollViewDidResize:)
64  
-    name:CPViewFrameDidChangeNotification 
65  
-    object:_scrollView];
66  
-
67  
-  // Will fire an initial notification because the value changed.
68  
-  [_scrollView setPostsFrameChangedNotifications:YES];
69  
-  
70 61
   [content addSubview:label];
71 62
   [content addSubview:_field];
72 63
   [content addSubview:_scrollView];
73 64
     
  65
+  [_timelineView setMinItemSize:CGSizeMake(200, 50)];
  66
+  [_timelineView setMaxItemSize:CGSizeMake(100000, 50)];
  67
+
74 68
     
75 69
   return self;
76 70
 }
77 71
 
78  
-- (void)scrollViewDidResize:(id)notification
79  
-{
80  
-  var bounds = [_scrollView bounds];
81  
-      
82  
-  CPLog.debug("new size: " + CPRectGetWidth(bounds) + " x " + CPRectGetHeight(bounds));    
83  
-      
84  
-  var newSize = CGSizeMake(CPRectGetWidth(bounds), 60);
85  
-  
86  
-  [_timelineView setMinItemSize:newSize];
87  
-  [_timelineView setMaxItemSize:newSize];
88  
-}
89  
-
90 72
 - (void)show
91 73
 {
92 74
   [_panel orderFront:self];
@@ -117,9 +99,4 @@
117 99
   CPLog.error(error);
118 100
 }
119 101
 
120  
-- (void)adjustTimelineSize
121  
-{
122  
-  
123  
-}
124  
-
125 102
 @end

0 notes on commit 8d9d934

Please sign in to comment.
Something went wrong with that request. Please try again.