Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 377149

Summary: Impossible to use white color as a background color in the ViewerCell of a TreeViewer
Product: [Eclipse Project] Platform Reporter: Julien Gouesse <gouessej>
Component: SWTAssignee: Platform-SWT-Inbox <platform-swt-inbox>
Status: RESOLVED WORKSFORME QA Contact:
Severity: normal    
Priority: P3 CC: ericwill, gouessej
Version: 3.7.1Keywords: triaged
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Julien Gouesse CLA 2012-04-19 03:58:13 EDT
Build Identifier: Version: 3.7.1 Build id: M20110909-1335

It is possible to modify the background color of the cells in a TreeViewer by several ways in its label provider:
- Override StyledCellLabelProvider.update(ViewerCell) and use ViewerCell.setBackground(Color)
- Implements the interface ITableColorProvider or IColorProvider

However, when using white (255, 255, 255) returned by Display.getSystemColor(SWT.WHITE), it does not work, the background is modified only for a few cells. This bug is reproducible with TableViewer too. The only workaround I found consists in using even a slightly different color (254, 254, 254).

Reproducible: Always

Steps to Reproduce:
1. Create a TreeViewer
2. Set its label provider so that it overrides StyledCellLabelProvider.update(ViewerCell) and sets the background color of the cell to Display.getDefault().getSystemColor(SWT.WHITE)
3. Add some input into this tree viewer
Comment 1 Eric Williams CLA 2018-04-13 15:32:22 EDT
Is this still reproducible?
Comment 2 Eric Williams CLA 2018-05-02 14:08:49 EDT
(In reply to Eric Williams from comment #1)
> Is this still reproducible?

Closing this ticket. Please file a new bug if the issue reproduces on 4.8 and GTK3.22.