11

Eclipse Luna offers a dark color theme.

It's supposed to look like this:

Target image.

On my system, it comes out like this:

Actual result.

Here's what I did:

  1. Open Eclipse.
  2. In Window → Preferences, set Appearance → Theme to Dark.
  3. Close Eclipse. Restart OS. Open Eclipse.

This is a pretty fresh Linux Mint 17 Cinnamon 64-bit install.

I don't want to have to install the Eclipse color theme plugin. This should work out of the box.

Unlike others, my text field is fine, but my chrome is off. How can I fix this?

Community
  • 1
  • 1
wchargin
  • 15,589
  • 12
  • 71
  • 110

5 Answers5

8

I'm using Mint 17 and I had to do four things after switching to Luna's dark theme do get it to look nice.

First I installed all gtk theme engines the repository got.

sudo apt-get install gtk2-engines-* gtk3-engines*

Second install a dark theme (Menu -> System Settings -> Themes), I choose 'Midnight'.

Third, I had to change some gtk settings under the 'Other settings' tab. For 'Controls' I choose 'Xfce-dusk' and 'Window borders' 'nightfall'. These settings might not be available if you don't install the gtk engines.

Fourth, in Eclipse I installed 'Eclipse Color Theme 0.14' from Eclipse Market place and choose 'Sublime Text 2'.

The result is rather striking, IMHO.

Johan Groth
  • 81
  • 1
  • 6
  • I installed Eclipse Luna, Color Themes plugin and chose Oblivion. I don't see the "other settings" tab. Where can I find this? I'm on Ubuntu 14.04. – SPRBRN Nov 30 '14 at 21:25
  • worked nicely on linux mint with cinnamon 2.4.8.Thanks. – Thupten Apr 21 '15 at 17:19
  • Works like a charm on Ubuntu 14.04. @SPRBRN: the other settings are located in your systems themes settings (not eclipse settings). – japanitrat Jan 28 '16 at 12:15
2

You may also have to change the desktop theme (some of the OS-level controls like scrollbars... are not CSS-able by us)...

Eric Moffatt
  • 257
  • 1
  • 4
  • Thanks for providing answers here, appreciated. – Maarten Bodewes Aug 30 '14 at 00:36
  • To fix the scrollbars... Here is what the Exec line in my ~/.local/share/applications/eclipse.desktop looks like (for eclipse 4.5): ```Exec=env UBUNTU_MENUPROXY=0 SWT_GTK3=0 GTK2_RC_FILES=/opt/eclipse/gtkrc /opt/eclipse/eclipse``` The combination of SWT_GTK3=0 and addition of the gtkrc file (I just used some existing old GTK2 dark theme there). – Greg Kramida Jul 06 '15 at 14:10
2

Try to set the gtk3 env variable to 0, to start Eclipse in gtk2 compatible mode:

#!/bin/bash
export SWT_GTK3=0
./eclipse

(anyway, currently scrollbars are not stylable by SWT/CSS in any OS, but buttons and toobars should look good, especially on linux)

guari
  • 3,715
  • 3
  • 28
  • 25
  • 1
    Thanks for your answer (though maybe give credit [where it is due](http://blog.vogella.com/2014/02/21/using-eclipse-luna-on-ubunbu/)?). However, this didn't work for me. Setting `SWT_GTK3=1` (as suggested [here](https://github.com/guari/eclipse-ui-theme/issues/73)) did help, but the scrollbars still aren't right. `gnome-tweak-tool` doesn't work for me. – wchargin Aug 12 '14 at 14:39
  • I got the env flag workaround from Gerrit comments some months ago ;) (but that's a nice blog to get useful tips). For scrollbars, the way how they are rendered is changed with Luna final release for GTK, the ones in the screenshot are with Ubuntu default theme and an early release of Eclipse Luna. – guari Aug 12 '14 at 20:10
2

I had this issue with Eclipse CDT Neon 4.6.2 on Ubuntu 14.04 and none of the answers worked for me.

The problem was I tried to tell Eclipse to not use Gtk3 (by passing SWT_GTK3=0) while I did not have Gtk2 installed.

Here is what I did:

  1. Check if Gtk2 is installed: pkg-config --modversion gtk+-2.0
    If it is installed, you should see something like: 2.24.23
    If not, install it by sudo apt-get install gtk2.0
  2. Test Eclipse by typing SWT_GTK3=0 <eclipse_install_path> in a terminal

(Optional) Create a .desktop file:

[Desktop Entry]
Name=Eclipse
Type=Application
Exec=env SWT_GTK3=0 <eclipse_install_path>
Terminal=false
Icon=<path_to_icon>
Comment=Integrated Development Environment
NoDisplay=false
Categories=Development

Unfortunately this will not work with the scrollbars. So to at least have themed scrollbars in the editor add -Dswt.enable.themedScrollBar=true directly after -vmargs in the eclipse.ini file located in your Eclipse package path.

MattSchmatt
  • 850
  • 8
  • 18
-3

I was trying to solve a different issue but I noticed you're on Linux Mint with Cinnamon, the same as me, and this answer went a long way to making Eclipse display properly: https://stackoverflow.com/a/14075592/1410035

Going to Window > Preferences > General > Appearance and changing the theme to Classic seems to solve the problem.

It's worth mentioning mine was pre-set to GTK.

Community
  • 1
  • 1
Tom Saleeba
  • 4,031
  • 4
  • 41
  • 36
  • 1
    Well, but if it's *Classic*, then it's not *Dark*, and that's the whole point. It runs fine on *Classic*. – wchargin May 19 '15 at 14:08