public
Fork of Caged/gitnub
Description: A Gitk-like application written in RubyCocoa that looks like it belongs on a Mac. See the wiki for downloads and screenshots.
Homepage: http://alternateidea.com
Clone URL: git://github.com/jduff/gitnub.git
Search Repo:
Fix title color for cells drawn in the expansion frame
kballard (author)
Fri Mar 21 21:15:42 -0700 2008
commit  70faea0353c939f75faf5b8cb7f6c17ac98bc572
tree    6211a0a7a7685bb770801519b291a8511136a56e
parent  fb8340316fca8690e7a18f112d300a8783f70b45
...
110
111
112
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
113
...
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
0
@@ -110,5 +110,22 @@
0
     [subtitleCell drawInteriorWithFrame:[self subtitleRectForBounds:cellFrame] inView:view];
0
     [gravatarCell drawInteriorWithFrame:[self gravatarRectForBounds:cellFrame] inView:view];
0
 }
0
+
0
+- (void)drawWithExpansionFrame:(NSRect)cellFrame inView:(NSView *)view {
0
+ // oddly, the title cell seems to end up with an attributed string when selected
0
+ // so lets fix that
0
+ NSColor *titleColor = [titleCell textColor];
0
+ NSColor *subtitleColor = [subtitleCell textColor];
0
+ NSAttributedString *titleAttStr = [titleCell attributedStringValue];
0
+ if (titleAttStr)
0
+ [titleCell setStringValue:[titleAttStr string]];
0
+ [titleCell setTextColor:[NSColor blackColor]];
0
+ [subtitleCell setTextColor:[NSColor blackColor]];
0
+ [self drawWithFrame:cellFrame inView:view];
0
+ if (titleAttStr)
0
+ [titleCell setAttributedStringValue:titleAttStr];
0
+ [titleCell setTextColor:titleColor];
0
+ [subtitleCell setTextColor:subtitleColor];
0
+}
0
 @end
...
98
99
100
101
 
102
103
104
...
98
99
100
 
101
102
103
104
0
@@ -98,7 +98,7 @@
0
   end
0
   
0
   def tableView_objectValueForTableColumn_row(table_view, table_column, row)
0
- @commits[row].message.split(/\n/).first.to_s
0
+ @commits[row].message.split(/\n/, 2).first.to_s
0
   end
0
   
0
   objc_method :tableView_willDisplayCell_forTableColumn_row, 'v@:@@@i'

Comments

    No one has commented yet.