Mercurial > dwindows
comparison mac/dw.m @ 1215:dc8ea09605f7
Can't set the background on Image cells apparently on Mac...
Filter them out for now... may need to switch to using DWImageAndTextCell for those too.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Sun, 09 Oct 2011 10:32:44 +0000 |
parents | 5271d5cb27ac |
children | 67ff39b9577c |
comparison
equal
deleted
inserted
replaced
1214:e16e7c51b6c7 | 1215:dc8ea09605f7 |
---|---|
1591 int index = (int)(row * [tvcols count]); | 1591 int index = (int)(row * [tvcols count]); |
1592 DWImageAndTextCell *browsercell = [data objectAtIndex:index]; | 1592 DWImageAndTextCell *browsercell = [data objectAtIndex:index]; |
1593 NSImage *img = [browsercell image]; | 1593 NSImage *img = [browsercell image]; |
1594 [bcell setImage:img]; | 1594 [bcell setImage:img]; |
1595 } | 1595 } |
1596 /* Handle drawing alternating row colors if enabled */ | 1596 if([cell isKindOfClass:[NSTextFieldCell class]]) |
1597 if ((row % 2) == 0) | 1597 { |
1598 { | 1598 /* Handle drawing alternating row colors if enabled */ |
1599 if(evencolor) | 1599 if ((row % 2) == 0) |
1600 { | 1600 { |
1601 [bcell setDrawsBackground:YES]; | 1601 if(evencolor) |
1602 [bcell setBackgroundColor:evencolor]; | 1602 { |
1603 [bcell setDrawsBackground:YES]; | |
1604 [bcell setBackgroundColor:evencolor]; | |
1605 } | |
1606 else | |
1607 [bcell setDrawsBackground:NO]; | |
1603 } | 1608 } |
1604 else | 1609 else |
1605 [bcell setDrawsBackground:NO]; | 1610 { |
1606 } | 1611 if(oddcolor) |
1607 else | 1612 { |
1608 { | 1613 [bcell setDrawsBackground:YES]; |
1609 if(oddcolor) | 1614 [bcell setBackgroundColor:oddcolor]; |
1610 { | 1615 } |
1611 [bcell setDrawsBackground:YES]; | 1616 else |
1612 [bcell setBackgroundColor:oddcolor]; | 1617 [bcell setDrawsBackground:NO]; |
1613 } | 1618 } |
1614 else | |
1615 [bcell setDrawsBackground:NO]; | |
1616 } | 1619 } |
1617 } | 1620 } |
1618 -(void)editCell:(id)input at:(int)row and:(int)col | 1621 -(void)editCell:(id)input at:(int)row and:(int)col |
1619 { | 1622 { |
1620 if(tvcols && input) | 1623 if(tvcols && input) |