Mercurial > dwindows
comparison mac/dw.m @ 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 |
comparison
equal
deleted
inserted
replaced
2191:7331f3c13fd7 | 2192:214e1ea303e2 |
---|---|
3172 NSString *text = [this objectAtIndex:1]; | 3172 NSString *text = [this objectAtIndex:1]; |
3173 if(![icon isKindOfClass:[NSImage class]]) | 3173 if(![icon isKindOfClass:[NSImage class]]) |
3174 icon = nil; | 3174 icon = nil; |
3175 if(view) | 3175 if(view) |
3176 { | 3176 { |
3177 [[view textField] setStringValue: text]; | 3177 NSTextField *tf = [view textField]; |
3178 [[view imageView] setImage:icon]; | 3178 NSImageView *iv = [view imageView]; |
3179 | |
3180 if(tf) | |
3181 { | |
3182 [tf setStringValue: text]; | |
3183 if(fgcolor) | |
3184 [tf setTextColor:fgcolor]; | |
3185 } | |
3186 if(iv) | |
3187 [iv setImage:icon]; | |
3179 } | 3188 } |
3180 else | 3189 else |
3181 view = _dw_table_cell_view_new(icon, text); | 3190 view = _dw_table_cell_view_new(icon, text); |
3182 } | 3191 } |
3183 _dw_table_cell_view_layout(view); | 3192 _dw_table_cell_view_layout(view); |