Bug 432673 - SWT GTK3 doesn't render tables with GTK3 Theme "oxygen-gtk"
Summary: SWT GTK3 doesn't render tables with GTK3 Theme "oxygen-gtk"
Status: VERIFIED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: Launcher (show other bugs)
Version: 3.10.1 Luna   Edit
Hardware: PC Linux
: P3 normal with 4 votes (vote)
Target Milestone: Mars M7   Edit
Assignee: Andrey Loskutov CLA
QA Contact:
URL:
Whiteboard:
Keywords: readme
: 440779 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-04-12 11:53 EDT by Stephan Herrmann CLA
Modified: 2015-05-22 07:10 EDT (History)
11 users (show)

See Also:


Attachments
TableContents on Kubuntu13 'oxygen-gtk' theme (97.60 KB, image/png)
2014-04-16 06:23 EDT, Niraj Modi CLA
no flags Details
screenshot (37.68 KB, image/png)
2014-10-07 09:47 EDT, Holger Klene CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stephan Herrmann CLA 2014-04-12 11:53:32 EDT
Seeing bug 420771 and bug 424343 closed I tried the solution and also manually exported LIBOVERLAY_SCROLLBAR=0.

Unfortunately none of this helped on my system.

So I made some more experiments and found out that this is a bad interaction with a GTK3 Theme configured via KDE's System Settings:

With this
  Select a GTK3 Theme: [oxygen-gtk]
tables in SWT are empty.

In order to get it working I need to switch to:
  Select a GTK3 Theme: [Default]

which, however, is an unacceptably ugly theme.

Next I tried a few other themes, which all "worked", i.e., tables did have content (some had graphical artifacts like gray button background where the context had different color background).

IIRC, "oxygen-gtk" is the only theme installed in Kubuntu by default (in addition to "Default"), which enables uniform L&F for QT and GTK.

