Mercurial > dwindows
comparison os2/dw.c @ 2245:a0c386cd332b
OS/2: Implement missing DW_CLR_DEFAULT support via WinRemovePresParam().
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Tue, 19 Jan 2021 17:29:58 +0000 |
parents | 3e9c5bff0a57 |
children | 15347d28995a |
comparison
equal
deleted
inserted
replaced
2244:a1ac35abd5fd | 2245:a0c386cd332b |
---|---|
5570 { | 5570 { |
5571 fore = _internal_color(fore); | 5571 fore = _internal_color(fore); |
5572 | 5572 |
5573 WinSetPresParam(handle, PP_FOREGROUNDCOLORINDEX, sizeof(ULONG), &fore); | 5573 WinSetPresParam(handle, PP_FOREGROUNDCOLORINDEX, sizeof(ULONG), &fore); |
5574 } | 5574 } |
5575 else if(fore == DW_CLR_DEFAULT) | |
5576 { | |
5577 WinRemovePresParam(handle, PP_FOREGROUNDCOLOR); | |
5578 WinRemovePresParam(handle, PP_FOREGROUNDCOLORINDEX); | |
5579 } | |
5575 /* Handle background */ | 5580 /* Handle background */ |
5576 if(back == DW_RGB_TRANSPARENT) | 5581 if(back == DW_RGB_TRANSPARENT) |
5577 { | 5582 { |
5578 /* Special case for setting transparent */ | 5583 /* Special case for setting transparent */ |
5579 ULONG pcolor; | 5584 ULONG pcolor; |
5604 { | 5609 { |
5605 back = _internal_color(back); | 5610 back = _internal_color(back); |
5606 | 5611 |
5607 WinSetPresParam(handle, PP_BACKGROUNDCOLORINDEX, sizeof(ULONG), &back); | 5612 WinSetPresParam(handle, PP_BACKGROUNDCOLORINDEX, sizeof(ULONG), &back); |
5608 dw_window_set_data(handle, "_dw_transparent", NULL); | 5613 dw_window_set_data(handle, "_dw_transparent", NULL); |
5614 } | |
5615 else if(back == DW_CLR_DEFAULT) | |
5616 { | |
5617 WinRemovePresParam(handle, PP_BACKGROUNDCOLOR); | |
5618 WinRemovePresParam(handle, PP_BACKGROUNDCOLORINDEX); | |
5609 } | 5619 } |
5610 /* If this is a box... check if any of the children are transparent */ | 5620 /* If this is a box... check if any of the children are transparent */ |
5611 _handle_transparent(handle); | 5621 _handle_transparent(handle); |
5612 return DW_ERROR_NONE; | 5622 return DW_ERROR_NONE; |
5613 } | 5623 } |