Question

I have an editor that has both draw2d tree and Nebula's GridTreeViewer (basically a JFace TreeViewer). What I need is working, except scrollbars. In draw2d I get scrollbars provided by org.eclipse.draw2d.ScrollPane and in GridTreeViewer I get scrollbars from JFace. I am not sure why, but scrollbars look different, I would expect them to look the same since they are calling OS's native controls if I am not mistaken? Is there a reason why scrollbars look different and is there a way "downgrade" JFace's scrollbars to look like draw2d's? Perhaps there is mistake in setting up ScrollPane's scrollbars?

Here is the screenshot, this is on Ubuntu 13.04:

enter image description here

Was it helpful?

Solution

There is no mistake on your side. Leftmost tree has a custom-drawn scrollbar (I assume that's Draw2d tree) and rightmost tree shows native scrollbar (I guess those are the ones you call "JFace"). You can notice that most applications outside of Eclipse show scrollbars like the "JFace" ones. That is, if Ubuntu overlay scrollbars are enabled.

There is no easy fix for this. IMHO, you could try to get in Draw2d sources and try disabling their custom-drawn and replacing them with native ones (from SWT). Or you could use a custom tree instead on Nebula control...

Please note that "JFace" toolbars will look drastically different on Mac OS X or Windows, will have different size and such. And the users will expect them :)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top