Mercurial > dwindows
changeset 2183:c7713d96e5a9
Mac: Copy text alignment from the table column to the cell's text field.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Wed, 14 Oct 2020 01:06:21 +0000 |
parents | 3bb5a74b4231 |
children | 8f9a44279ff0 |
files | mac/dw.m |
diffstat | 1 files changed, 11 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mac/dw.m Tue Oct 13 07:51:24 2020 +0000 +++ b/mac/dw.m Wed Oct 14 01:06:21 2020 +0000 @@ -2641,9 +2641,14 @@ if([celldata isMemberOfClass:[NSTableCellView class]]) { NSTableCellView *result = celldata; - + NSTextAlignment align = [[tableColumn headerCell] alignment]; + _dw_table_cell_view_layout(result); - + + /* Copy the alignment setting from the column */ + if([result textField]) + [[result textField] setAlignment:align]; + /* Return the result */ return result; } @@ -7551,12 +7556,16 @@ /* Defaults to left justified so just handle right and center */ if(flags[z] & DW_CFA_RIGHT) { +#ifndef BUILDING_FOR_YOSEMITE [(NSCell *)[column dataCell] setAlignment:DWTextAlignmentRight]; +#endif [(NSCell *)[column headerCell] setAlignment:DWTextAlignmentRight]; } else if(flags[z] & DW_CFA_CENTER) { +#ifndef BUILDING_FOR_YOSEMITE [(NSCell *)[column dataCell] setAlignment:DWTextAlignmentCenter]; +#endif [(NSCell *)[column headerCell] setAlignment:DWTextAlignmentCenter]; } [column setEditable:NO];