Bug 543456 - Table selection background color set via CSS is not respected when table loses focus
Summary: Table selection background color set via CSS is not respected when table lose...
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.11   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-01-15 08:58 EST by Kelsey Steeves CLA
Modified: 2020-04-03 16:34 EDT (History)
1 user (show)

See Also:


Attachments
Screenshot showing the background color on tables/trees (83.29 KB, image/png)
2019-01-15 08:58 EST, Kelsey Steeves CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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.