Community
Participate
Working Groups
Eclipse uses Windows based scheme to display Project explorer elements, in dark theme a selected file Background color is not visible when respective tab is not active. As we can colors for git (not commited files) please also add functionality to change colors other than windows scheme.
Possible duplicate or at least related to Bug 562043
Similar to https://bugs.eclipse.org/bugs/show_bug.cgi?id=564822
Hi, i dont see any fix in related bugs for the problem i mentioned. Here is also a link of my question in a fourm with pictures https://stackoverflow.com/questions/62876202/eclipse-2020-06-v4-16-dark-theme-problems-solution-in-css
Bug 562043 should have fixed the root cause that selection was not visible at all. However, the selection is still hardly visible, its a slightly darker background on a already dark background. What work is left here to do?
Yes thats what the problem is if you are working on Java Editor Tab and want to see selected file, its very hardly visible. Window Dark Selection Highlighted Background Color is dark and on already Dark Background of Project Explorer. So either with should have a box as in 2020-05 version or we should have a customization as we have for git colors in Preferences. They also work and same way just highlighted file color Active or Inactive Tab can work. Its just a suggestion as i see colors for Tree Structures are still same in next release so i dont think its fixed. https://git.eclipse.org/r/c/www.eclipse.org/eclipse/news/+/167993. I dont see a picture of Project Explorer Tab Inactive.
The root cause that the selection color is still hardly visible now, is that the color is very close to the (custom) background color used in the Windows Dark theme. However the selection colors can no longer be customized, See Bug 562865. The original Bug 434309 has been reopened. Making the background darker does show the selected items
New Gerrit change created: https://git.eclipse.org/r/c/platform/eclipse.platform.ui/+/168094
(In reply to Eclipse Genie from comment #7) > New Gerrit change created: > https://git.eclipse.org/r/c/platform/eclipse.platform.ui/+/168094 This doesn't make consistency better between Trees and Tables, but that is difficult as the selection color is different in these, see Bug 566280. However, it does increase visibility of the inactive selection in Trees. Furthermore, the background as defined in EGit for changed files is hardcoded too. So there are still some glitches in the colors.
I just want that in black Theme in future version color of Selected file is visible (Active or Inactive Tab) should be visible as its clearly visible in Normal Theme. Blackich on Black Background is not visible. I think linked issues are not exactly mentioning this issue.
Will not push this for 4.17, due to issues left (inconsistency with EGit) and no agreement on the change.
*** Bug 568072 has been marked as a duplicate of this bug. ***
So bug 566280 has to be fixed first before we can get a fix here? Is bug 434309 still somehow dependent?
Sadly 2 version are released and this Bug still exist in dark theme, and its impair the use of Project Explorer.
Created attachment 286437 [details] Problem Image Problem Image
Created attachment 286917 [details] Dark with patch With the attached Gerrit, the dark theme looks broken.
(In reply to Lars Vogel from comment #15) > Created attachment 286917 [details] > Dark with patch > > With the attached Gerrit, the dark theme looks broken. Can you explain what 'broken' means? I see that that tree views have similar looks as the native Dark theme of Windows (i.e. File Explorer). This might not be the preferred way to fix this, but as long as nobody can fix the selection color, changing the background is the only alternative. For me this invisible selection is a blocker to use the dark theme.
(In reply to Rolf Theunissen from comment #16) > (In reply to Lars Vogel from comment #15) > > Created attachment 286917 [details] > > Dark with patch > > > > With the attached Gerrit, the dark theme looks broken. > > Can you explain what 'broken' means? I see that that tree views have similar > looks as the native Dark theme of Windows (i.e. File Explorer). This might > not be the preferred way to fix this, but as long as nobody can fix the > selection color, changing the background is the only alternative. Current dark theme uses a similar color for the editor and the views, with the change the theme uses different colors which looks bad to me. > For me this invisible selection is a blocker to use the dark theme. We could change the hard-coded color to a colors which could be changed via the Colors and Fonts preferences. This way users which find the current selection contrast unacceptable at least change the preference. If yes, see c6ce5643aa4a95e49f5d4029bbe5502312ce8160 in particular bundles/org.eclipse.ui.themes/css/dark/e4-dark_ide_colorextensions.css in which I did that for the tabs.
(In reply to Lars Vogel from comment #17) > (In reply to Rolf Theunissen from comment #16) > > For me this invisible selection is a blocker to use the dark theme. > > We could change the hard-coded color to a colors which could be changed via > the Colors and Fonts preferences. This way users which find the current > selection contrast unacceptable at least change the preference. If yes, see > c6ce5643aa4a95e49f5d4029bbe5502312ce8160 in particular > bundles/org.eclipse.ui.themes/css/dark/e4-dark_ide_colorextensions.css in > which I did that for the tabs. Having a configuration is fine, but sane defaults too. Have a look at the attachment 'Problem Image', contrast in inactive selection is next to zero. SWT currently does not allow to change the (inactive) selection color.
(In reply to Rolf Theunissen from comment #18) > Having a configuration is fine, but sane defaults too. I agree but the suggested color change does not look good (sane) to me. So as a starter we could make the background configurable, which would allow you and others to use the dark theme which hopefully would result in more improvement in the dark theme. WDYT?
Created attachment 286921 [details] example from egit plugin Hi, Guys if Egit plugin as ref can be taken i want to suggest as Eclipse User that it would be best to give user the option to change color of selected file for text and for background and even the Background of this whole Tree Area in Project Explorer. So that User can adjust it as per Color Preference which suits their eyes. Thanks for providing us this greate Java IDE.
Just as a potential clue, this is what we're doing in our product (ColorConstants is our own class). tree.addListener(SWT.EraseItem, (event) -> { if (tree.isFocusControl()) { return; } event.detail &= ~SWT.HOT; if ((event.detail & SWT.SELECTED) == 0) return; /* item not selected */ int clientWidth = tree.getClientArea().width; GC gc = event.gc; gc.setForeground(ColorConstants.getColorByName(ColorConstants.FOREGROUND)); gc.setBackground(ColorConstants.getColorByName(ColorConstants.UNFOCUSED_TREE_SELECTION_COLOR)); gc.fillRectangle(0, event.y, clientWidth, event.height); event.detail &= ~SWT.SELECTED; }); In the past Eclipse did have custom handlers for the drawing of tables and trees in the Platform UI... perhaps we could consider bringing part of that back for only the selection of unfocused trees. We had two reasons for removing the custom drawing (SWT greatly improved dark theme support for win32 and there was an issue/bug where we had blurry text in trees that would appear in certain circumstances). The old drawing code was removed here (https://git.eclipse.org/c/gerrit/platform/eclipse.platform.ui.git/commit/?id=2c89fdd76d5c26e0a1c48e36031a5d0e79a513fe). It could be worth experimenting with only handling selected Tree elements for non-focused Trees.
(In reply to Mike Marchand from comment #21) > In the past Eclipse did have custom handlers for the drawing of tables and > trees in the Platform UI... perhaps we could consider bringing part of that > back for only the selection of unfocused trees. We had two reasons for > removing the custom drawing (SWT greatly improved dark theme support for > win32 and there was an issue/bug where we had blurry text in trees that > would appear in certain circumstances). For information, while messing around in the tree code, I noticed that one of the cases that you get blurry text is when text is drawn both by the default win32 API and the custom drawn. There is a 1px offset between them somewhere, which becomes visible as blurry text.
That's why I think it's safe to try having only the background drawn by the custom drawing. I have only recently made the improvement in our product, but I have not seen a case of blurry text.
Each new Eclipse Release bring a very little on Dark Theme and in my personal opinion Dark Themes in general are more in use now in many IDEs. Eclipse should also fix all small issues on it Dark Theme. Thanks for Providing this great Software just my personal opinion
I have spent one day just to fix this somehow. Tried everything from windows 10 registries to eclipse css files. Could not find any setting that will affect the eclipse project/package/explorer inactive background color for dark theme. This was/is not an issue on windows 7, default dark colors are distinctive (eclipse 3.9, eclipse 4.16). Not having selection visible on inactive tree makes it almost impossible to use dark themes. Please fix or offer a solution (where does this color comes from).