Bug 543456

Summary: Table selection background color set via CSS is not respected when table loses focus
Product: [Eclipse Project] Platform Reporter: Kelsey Steeves <ksteeves>
Component: SWTAssignee: Platform-SWT-Inbox <platform-swt-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3 CC: pyvesdev
Version: 4.11   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Screenshot showing the background color on tables/trees none

Description Kelsey Steeves CLA 2019-01-15 08:58:53 EST
Created attachment 277158 [details]
Screenshot showing the background color on tables/trees

To reproduce, I added this to my theme's CSS:

Table {
    swt-selection-background-color: #FF0000;
    swt-selection-foreground-color: #000000;
    swt-selection-border-color: #000000;
}

Tree {
    swt-selection-background-color: #FF0000;
    swt-selection-foreground-color: #000000;
    swt-selection-border-color: #000000;
}

The selection background color is working as expected for Trees, but for Tables there appears to be a light grey background drawn over the desired red background if you follow these steps: 

1) Add the above CSS to the active theme
2) Select an item in a Table and note that the selection appears to be themed correctly
3) Click in a different Table/Tree, the background color from the selection in step 2 now looks grey. 

If you adjust the columns so there is an empty column at the end of the table, you'll see that the empty column always has the correct background color. 

Seen on macOS 10.14, Eclipse version 2018-12
Comment 1 Pierre-Yves Bigourdan CLA 2020-04-03 16:33:58 EDT
This is not macOS-specific, I can reproduce in Windows as well.

Additionally, the item that has lost focus can be hovered over, and the hover color is the system default rather than any of the user-defined CSS colors.