Rendering of buttons with images in Eclipse Kepler

2019-02-16 01:03发布

问题:

With Kepler, the buttons in the Console view are sometimes rendered like this:

when it should look like this:

Moving once over the buttons with the mouse fixes the problem. Any idea what could be causing this?

Versions:

  • Eclipse Kelper SR1 (20130919-0819)
  • Linux Kubuntu 13.04 raring
  • libgtk2.0-bin: 2.24.17-0ubuntu2

回答1:

Considering the various issues seen with Kubuntu, knowing that oxygen-gtk is the default, you could consider checking if the problem persists when switching to QtCurve.

See for instance:

  • bug 348059:

When I change this to "QtCurve" (not installed by default) the buttons are correctly drawn with transparent background. Only during mouse-over a button is raised and gets a gray background.

  • this thread:

I, too, found some bugs which happen only with the gtk theme (oxygen-gtk to be precise), and switched to qtcurve long ago. No complaints from this front since then.

  • bug 367603:

Kubuntu 11.10

  • works OK with 11.04
    Application Appearance : GTK+ Appearance : Widget style: oxygen-gtk
  • works OK with Raleigh (plain ugly) and QtCurve (not installed by default)

However, the OP Aaron Digulla points out in the comments:

SWT always relies on Gtk to load the theme (you can't select QtCurve in the appearance prefs page).

Also note that you probably want the Gtk2 based theme for Eclipse (see the blog post "GNOME (et al): Rotting In Threes" for reasons).



回答2:

Various rendering bugs are discussed in this bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=333965

The solution is starting Eclipse with

GDK_NATIVE_WINDOWS=1 ...path.to../eclipse.exe

or

export GDK_NATIVE_WINDOWS=1
...path.to../eclipse.exe