Mercurial > dwindows
changeset 1574:ae5e322584cd
Use [NSTableColumn width] method to get header width on Mac instead of frame size.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Sun, 22 Jan 2012 19:02:10 +0000 |
parents | d6e17c8f4de2 |
children | 58ed65820baf |
files | mac/dw.m |
diffstat | 1 files changed, 1 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/mac/dw.m Sun Jan 22 18:46:20 2012 +0000 +++ b/mac/dw.m Sun Jan 22 19:02:10 2012 +0000 @@ -1839,7 +1839,6 @@ -(NSSize)getsize { int cwidth = 0, cheight = 0; - NSSize size = [self frame].size; if(tvcols) { @@ -1850,8 +1849,7 @@ for(z=0;z<colcount;z++) { NSTableColumn *column = [tvcols objectAtIndex:z]; - NSCell *colcell = [column headerCell]; - int width = [colcell cellSize].width; + int width = [column width]; if(rowcount > 0) { @@ -1894,10 +1892,6 @@ } cwidth += 16; cheight += 16; - if(size.width > cwidth) - cwidth = size.width; - if(size.height > cheight) - cheight = size.height; return NSMakeSize(cwidth, cheight); } -(void)optimize