Tuesday, May 6, 2014

Eclipse and Dark theme shortcomings

Well, last year, after having support to go on with LiClipse, I set out to having a Dark Theme in Eclipse given the new themeing capabilities of e4.

After some work, LiClipse (http://brainwy.github.io/liclipse) was released, and I'm pretty positive that it's currently the best possible experience with a dark theme on Eclipse (i.e.: through some adaptations to Eclipse Color Theme, the same UI is used to change editors as well as views and other decorations -- I went as far as creating new versions of some icons so that they work on the dark theme, added custom painters for trees and tables, etc).


There are some shortcomings when it comes to a dark theme in Eclipse which are not addressable from a plugin:

- It's not possible to style links: they always follow the platform settings (so, they can become unreadable inside Eclipse on a dark theme).

- Scrollbars are not themeable, thus, they stand out too much in a dark theme and things look ugly (IMHO).

- Tooltips can't be themed either (so when hovering the tooltip still has the background color from the OS).

Also, I'm not happy with some hacks I had to do:

- I had to add a custom painter to the tree so that it shows the expand/collapse decorations using a proper foreground color as the one from the system usually is unusable.

- The tree custom painter also erases the selection and redraws it as it's not possible to customize the selection color of the tree.

- For the table I also had to resort to a custom painter, but the situation is a bit worse than with the tree painter as it's not possible to customize the selection color when it doesn't have focus.

Note that those are the nastier I remember (and for which I created bugs in Eclipse itself).

Now, most of these issues only appear if you're using an OS that's not dark-themed, so, in Ubuntu which ships with a default dark theme, things may look nicer than on Windows -- where scrollbars aren't even customizable, so, it's always ugly (and it seems windows 8 trimmed many of its options, so, some things aren't even customizable anymore).

I bet no one will change the OS for that, so, it's either living with ugly scrollbars in a dark theme in Eclipse, choosing a different IDE or using a light theme, which is a bit lame: many UI toolkits such as Qt or JavaFX (and even swing) do a fine work on customizing the application look and feel, which takes me to the next point:

Most things are shortcomings in SWT, but it seems as SWT is not moving forward... Or maybe it is but not in those directions (which is a bit weird since it appeared as that was the most important point of going to e4)?

I saw some work on using SWT on top of JavaFX too (although it's probably a big effort migrating Eclipse to it)...

It seems like the Eclipse community should have decided where it's going at this point, so, can someone shed some light here? It seems like fixing those in SWT wouldn't be that hard -- but then again it needs development time from someone close to SWT...

Per request, I'm adding the issues I created on Eclipse:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=414080 (table selection foreground without focus)
https://bugs.eclipse.org/bugs/show_bug.cgi?id=401015 (style links)
https://bugs.eclipse.org/bugs/show_bug.cgi?id=434201 (respect foreground for tree item arrows)
https://bugs.eclipse.org/bugs/show_bug.cgi?id=430278 (style scrollbars)
https://bugs.eclipse.org/bugs/show_bug.cgi?id=401227 (toolitem foreground)
https://bugs.eclipse.org/bugs/show_bug.cgi?id=401015 (style hyperlinks)
https://bugs.eclipse.org/bugs/show_bug.cgi?id=434309 (style tree/table selection)