Updating example project to add drag-to-reorder support to the table

This commit is contained in:
Brian William Wolter
2011-08-04 18:52:25 -04:00
parent caa7577ea3
commit 2b977c3e35
3 changed files with 40 additions and 2 deletions
@@ -30,9 +30,18 @@
CGContextRef g;
if((g = TUIGraphicsGetCurrentContext()) != nil){
[NSGraphicsContext setCurrentContext:[NSGraphicsContext graphicsContextWithGraphicsPort:g flipped:FALSE]];
CGContextSetRGBFillColor(g, 0.8, 0.8, 0.8, 1);
CGContextFillRect(g, self.bounds);
NSColor *start = [NSColor colorWithCalibratedRed:0.8 green:0.8 blue:0.8 alpha:1];
NSColor *end = [NSColor colorWithCalibratedRed:0.9 green:0.9 blue:0.9 alpha:1];
NSGradient *gradient = nil;
gradient = [[NSGradient alloc] initWithStartingColor:start endingColor:end];
[gradient drawInRect:self.bounds angle:90];
[gradient release];
[[start shadowWithLevel:0.1] set];
NSRectFill(NSMakeRect(0, 0, self.bounds.size.width, 1));
CGFloat labelHeight = 18;
self.labelRenderer.frame = CGRectMake(15, roundf((self.bounds.size.height - labelHeight) / 2.0), self.bounds.size.width - 30, labelHeight);