# HG changeset patch # User bsmith@81767d24-ef19-dc11-ae90-00e081727c95 # Date 1564183254 0 # Node ID 80f6be39b7fe670a64a58c5b95983fa307212e5e # Parent 50c71474709b9ddb22d6d5b5fce23985e42af9c6 Mac: Miscellaneous container/listox fixes. Add a single pixel to the column width during optimization, to prevent cases of abbreviating the column. During _cont_new() which is used by both containers and listboxes force the striping to be disabled initially. Automatically optimize the column sizes of listboxes when adding or deleting contents. diff -r 50c71474709b -r 80f6be39b7fe mac/dw.m --- a/mac/dw.m Fri Jul 26 21:54:14 2019 +0000 +++ b/mac/dw.m Fri Jul 26 23:20:54 2019 +0000 @@ -2618,12 +2618,13 @@ /* Sanity check... don't set the width to 0 */ if(width) { - [column setWidth:width]; + [column setWidth:width+1]; } } else { - [column sizeToFit]; + if(self.headerView) + [column sizeToFit]; } } } @@ -5356,6 +5357,7 @@ [scrollview setDocumentView:cont]; [cont setTag:cid]; [cont autorelease]; + [cont setRowBgOdd:DW_RGB_TRANSPARENT andEven:DW_RGB_TRANSPARENT]; return cont; } @@ -5409,10 +5411,8 @@ NSArray *newrow = [NSArray arrayWithObject:nstr]; [cont addRow:newrow]; - /*[cont performSelectorOnMainThread:@selector(addRow:) - withObject:newrow - waitUntilDone:YES];*/ [cont reloadData]; + [cont optimize]; [cont setNeedsDisplay:YES]; } DW_FUNCTION_RETURN_NOTHING; @@ -5447,6 +5447,7 @@ [cont insertRow:newrow at:pos]; [cont reloadData]; + [cont optimize]; [cont setNeedsDisplay:YES]; } DW_FUNCTION_RETURN_NOTHING; @@ -5490,6 +5491,7 @@ [cont addRow:newrow]; } [cont reloadData]; + [cont optimize]; [cont setNeedsDisplay:YES]; } DW_FUNCTION_RETURN_NOTHING; @@ -5669,6 +5671,7 @@ [cont editCell:nstr at:index and:0]; [cont reloadData]; + [cont optimize]; [cont setNeedsDisplay:YES]; } }