Mercurial > dwindows
comparison mac/dw.m @ 2191:7331f3c13fd7
Mac: Copy text color to the NSTabelCellView's text field from the container.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Thu, 15 Oct 2020 18:01:15 +0000 |
parents | 4cb258fb6729 |
children | 214e1ea303e2 |
comparison
equal
deleted
inserted
replaced
2190:4cb258fb6729 | 2191:7331f3c13fd7 |
---|---|
2639 NSTableCellView *result = celldata; | 2639 NSTableCellView *result = celldata; |
2640 NSTextAlignment align = [[tableColumn headerCell] alignment]; | 2640 NSTextAlignment align = [[tableColumn headerCell] alignment]; |
2641 | 2641 |
2642 _dw_table_cell_view_layout(result); | 2642 _dw_table_cell_view_layout(result); |
2643 | 2643 |
2644 /* Copy the alignment setting from the column */ | 2644 /* Copy the alignment setting from the column, |
2645 * and set the text color from the container. | |
2646 */ | |
2645 if([result textField]) | 2647 if([result textField]) |
2646 [[result textField] setAlignment:align]; | 2648 { |
2649 NSTextField *tf = [result textField]; | |
2650 | |
2651 [tf setAlignment:align]; | |
2652 if(fgcolor) | |
2653 [tf setTextColor:fgcolor]; | |
2654 } | |
2647 | 2655 |
2648 /* Return the result */ | 2656 /* Return the result */ |
2649 return result; | 2657 return result; |
2650 } | 2658 } |
2651 return nil; | 2659 return nil; |