Might be a bug in that theme, but at least worth mentioning in the release notes?
Comment 1 Arun Thondapu CLA 2014-04-14 08:37:30 EDT
(In reply to Stephan Herrmann from comment #0)
> 
> Might be a bug in that theme, but at least worth mentioning in the release
> notes?

I agree, there are few other bugs including eclipse crashes that have been reportedly happening only with the 'oxygen-gtk' theme. It looks like the crashes have been fixed in the theme itself (see bug 420597 comment 12) but I'm not sure whether that helps with the empty tables problem you mentioned.

Niraj, can you please check whether you get the same behavior with the 'oxygen-gtk' theme on your Kubuntu machine? Thanks!
Comment 2 Niraj Modi CLA 2014-04-16 06:23:54 EDT
Created attachment 242039 [details]
TableContents on Kubuntu13 'oxygen-gtk' theme

Tried the ControlExample Table tab, problem can be seen on Kubuntu13.10 with 'oxygen-gtk' theme which is the default, Table contents doesn't get drawn.
Attaching screenshot for reference.
Comment 3 Arun Thondapu CLA 2014-04-16 06:47:30 EDT
(In reply to Niraj Modi from comment #2)
> Created attachment 242039 [details]
> TableContents on Kubuntu13 'oxygen-gtk' theme
> 
> Tried the ControlExample Table tab, problem can be seen on Kubuntu13.10 with
> 'oxygen-gtk' theme which is the default, Table contents doesn't get drawn.
> Attaching screenshot for reference.

Is this with the overlay scrollbars disabled? If its the latest I-build, overlay scrollbars are disabled by default but not in the older builds...
Comment 4 Stephan Herrmann CLA 2014-04-16 16:24:41 EDT
(In reply to Arun Thondapu from comment #3)
> (In reply to Niraj Modi from comment #2)
> > Created attachment 242039 [details]
> > TableContents on Kubuntu13 'oxygen-gtk' theme
> > 
> > Tried the ControlExample Table tab, problem can be seen on Kubuntu13.10 with
> > 'oxygen-gtk' theme which is the default, Table contents doesn't get drawn.
> > Attaching screenshot for reference.
> 
> Is this with the overlay scrollbars disabled? If its the latest I-build,
> overlay scrollbars are disabled by default but not in the older builds...

I don't know about Niraj's experiment, but in my case:

(In reply to Stephan Herrmann from comment #0)
> Seeing bug 420771 and bug 424343 closed I tried the solution and also
> manually exported LIBOVERLAY_SCROLLBAR=0.
Comment 5 Niraj Modi CLA 2014-04-18 01:02:54 EDT
(In reply to Arun Thondapu from comment #3)
> Is this with the overlay scrollbars disabled? If its the latest I-build,
> overlay scrollbars are disabled by default but not in the older builds...

Hi Arun,
I took the latest SWT sources for my test, so the LIBOVERLAY_SCROLLBAR was disabled.
Also with manually disabling LIBOVERLAY_SCROLLBAR, same result.
Comment 6 Stephan Herrmann CLA 2014-04-19 13:40:43 EDT
I already asked in another bug whether GTK2 shouldn't be the default for Luna. Meanwhile I've been looking for some GTK3 themes that work, don't look broken, don't waste space etc but give the same comfort I'm used to from GTK2.

I found none, but instead my favourite GTK2 theme points me to this: https://igurublog.wordpress.com/2012/11/05/gnome-et-al-rotting-in-threes/ which seems to say that GKT3 (currently) is a bad space to be in.

I no longer think this is a problem of SWT but a problem of GTK3, and my vote would be to clearly demote GTK3 and stay at GTK2 as the default (if installed). Is any discussion in this direction happening? If so, where?
Comment 7 Alexander Kurtakov CLA 2014-04-23 09:13:28 EDT
(In reply to Stephan Herrmann from comment #6)
> I already asked in another bug whether GTK2 shouldn't be the default for
> Luna. Meanwhile I've been looking for some GTK3 themes that work, don't look
> broken, don't waste space etc but give the same comfort I'm used to from
> GTK2.
> 
> I found none, but instead my favourite GTK2 theme points me to this:
> https://igurublog.wordpress.com/2012/11/05/gnome-et-al-rotting-in-threes/
> which seems to say that GKT3 (currently) is a bad space to be in.
> 
> I no longer think this is a problem of SWT but a problem of GTK3, and my
> vote would be to clearly demote GTK3 and stay at GTK2 as the default (if
> installed). Is any discussion in this direction happening? If so, where?

SWT currently doesn't support latest xulrunner, distros no longer install standalone xulrunner even (considered a private lib now) - this removes xulrunner as backend for Browser.
Webkitgtk (gtk2) version is more or less abandoned and all development happens on webkit2 which has only gtk3 version. Resulting in gtk2 version being pretty unstable and crashy in my experience.
Now staying with gtk2 on newest systems for me would mean the Browser widget would not work.
Comment 8 Stephan Herrmann CLA 2014-04-23 11:48:52 EDT
I haven't experienced any browser issues when using gtk2.
Conversely, I haven't seen an Eclipse version that was well usable on one of Linux my boxes when using gtk3.

Looks like a simple decision to me.

If SWT runs on oxygen-gtk this would change the picture, but that looks like a huge effort to me, considering where we are right now, with not much time left.

my 2c.
Comment 9 Alexander Kurtakov CLA 2014-04-23 12:16:49 EDT
Stephan, which oxygen-gtk version do you have ? It's one of the themes that is known with numerous problems until last week and causing problems for many gtk apps not just eclipse. Having it as a release criteria is a bit weird.
See https://bugs.kde.org/show_bug.cgi?id=325196 and https://bugs.kde.org/show_bug.cgi?id=328495.
Comment 10 Stephan Herrmann CLA 2014-04-23 13:32:19 EDT
(In reply to Alexander Kurtakov from comment #9)
> Stephan, which oxygen-gtk version do you have ? It's one of the themes that
> is known with numerous problems until last week and causing problems for
> many gtk apps not just eclipse. Having it as a release criteria is a bit
> weird.
> See https://bugs.kde.org/show_bug.cgi?id=325196 and
> https://bugs.kde.org/show_bug.cgi?id=328495.

IIRC oxygen-gtk is the only theme installed by default in Kubuntu, so it's not an arbitrary choice.
Plus after much searching, I have not found *any* theme that can visually compete with oxygen-gtk on gtk3. Many themes are much worse than crashing: they aren't even available on gtk3 (my favorite is QtCurve which is DOA in gtk3). Do you know a gtk3 compatible theme which you can recommend for KDE users, which works well with Eclipse? I'm all ears.

I'm not proposing "oxygen-gtk is a must", but "there must be at least one easily discoverable theme that works nicely on KDE" (which shouldn't swap button ordering to begin with).
Comment 11 Floréal Cabanettes CLA 2014-08-15 06:34:37 EDT
I have this bug.

I have solved it by adding this contain to the file ~/.config/gtk-3.0/settings.ini :
[Settings]
gtk-theme-name = oxygen-gtk
gtk-fallback-icon-theme = gnome
# next option is applicable only if selected theme supports it
gtk-application-prefer-dark-theme = true
# set font name and dimension
gtk-font-name = Sans 10

I am in Slackware and the folder gtk-3.0 was not present initially. So I create this folder and th new file settings.ini, and I put only the content above.

Next, I restart eclipse, and it's look was now the same as my older eclipse 4.3.4, in my new eclipse 4.4.
Comment 12 Arun Thondapu CLA 2014-09-26 07:19:50 EDT
*** Bug 440779 has been marked as a duplicate of this bug. ***
Comment 13 Holger Klene CLA 2014-10-07 09:47:44 EDT
Created attachment 247680 [details]
screenshot

(In reply to Floréal Cabanettes from comment #11)
> I have solved it by adding this contain to the file
> ~/.config/gtk-3.0/settings.ini :

I already had such a file ... but neither my version nor your version changed anything for me. My SWT-tables with GTK3-Oxygen is still broken.
Comment 14 Stephan Herrmann CLA 2014-12-17 19:10:12 EST
After some updates (Kubuntu 14.04.1 LTS and Mars M4) I gave GTK 3 another chance. Result: I still don't see any table contents, seems to say: Eclipse is still dead on KDE and GTK3.
Comment 15 Andrey Loskutov CLA 2014-12-29 11:28:45 EST
I'm on latest KUbuntu and trying to use Eclipse 4.5 M4 with GTK3 right now

Eclipse is unusable because of this bug. Just try Window->Customize Perspective - no one table is shown. gtk3 was not an option for me before because it was not working anyway on 4.4 and earlier, but now gtk3 is default...

(In reply to Stephan Herrmann from comment #10)
> (In reply to Alexander Kurtakov from comment #9)
> > Stephan, which oxygen-gtk version do you have ? It's one of the themes that
> > is known with numerous problems until last week and causing problems for
> > many gtk apps not just eclipse. Having it as a release criteria is a bit
> > weird.

I'm with oxygen-gtk since ever (default version what KUbuntu ships) - *never* saw any issues with Eclipse on gtk2. 

> IIRC oxygen-gtk is the only theme installed by default in Kubuntu, so it's
> not an arbitrary choice.

Let say it this way: there *are* 4 other themes, but one can't use them without pain - overlarge UI elements with 4 bit colors in Minecraft stile will drive crazy anyone after a minute.

> Do you know a gtk3 compatible theme which you can recommend for KDE
> users, which works well with Eclipse? I'm all ears.

The only "no pain in the ..." theme is Adwaita but it does not look like KDE theme and it swaps the "OK/Cancel" button order to a different one as KDE has, so that one always hit the wrong button.

> I'm not proposing "oxygen-gtk is a must", but "there must be at least one
> easily discoverable theme that works nicely on KDE" (which shouldn't swap
> button ordering to begin with).

If you know the trick to swap the buttons back, I'm all ears. I can "survive" Adwaita but can't the buttons :-)

But I agree with Stephan: for all KDE users Eclipse 4.5 is dead on arrival "by default"... This is pity. Is there really no way to fix tables for the default oxygen-gtk theme, or it is just matter of priority/resources?
Comment 16 Andrey Loskutov CLA 2014-12-29 12:08:12 EST
(In reply to Andrey Loskutov from comment #15)

> If you know the trick to swap the buttons back, I'm all ears.

 ~/.config/gtk-3.0/settings.ini should have gtk-alternative-button-order=1.

BUT: any changes on this file will be overridden as soon as one uses KDE settings to setup GTK :-(

> The only "no pain in the ..." theme is Adwaita but it does not look like KDE
> theme and it swaps the "OK/Cancel" button order to a different one as KDE
> has, so that one always hit the wrong button.

Nope, this is not usable too! Reason: after changing button order via the trick above I saw reproducible SWT issues on opening CPD and lot of visual garbage by using Ctrl+3 and typing "error" there, so I stopped my experiments.

Stack:
org.eclipse.swt.SWTException: Graphic is disposed
	at org.eclipse.swt.SWT.error(SWT.java:4465)
	at org.eclipse.swt.SWT.error(SWT.java:4380)
	at org.eclipse.swt.SWT.error(SWT.java:4351)
	at org.eclipse.swt.graphics.Color.getRGB(Color.java:217)
	at org.eclipse.swt.widgets.CoolItem.createArrowImage(CoolItem.java:256)
	at org.eclipse.swt.widgets.CoolItem.updateChevron(CoolItem.java:641)
	at org.eclipse.swt.widgets.CoolItem.setBounds(CoolItem.java:448)
	at org.eclipse.swt.widgets.CoolBar.layoutItems(CoolBar.java:860)
	at org.eclipse.swt.widgets.CoolBar.relayout(CoolBar.java:895)
	at org.eclipse.swt.widgets.CoolItem.setSize(CoolItem.java:591)
	at org.eclipse.swt.widgets.CoolItem.setSize(CoolItem.java:615)
	at org.eclipse.jface.action.ToolBarContributionItem.updateSize(ToolBarContributionItem.java:659)
	at org.eclipse.jface.action.ToolBarContributionItem.fill(ToolBarContributionItem.java:245)
	at org.eclipse.jface.action.CoolBarManager.update(CoolBarManager.java:907)
	at org.eclipse.jface.action.CoolBarManager.createControl(CoolBarManager.java:241)
	at org.eclipse.ui.internal.dialogs.CustomizePerspectiveDialog.loadMenuAndToolbarStructure(CustomizePerspectiveDialog.java:2782)
	at org.eclipse.ui.internal.dialogs.CustomizePerspectiveDialog.<init>(CustomizePerspectiveDialog.java:1543)
	at org.eclipse.ui.internal.WorkbenchWindow.createCustomizePerspectiveDialog(WorkbenchWindow.java:3045)
Comment 17 Andrey Loskutov CLA 2014-12-29 15:21:23 EST
My bug on oxygen-gtk theme was closed before I was able to attach all screenshots to it:
https://bugs.kde.org/show_bug.cgi?id=342318
The developers don't wont to support GTK themes due this one: https://bugzilla.gnome.org/show_bug.cgi?id=735211

Just a quote form the Gnome developer:
<quote>
As for oxygen-gtk in particular, I'm actually happy that it's stopped working
because its codebase has been explicitly violating the contract for theming
engines since its inception.
</quote>
Comment 18 Stephan Herrmann CLA 2014-12-29 17:21:40 EST
(In reply to Andrey Loskutov from comment #16)
> (In reply to Andrey Loskutov from comment #15)
> 
> > If you know the trick to swap the buttons back, I'm all ears.
> 
>  ~/.config/gtk-3.0/settings.ini should have gtk-alternative-button-order=1.
> 
> BUT: any changes on this file will be overridden as soon as one uses KDE
> settings to setup GTK :-(
> 
> > The only "no pain in the ..." theme is Adwaita but it does not look like KDE
> > theme and it swaps the "OK/Cancel" button order to a different one as KDE
> > has, so that one always hit the wrong button.
> 
> Nope, this is not usable too! Reason: after changing button order via the
> trick above I saw reproducible SWT issues on opening CPD and lot of visual
> garbage by using Ctrl+3 and typing "error" there, so I stopped my
> experiments.

Thanks for sharing!


The quotes and links from comment 17 and also comment 6 demonstrate that *a lot* has gone wrong between gnome devs and their adopters.

As a KDE user I can only hope that I will always have another option to run Eclipse on. GTK3 doesn't look like a viable option. GTK2 still is for me. When GTK2 is going to retire what option will be left? Perhaps Qt? Perhaps JavaFX?
Comment 19 Andrey Loskutov CLA 2014-12-29 18:22:32 EST
(In reply to Stephan Herrmann from comment #18)
> As a KDE user I can only hope that I will always have another option to run
> Eclipse on. GTK3 doesn't look like a viable option. GTK2 still is for me.
> When GTK2 is going to retire what option will be left? Perhaps Qt? Perhaps
> JavaFX?

Qt would be a dream, there was a proposal (and even a prototype) but this was dismissed initially because of the license but later because of no resources/interest AFAIK. There were some rumors about SWT on JavaFX project (there is even a google group for that), I think this will follow straight the "Qt proposal" road into nirvana except some big company would spend some money to that.

In the meantime I've found "Clearlooks-Phenix" theme (available in Kubunty package manager) which seem not to crash and seem even to respect some KDE color settings (at least it uses light yellow background for javadocs and not black as adwaita). I'm currently live testing this one.

I've also entered https://bugs.kde.org/show_bug.cgi?id=342320 about KDE always overriding user settings in .config/gtk-3.0/settings.ini.
Comment 20 Andrey Loskutov CLA 2014-12-30 07:07:42 EST
Fix: https://git.eclipse.org/r/38843
I haven't tried to build it (have no clue how) but I think this should work.

For those who can't wait for the patch: you have to set OXYGEN_DISABLE_INNER_SHADOWS_HACK=1 variables before starting Eclipse, as suggested by oxygen-gtk developers: https://bugs.kde.org/show_bug.cgi?id=342318#c4.
Comment 21 Andrey Loskutov CLA 2015-02-02 15:26:40 EST
(In reply to Andrey Loskutov from comment #20)
> Fix: https://git.eclipse.org/r/38843

SWT team, ping! :-)
Comment 22 Alexander Kurtakov CLA 2015-03-24 15:43:42 EDT
(In reply to Andrey Loskutov from comment #21)
> (In reply to Andrey Loskutov from comment #20)
> > Fix: https://git.eclipse.org/r/38843
> 
> SWT team, ping! :-)

The patch is against rt.equinox.framework and SWT committers are not committers to equinox.framework. I know that Arun is committer in both places but I don't know of anyone else from swt.
Comment 23 Andrey Loskutov CLA 2015-03-24 15:49:41 EDT
(In reply to Alexander Kurtakov from comment #22)
> The patch is against rt.equinox.framework and SWT committers are not
> committers to equinox.framework. I know that Arun is committer in both
> places but I don't know of anyone else from swt.

It would be nice to hear (via comments and +1 on the review) if the chosen solution is acceptable for SWT even if the patch is in equinox. Tha patch itself is trivial.
Comment 26 Arun Thondapu CLA 2015-03-27 09:07:21 EDT
Unfortunately, I cannot test this change as I'm not on KDE, can someone who is using KDE with oxygen-gtk theme (Stephan or Andrey?) test the next N-build to verify this fix/workaround? Thanks!
Comment 27 Stephan Herrmann CLA 2015-03-27 19:38:31 EDT
(In reply to Arun Thondapu from comment #26)
> Unfortunately, I cannot test this change as I'm not on KDE, can someone who
> is using KDE with oxygen-gtk theme (Stephan or Andrey?) test the next
> N-build to verify this fix/workaround? Thanks!

I can give it a try.
Comment 28 Arun Thondapu CLA 2015-04-01 02:38:34 EDT
I'm curious if anyone has been able to verify this bug yet?
Comment 29 Stephan Herrmann CLA 2015-04-02 07:11:21 EDT
(In reply to Arun Thondapu from comment #28)
> I'm curious if anyone has been able to verify this bug yet?

After somany broken N-builds I picked up the latest I-build.

I confirm that this bug is fixed, dialogs again show table content, even with GTK3 and oxygen-gtk.

THANKS!

I went ahead giving GTK3 another chance, leading to bug 463783.

-> Back to GTK2 + qtcurve
Comment 30 Arun Thondapu CLA 2015-04-02 09:35:25 EDT
(In reply to Stephan Herrmann from comment #29)
> (In reply to Arun Thondapu from comment #28)
> > I'm curious if anyone has been able to verify this bug yet?
> 
> After somany broken N-builds I picked up the latest I-build.
> 
> I confirm that this bug is fixed, dialogs again show table content, even
> with GTK3 and oxygen-gtk.
> 
> THANKS!

Thanks for verifying the fix Stephan!
Thanks for the patch Andrey! Good to see some improvement for SWT on KDE...
Comment 31 Andrey Loskutov CLA 2015-04-02 09:45:09 EDT
(In reply to Arun Thondapu from comment #30)
> (In reply to Stephan Herrmann from comment #29)
> > (In reply to Arun Thondapu from comment #28)
> > > I'm curious if anyone has been able to verify this bug yet?
> > 
> > After somany broken N-builds I picked up the latest I-build.
> > 
> > I confirm that this bug is fixed, dialogs again show table content, even
> > with GTK3 and oxygen-gtk.
> > 
> > THANKS!
> 
> Thanks for verifying the fix Stephan!
> Thanks for the patch Andrey! Good to see some improvement for SWT on KDE...

Arun, on Fedora 21 (with and without the patch) I see new issue: the "Arguments" and "Configuration" tabs for Eclipse launch configurations in the launch configuration wizard are empty with oxygen-gtk (the content flickers on opening but quickly filled with background color). This does not happen with "Adwaita" theme. If I will have time I will create bug for it this weekend.
Comment 32 Holger Klene CLA 2015-04-05 06:59:54 EDT
Seems, I lost track of the different things I've already tried with the GTK environment on this machine:

At least there is the workaround from bug 440660 comment 20
and an upgrade to Kubuntu 14.10 along with more recent version of GTK3 (compare to bug 440660 comment 1)

holger@Meerschweinchen:~$ dpkg -l 'gtk*'
Gewünscht=Unbekannt/Installieren/R=Entfernen/P=Vollständig Löschen/Halten
| Status=Nicht/Installiert/Config/U=Entpackt/halb konFiguriert/
         Halb installiert/Trigger erWartet/Trigger anhängig
|/ Fehler?=(kein)/R=Neuinstallation notwendig (Status, Fehler: GROSS=schlecht)
||/ Name           Version      Architektur  Beschreibung
+++-==============-============-============-=================================
un  gtk-recordmyde <keine>      <keine>      (keine Beschreibung vorhanden)
un  gtk-sharp2-gap <keine>      <keine>      (keine Beschreibung vorhanden)
ii  gtk2-engines-o 1.4.5-0ubunt amd64        Oxygen widget theme for GTK+-base
ii  gtk2-engines-p 2.24.25-0ubu amd64        pixbuf-based theme for GTK+ 2.x
un  gtk2.0-binver- <keine>      <keine>      (keine Beschreibung vorhanden)
un  gtk3-binver-3. <keine>      <keine>      (keine Beschreibung vorhanden)
ii  gtk3-engines-o 1.4.0-0ubunt amd64        Oxygen widget theme for GTK3-base
un  gtk3-engines-u <keine>      <keine>      (keine Beschreibung vorhanden)
un  gtkam          <keine>      <keine>      (keine Beschreibung vorhanden)
holger@Meerschweinchen:~$

an update to Java
java version "1.8.0_40"
Java(TM) SE Runtime Environment (build 1.8.0_40-b26)
Java HotSpot(TM) 64-Bit Server VM (build 25.40-b25, mixed mode)



And finally an almost recent version of eclipse

Version: Mars (4.5) Milestone 6
Build id: I20150320-0800

which should be a few days *before* the latest gerrit change in comment 25
-> Now I cannot reproduce attachment 247680 [details] anymore, so I cannot say whether the fix did anything good

At least running
Version: Mars (4.5)
Build id: N20150403-2000
it didn't do anything bad :-)
Comment 33 Holger Klene CLA 2015-04-05 08:08:45 EDT
(In reply to Andrey Loskutov from comment #31)
> If I will have time I will create bug for it this weekend.

bug 463937