Bug 575417

Summary: [win32][dark theme] Native and custom drawn table selection have different background.
Product: [Eclipse Project] Platform Reporter: Rolf Theunissen <rolf.theunissen>
Component: SWTAssignee: Platform-SWT-Inbox <platform-swt-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3 CC: niraj.modi
Version: 4.21   
Target Milestone: ---   
Hardware: PC   
OS: Windows 10   
See Also: https://bugs.eclipse.org/bugs/show_bug.cgi?id=576614
Whiteboard:
Bug Depends on: 566280    
Bug Blocks: 577357    

Description Rolf Theunissen CLA 2021-08-15 09:07:51 EDT
Create as followup of Bug 566280.

It seems that the Windows Explorer Darkmode does not have a selection configured for tables, the blueish selection color is the same as when no theme is selected.
Therefore, in dark mode, the selection of the table should be custom drawn always.

One way to trigger that behavior is to add, to the table (e.g. when creating the handle):
   addListener(SWT.EraseItem, e -> {});

This triggers the custom draw, together with the Bug 566280, this draws the grayish selections. It feels to me as a hack though, is there anybody available to make this into high quality code?
Or should we trigger something like this from the SWT/UI CSS theme engine?