Mercurial > dwindows
changeset 2192:214e1ea303e2
Mac: Same foreground/text color change for the tree widge.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Thu, 15 Oct 2020 18:14:32 +0000 |
parents | 7331f3c13fd7 |
children | e136e65547bf |
files | mac/dw.m |
diffstat | 1 files changed, 11 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mac/dw.m Thu Oct 15 18:01:15 2020 +0000 +++ b/mac/dw.m Thu Oct 15 18:14:32 2020 +0000 @@ -3174,8 +3174,17 @@ icon = nil; if(view) { - [[view textField] setStringValue: text]; - [[view imageView] setImage:icon]; + NSTextField *tf = [view textField]; + NSImageView *iv = [view imageView]; + + if(tf) + { + [tf setStringValue: text]; + if(fgcolor) + [tf setTextColor:fgcolor]; + } + if(iv) + [iv setImage:icon]; } else view = _dw_table_cell_view_new(icon, text);