Reputation: 95
I have been struggling with Eclipse look and feel on Linux (Manjaro 18rc) with GNOME as DM. On every dark theme applied to GNOME, other than Adwaita (the light verison) Eclipse UI does not look good/appealing (see image below).
I kind of know why it does that, my request is an method to solve that.
So far I have tried to modify the .desktop file, but to no avail.
More so, as an irrelevant detail, solving this problem may be a start for another UI problem, an different IDE based upon Eclipse (Xilinx SDK).
Upvotes: 0
Views: 2811
Reputation: 1885
In the last days I run in different problems with my Linux Mint 21. I use the dark system for complete desktop means my desktop is also in dark mode.
Eclipse in dark theme (no matter which version) worked pretty well a long time but did suddenly make big coloring problems.
I do not use any additional dark theme plugins, the screenshot is from a 2024-06 Eclipse Java IDE version.
First I thought it was because I used a newer eclipse version - but I tested with older versions and the problem (in different workspaces, different setups) did always appear - here an example:
Of course I tried to fix this via appearance preference settings. Somehow this worked, but after a restart of eclipse (again different versions, different workspaces) I still had the same coloring issues again and again (extreme annoying...).
After thinking about the situation I came to the clue, that there must be an OS/GTK issue or something else which disturbs the settings globally on my machine.
I had no UI updates on my OS, so I checked the filesystem and found following folder:
~/.eclipse/
Inside the folder I found subfolders starting with org.eclipse
.
I decided to do following (which fixed my problem):
Delete every subfolder starting with org.eclipse
. inside ~/.eclipse/
After this I started my different eclipse versions (and workspaces) and the coloring problem did not exist any longer, everything worked as expected:
At least for me this fixed the complete problem. Remark: I do NOT use preference store mechanism, so normally everything should be workspace specific for my setups - I don't know why something was stored globally.
Upvotes: 0
Reputation: 319
Two years later I am running into the same problem. In my installation of Eclipse, it is obviously using colors from my GNOME theme and unfortunately the editor is barely legible. Setting the theme through the Appearance settings does not overwrite anything.
I found the following works to force Eclipse to use the default theme at start-up:
GTK_THEME=Adwaita ./eclipse
If you want to use the dark variant:
GTK_THEME=Adwaita:dark ./eclipse
The only thing that remained problematic was the javadoc background. Hovering over a Java element would bring out a solid black box (black background with black text foreground). Luckily this setting was able to be changed through Preferences > General > Appearance > Colors and Fonts > Java > Javadoc background.
What that means is that if you run into smaller color and UI issues after setting a theme through GTK_THEME, try manipulating the colors of individual elements in Preferences.
Upvotes: 0
Reputation: 66
You can easily change the theme through the Eclipse preferences by: Preferences > General > Appearance. Inside the Appearance menu should be a place where you can change the theme.
Upvotes: 1