-
Notifications
You must be signed in to change notification settings - Fork 118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Highlighting problem when using the dark theme on Windows. #811
Highlighting problem when using the dark theme on Windows. #811
Comments
If this is theme related you might want to report or transfer the issue here - https://github.com/eclipse-platform/eclipse.platform.ui/issues |
Hi @Phillipus I opened it here because another issue which was fixed by a commit that you pointed out to me was fixed by correcting some code in this repository. I suspect that this might be the same problem again but I am not the expert here by any stretch. What should I do, create one also in eclipse-platform, transfer it to eclipse-platform or leave it here? BTW I presume that by "transfer" you mean recreate in other repo and close in this one? |
@Christopher-Hermann if you have time could you have a look at this problem. I apologize if I am breaking etiquette by tagging you. |
Should I create a similar issue in eclipse.platform.ui repo also? I know you guys are just volunteers like me and you work on this in your free time but since I am a newbie I want to make sure that I have done the correct thing so that the correct volunteer can work on it in their free time. If I knew how to test this I would love to try to debug this myself but I am not certain how to do this. If someone had 15 minutes to point me in the right direction I might be able to look at this myself. |
@marioja I experimented with the CSS theme files in Shell Tree {
color: #CCC;
} With this the unfocussed selected Preferences tree text is whiter than the other tree nodes. Perhaps a clue there? |
@Phillipus I tried to test this myself by modifying the same in my .p2 folder: C:\Users\Public.p2\pool\plugins\org.eclipse.ui.themes_1.2.2200.v20230220-0932\css\e4-dark_win.css |
@Christopher-Hermann Good day, thank you for chiming in. This problem is on Windows 10 as indicated in the original post on this issue. Do you have access to Windows 10? Windows 11 may work differently, I have not tested. As I said before, if someone can help me I could help work/test/fix this problem. |
Sorry guys, Eclipse 2023-12 is out and this is still not fixed. Can anyone look into this? I always use dark them and it makes it really hard for my eyes to relate trees to selections. If someone could help me troubleshoot this on windows I am willing to help. I have no knowledge of the code base and I cannot do anything on my own. Ping me at mfj (at) earthling.net and we can connect. |
…tform/eclipse.platform.swt#811 SWT tree is using the OS color for selected items. This color is not accessible on Windows. This change overwrites the default selection color of a tree item with the color defined for the corresponding theme. Fixes eclipse-platform/eclipse.platform.swt#811
As far as I understand the SWT tree control is drawing the selection via the OS. So the OS theme decides about the color of the selection. For example when I change my windows to high contrast mode, we can see that the selection color in the theme matches the selection color in eclipse: Since I only have access to a virtual Windows Server machine with limited configuration possibilities, I cannot manipulate the OS theme. @marioja Maybe you can try to configure your highlight color on your local Windows machine and confirm that this color is used for the selection in eclipse. Here is a description how this can be done: https://learn.microsoft.com/en-us/answers/questions/1193134/how-to-change-the-highlight-color-of-a-selected-de I uploaded a commit where I do overwrite the default selection color with custom defined colors in eclipse, see Christopher-Hermann/eclipse.platform.ui@731c5ac
Maybe someone can comment about my concerns. Currently I don't see a better solution for this issue. |
I will do the test and report back. It would be nice if eclipse could respect the os current color scheme. I am running windows in dark mode and eclipse will use the white mode unless I switch to using the dark theme. On to testing... |
ok, testing result. Unfortunately, with Windows 10 it is never simple. When you set windows to use dark mode so go to settings/colors and you select the Dark under choose your color. Unfortunately, this does not provide you with an option to select different colors for different components such as Selected text. This is only available when using the high contrast mode and when I select that, indeed Eclipse will use the Selected text color in the tree portion. But that is not an option since this problem is related to use case when one is not using high contrast mode. I will try to use your commit. @Christopher-Hermann How do I do this? |
I personally think that your solution for respecting the eclipse dark theme colors in Windows by overriding how the selected text is written is perfectly acceptable. The current implementation of dark theme in Windows at least is totally based independent of the Windows dark mode settings and it should be. A developer should be able to use eclipse dark mode without having to switch to Windows dark mode or even if they switched. One feature in the future could be that if you are running eclipse in a Windows using Light color then eclipse switches to Light theme and if you are using Windows in Dark color then eclipse switches to Dark theme. This again does not mean it would have to use the windows selected text color, it could still override it but just switches the theme based on the windows color. There is still the possibility to have Eclipse use the windows theme colors to set the eclipse theme but that is something else and if we have control over eclipse themes and it works in either windows colors then there is no incentive IMHO. |
To use my commit you need to follow the description on https://github.com/eclipse-platform/.github/blob/main/CONTRIBUTING.md#contributing-to-eclipse-platform More accurate:
|
The problem with my commit is that the selection color is overwritten for all TreeViewers. I assume that this will also overwrite the color in viewers with custom coloring which is not acceptable. We could also change the coloring in the eclipse tree viewer for the preferences, but then we will end up with different colors in different trees which is also a really strange behavior. |
I tried finally your branch, it took me long time to do step 1 and I think if I check out your commit in any eclipse and run an eclipse application it should work without all the rest of the 4G in the platform-sdk folder, but then again, this is all black magic so I am not sure if that is true. When I navigate and the package explorer is active I am not sure I like that blue color. Should be selectable in preference maybe? When I click on the editor tabs, the dark grey highlight in package explorer is quite good: The same color apply in preferences, which is ok. If the bright blue when the tree is active cannot be changed, it is still acceptable. Better if it could be user settable. As for your comment about cusom coloring in other tree viewers maybe there could be a way for other tree viewers to no use these colors. What would those be using currently without your branch. If they behave as the rest of eclipse it is probably as bad. If they do not, well I guess they do not use the theme. Maybe an option is available to other tree viewers to use the theme or use the custom coloring. Or maybe using custom coloring could disable the behaviour you have introduced in your branch. I would love to have your branch in eclipse 2023-12 as soon as possible. |
I'm still testing the change with all kinds of Tree/Table viewers and custom coloring, cell coloring, etc. Up to now it looks quite promising. The only doubt that is left is that the blue color will be very strange for OS that have custom seleection colors, like Ubuntu with orange selection color. Regarding your questions:
P.S.: Thanks for testing the change and providing screenshots on Windows |
I uploaded a new version of my commit with color support on tree viewer and table viewer. Furthermore you can change the colors in the preferences via Colors and Fonts > Basic > Selection ... Here is a code snipped to test the different settings/styles. Could you import this project into your workspace and try it out under Windows? It would also be nice to have some screenshots. To open the test dialog you must: CTRL+3 and search for command "Open Viewer Demo Dialog" I took the same colors as it is done in MacOS. So maybe they are not perfect on Windows, but at least the coding looks promising now. Here is a screenshot how it looks on MacOS: My change was only possible for Table and Tree viewer, so most probably you will still have issues on the list viewer |
I will look at your change. As for 2023-12, please note that I work for a large public sector organization. They are just in the process to move to 2023-12 which includes long awaited enterprise fixes in some IBM plugins. It would be extremely useful to have a back port of this fix in 2023-12 since upgrading follow long release cycles. |
As for the Eclipse IDE, I could see the effect of the Colors and Fonts> Basic> Selection... in the preference dialogs. |
I'm not aware of the Enterprise Explorer view, how can I install this view? |
Part of the java enterprise perspective which comes with Eclipse IDE for Enterprise Java and Web Developers |
Can you share a screenshot? I don't find a "Enterprise Explorer" view in the Eclipse IDE for Enterprise Java and Web Developers. I assume that this view is appiling a custom coloring in the Table/Tree. And as already discussed, it's highly incompatible to overwrite custom coloring. |
Will provide a screen shot later but it will show no highlighting. You need to open the java ee perspective. You can email me at mfj (at) earthling.net and we could chat and discuss if you want. |
Just to be sure - does it happen when using "Project Explorer" ? We have to be 100% sure that it's not a problem in particular view. |
…tform/eclipse.platform.swt#811 JFace viewer are using OS selection color to highlight the selected item. On some OS this is not accessible. With this change, the selection color can be changed via color preference in the settings of eclipse. Fixes eclipse-platform/eclipse.platform.swt#811
@marioja: Can you answer this question? |
Sorry, I forgot. Will report back today |
I don't know what the Project Explorer is. I switched to the Java perspective and the same problem occurs in the package explorer. |
I found out the Project explorer view and tested. The highlighting issue occurs in all three explorers I could find. Enterprise explorer, project explorer and package explorer. @HeikoKlare thanks for your comments. I confirm your findings. I also had mentioned that the highlighting is barely perceptible in my original Sept 20 comment under the heading Problem 2 but thank you for pointing it out. @BeckerWdf @akurtakov is there anything else that you require to work on this? Also, could this be ported to Eclipse 2023-12 for the reasons I mentioned in my December 29 posts? |
Thanks a lot to @Christopher-Hermann for your PR to fix this highlighting problem in Windows including the Windows on Arm64. I've built my own Eclipse SDK (for 2024-06) for Windows on Arm64 with your fix, and it works nicely. @marioja have you gotten the fix to work with your Eclipse 2023-12 installation? I think you can rebuild the |
…tform/eclipse.platform.swt#811 JFace viewer are using OS selection color to highlight the selected item. On some OS this is not accessible. With this change, the selection color can be changed via color preference in the settings of eclipse. Fixes eclipse-platform/eclipse.platform.swt#811
…tform/eclipse.platform.swt#811 JFace viewer are using OS selection color to highlight the selected item. On some OS this is not accessible. With this change, the selection color can be changed via color preference in the settings of eclipse. Fixes eclipse-platform/eclipse.platform.swt#811
…tform/eclipse.platform.swt#811 JFace viewer are using OS selection color to highlight the selected item. On some OS this is not accessible. With this change, the selection color can be changed via color preference in the settings of eclipse. Fixes eclipse-platform/eclipse.platform.swt#811
…tform/eclipse.platform.swt#811 JFace viewer are using OS selection color to highlight the selected item. On some OS this is not accessible. With this change, the selection color can be changed via color preference in the settings of eclipse. Fixes eclipse-platform/eclipse.platform.swt#811
…tform/eclipse.platform.swt#811 JFace viewer are using OS selection color to highlight the selected item. On some OS this is not accessible. With this change, the selection color can be changed via color preference in the settings of eclipse. Fixes eclipse-platform/eclipse.platform.swt#811
…tform/eclipse.platform.swt#811 JFace viewer are using OS selection color to highlight the selected item. On some OS this is not accessible. With this change, the selection color can be changed via color preference in the settings of eclipse. Fixes eclipse-platform/eclipse.platform.swt#811
…tform/eclipse.platform.swt#811 JFace viewer are using OS selection color to highlight the selected item. On some OS this is not accessible. With this change, the selection color can be changed via color preference in the settings of eclipse. Fixes eclipse-platform/eclipse.platform.swt#811
…tform/eclipse.platform.swt#811 JFace viewer are using OS selection color to highlight the selected item. On some OS this is not accessible. With this change, the selection color can be changed via color preference in the settings of eclipse. Fixes eclipse-platform/eclipse.platform.swt#811
Describe the bug
Highlighting problem when clicking between the left tree view and the right page in the Eclipse preference pages when using the dark theme.
To Reproduce
When using the Eclipse preferences dialog with the dark theme, the current preference in the left tree selection pane is not visible as soon as an item is selected in the right hand side preferences pane (problem-1). If I click back on the left tree selection item for the current preference page, then the selection of the current setting in the right hand window is no longer visible(problem-2). I will attach a screen shot of both problems. This does not happen with the Eclipse Classic theme and you can use that theme to see how things should work.
Expected behavior
I expect the left tree to always highlight the node when working on the right hand pane. I expect the current item in the right hand pane to remain highlighted when I click back on the node in the left tree.
Screenshots
Problem-1: You cannot notice that the current item in the tree is 'Keys'
Problem-2: You cannot notice that the current key settings in the right is Add Attribute to XML (or it is barely noticeable)
Environment:
Windows 10
JDK 17
Version since
Eclipse 2023-09 (noticed in Eclipse 2023-03)
Workaround (or) Additional context
This problem also happens between the Enterprise Explorer and the editor tabs in the Java EE Perspective.
The text was updated successfully, but these errors were encountered: