# HG changeset patch # User bsmith@81767d24-ef19-dc11-ae90-00e081727c95 # Date 1602637581 0 # Node ID c7713d96e5a9963b0003d9d4d475a9b2fbaf81be # Parent 3bb5a74b42314895ae567bf01caf695f1c7473ff Mac: Copy text alignment from the table column to the cell's text field. diff -r 3bb5a74b4231 -r c7713d96e5a9 mac/dw.m --- 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];