-
Notifications
You must be signed in to change notification settings - Fork 216
Description
Describe the bug
Tree widgets across multiple Eclipse views do not properly render selection highlighting in dark theme mode. This issue affects various Eclipse trees including the Preference Dialog tree, Import wizards, Breakpoints view, and other views - but notably NOT the Project Explorer which renders correctly. When items are selected in these affected trees, the selection background and foreground colors do not adapt to dark theme, resulting in poor visibility and contrast issues. A custom workaround was to manually override the SWT.EraseItem event and repaint selections with appropriate colors for dark themes. This issue also happens in S32Ds.
To Reproduce
Steps to reproduce the behavior:
Enable dark theme in Eclipse (Window -> Preferences -> General -> Appearance -> Theme -> Select "Dark")
Open any of the following:
Preferences dialog (Window -> Preferences) - click items in the left tree
Import wizard (File -> Import) - click items in the import source tree
Breakpoints view (Window -> Show View -> Debug -> Breakpoints) - select breakpoints in the tree
Click on any item in these "Tree" widgets
Observe that selected items have poor contrast/visibility with incorrect selection colors that don't match the dark theme
Compare with Project Explorer tree selection which renders correctly with proper dark theme colors
Expected behavior
All tree widget selections should automatically adapt to the current theme consistently across Eclipse. In dark theme:
Selected items should have a clearly visible selection background (similar to Project Explorer's selection rendering)
Selected text should be white or light colored for proper contrast
The selection rendering should be consistent across ALL tree widgets in Eclipse, not just Project Explorer
Screenshots
Version Information:
OS and OS Version/extra details: Windows 10
Eclipse Version 2023-12
Additional context
This appears to be a systemic issue with tree widget theming in Eclipse/SWT/JFace. A workaround found: define a hook to intercept the design for the widget, erase its style with an eraseListener and redraw the proper layout, but this is only a workaround as it is not entirely optimal and can slow down the process.