Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 492354

Summary: Disabled buttons are not grayed out
Product: [Eclipse Project] Platform Reporter: Claudio Tagliola <tagliola>
Component: SWTAssignee: Platform-SWT-Inbox <platform-swt-inbox>
Status: RESOLVED NOT_ECLIPSE QA Contact:
Severity: normal    
Priority: P3 CC: akurtakov, alexmonthy, alvaro.sanchez-leon, bernd.hufmann, dtoupin, ericwill, felix.hirsch, malaperle, marc.khouzam, mike, patrick.pollo.guilbert, peter
Version: 4.6   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Bug Depends on:    
Bug Blocks: 492371    
Attachments:
Description Flags
Stop button when no process is running
none
Disabled forward button with grayed out drop-down triangle none

Description Claudio Tagliola CLA 2016-04-25 07:42:53 EDT
Created attachment 261207 [details]
Stop button when no process is running

On Eclipse 4.6M6 (I20160317-0200) the disabled buttons are no longer grayed out, making it difficult to see which buttons are active, especially with stop and clear buttons. 

It does not show the border when the mouse is hovering over the button. All buttons in toolbars seem affected. The dropdown triangle when multiple choices are available (forward/backward buttons) is _not_ affected.

This behaviour started showing after the upgrade from Ubuntu 15.10 to 16.04.

The behaviour shows both when theming is enabled and disabled.
Comment 1 Claudio Tagliola CLA 2016-04-25 07:44:29 EDT
Created attachment 261209 [details]
Disabled forward button with grayed out drop-down triangle
Comment 2 Alexander Kurtakov CLA 2016-04-27 00:33:06 EDT
Would you please try installing gnome-standard-themes and switch your gtk theme to Adwaita using gnome-tweak-tool there were a number of reports from people experiencing such problem on Ubuntu 16.04 with its theme.
Comment 3 Claudio Tagliola CLA 2016-05-03 13:27:09 EDT
Installing gnome-themes-standard and switching to Adwaita indeed fixed it. Although not the problem of Eclipse, there are a host of other display issues coming with this theme, it is obvious it is not so polished as the default theme.
Comment 4 Marc-André Laperle CLA 2016-05-03 16:22:11 EDT
*** Bug 492835 has been marked as a duplicate of this bug. ***
Comment 5 Alexander Kurtakov CLA 2016-05-04 01:45:10 EDT
(In reply to comment #3)
> Installing gnome-themes-standard and switching to Adwaita indeed fixed it.
> Although not the problem of Eclipse, there are a host of other display issues
> coming with this theme, it is obvious it is not so polished as the default
> theme.

Default has different meaning to different people. Adwaita is the default GTK theme shipped with gtk itself from gtk.org. Would you please describe the bugs coming with Adwaita?
Comment 6 Claudio Tagliola CLA 2016-05-04 04:29:42 EDT
Default is whatever comes after a clean install from the OS, in this case ubuntu-16.04-desktop-amd64, which by looking at the site would be the most default version as it has the most prominent download button.

As for the display issues, my comment was not clear. I was referring to OS display issues, not Eclipse specific :-)

As for Ubuntu, which flavour is recommended for running Eclipse? Ubuntu GNOME? Or would you rule out Ubuntu completely and opt for a different distribution?
Comment 7 Alexander Kurtakov CLA 2016-05-04 08:33:28 EDT
(In reply to Claudio Tagliola from comment #6)
> Default is whatever comes after a clean install from the OS, in this case
> ubuntu-16.04-desktop-amd64, which by looking at the site would be the most
> default version as it has the most prominent download button.

Let's agree to disagree on this one :).

> 
> As for the display issues, my comment was not clear. I was referring to OS
> display issues, not Eclipse specific :-)

Are there Eclipse specific?

> 
> As for Ubuntu, which flavour is recommended for running Eclipse? Ubuntu
> GNOME? Or would you rule out Ubuntu completely and opt for a different
> distribution?

Running Gnome Shell with Adwaita theme. If Ubuntu Gnome does that - that's it.
Comment 8 Alexander Kurtakov CLA 2016-05-04 08:40:44 EDT
For the record - my definition of default GTK theme:
https://git.gnome.org/browse/gtk+/tree/gtk/gtksettingsprivate.h#n26
Comment 9 Claudio Tagliola CLA 2016-05-04 09:50:32 EDT
One main Eclipse display issue is, which happens in both themes is the color scheme of JavaDoc popups. They have a black background and dark blue link texts with even darker blue hover color, which is nigh unreadable. It can be fixed by installing gnome-color-chooser and override a few colors.

As for defaults, the issue is about Ubuntu, GTK is not enough to run Eclipse, it needs an OS around it. For the end user, GTK is merely an implementation detail they should not be bothered with. In the current state, if I cleanly install the latest Ubuntu and then install Eclipse, I would not expect these kinds of issues. .

A separate issue is that if I install Eclipse from Ubuntu Software Center (or Ubuntu Software, a different app store?) and install Eclipse from there, it will install Eclipse 3.8.1, so that will probably work, but is unusable due to it being antiquated :)

But indeed, we are side-tracking. It just seems the combination of Ubuntu with Eclipse is killing the user by a thousand paper cuts, which makes me sad :(
Comment 10 Alexander Kurtakov CLA 2016-05-04 10:06:05 EDT
(In reply to Claudio Tagliola from comment #9)
> One main Eclipse display issue is, which happens in both themes is the color
> scheme of JavaDoc popups. They have a black background and dark blue link
> texts with even darker blue hover color, which is nigh unreadable. It can be
> fixed by installing gnome-color-chooser and override a few colors.
> 
> As for defaults, the issue is about Ubuntu, GTK is not enough to run
> Eclipse, it needs an OS around it. For the end user, GTK is merely an
> implementation detail they should not be bothered with. In the current
> state, if I cleanly install the latest Ubuntu and then install Eclipse, I
> would not expect these kinds of issues. .
> 
> A separate issue is that if I install Eclipse from Ubuntu Software Center
> (or Ubuntu Software, a different app store?) and install Eclipse from there,
> it will install Eclipse 3.8.1, so that will probably work, but is unusable
> due to it being antiquated :)
> 
> But indeed, we are side-tracking. It just seems the combination of Ubuntu
> with Eclipse is killing the user by a thousand paper cuts, which makes me
> sad :(

Have you tried Eclipse Neon? The whole way this is done on newer GTK was redone to use GTK CSS machinery, in my experience it is way better on non Ubuntu.
Comment 11 Eric Williams CLA 2016-05-04 10:12:01 EDT
(In reply to Claudio Tagliola from comment #9)
> As for defaults, the issue is about Ubuntu, GTK is not enough to run
> Eclipse, it needs an OS around it. For the end user, GTK is merely an
> implementation detail they should not be bothered with. In the current
> state, if I cleanly install the latest Ubuntu and then install Eclipse, I
> would not expect these kinds of issues. .

SWT is a cross platform toolkit, the entire purpose of it is to run using the OS native graphics stack and deliver widgets independent of what OS you are running. It doesn't nor should it need anything beyond that. The fact still remains that upstream GTK (which is largely the same GTK shipped with Fedora and other distros) works fine with Eclipse. Ubuntu's packaged version of GTK doesn't. I would argue this points to an issue with what Ubuntu is doing to GTK, not with SWT or Eclipse.


> A separate issue is that if I install Eclipse from Ubuntu Software Center
> (or Ubuntu Software, a different app store?) and install Eclipse from there,
> it will install Eclipse 3.8.1, so that will probably work, but is unusable
> due to it being antiquated :)

I would really raise this point with the Ubuntu packagers. 3.8 is indeed ancient.

> But indeed, we are side-tracking. It just seems the combination of Ubuntu
> with Eclipse is killing the user by a thousand paper cuts, which makes me
> sad :(

There isn't much that the SWT can do about Ubuntu specific bugs. Even if we started fixing Ubuntu specific bugs caused by Ubuntu GTK, it would be a nightmare to maintain them and we simply don't have the people available to do that. This isn't even idea that we should entertain from a philosophical standpoint.


(In reply to Alexander Kurtakov from comment #10)
> Have you tried Eclipse Neon? The whole way this is done on newer GTK was
> redone to use GTK CSS machinery, in my experience it is way better on non
> Ubuntu.

I second this, Neon is miles ahead of Mars in terms of keeping up with GTK changes and such. Even on Ubuntu the situation with GTK3 is a lot better.
Comment 12 Marc-André Laperle CLA 2016-05-05 14:25:29 EDT
OK so I found the first commit in GTK that affected this change in behavior:

commit 99c4f2dd3947c290e3ea19153202be3e43b22add
Date:   Wed Mar 18 15:22:09 2015 +0100

    render: Make image effect not depend on state
    
    Instead rely on -gtk-image-effect only. Adwaita should already work this
    way.
    
    Relying on state was a leftover feature from the GTK 2 days.

Is there some documentation about changes adopters should be aware of for each GTK release? I have in mind something like "API changes" like CDT https://wiki.eclipse.org/CDT/User/NewIn90#API_modifications or like the Eclipse Migration guide https://www.eclipse.org/eclipse/development/porting/eclipse_4_5_porting_guide.html

But I understand if that doesn't exist. Just asking in case it does as it will make it easier for me to figure out what to change in the Ambiance CSS :)
Comment 13 Eric Williams CLA 2016-05-05 14:47:55 EDT
(In reply to Marc-Andre Laperle from comment #12)
> OK so I found the first commit in GTK that affected this change in behavior:
> 
> commit 99c4f2dd3947c290e3ea19153202be3e43b22add
> Date:   Wed Mar 18 15:22:09 2015 +0100
> 
>     render: Make image effect not depend on state
>     
>     Instead rely on -gtk-image-effect only. Adwaita should already work this
>     way.
>     
>     Relying on state was a leftover feature from the GTK 2 days.
> 
> Is there some documentation about changes adopters should be aware of for
> each GTK release? I have in mind something like "API changes" like CDT
> https://wiki.eclipse.org/CDT/User/NewIn90#API_modifications or like the
> Eclipse Migration guide
> https://www.eclipse.org/eclipse/development/porting/
> eclipse_4_5_porting_guide.html
> 
> But I understand if that doesn't exist. Just asking in case it does as it
> will make it easier for me to figure out what to change in the Ambiance CSS
> :)

Sadly I don't think so. Sometimes they post on the GNOME blog about changes but that's usually only for major stuff. Usually commit messages are what I look for, or I go to the GTK+ IRC channel and ask them for help.
Comment 14 Marc-André Laperle CLA 2016-05-05 16:41:43 EDT
(In reply to Eric Williams from comment #13)
> Sadly I don't think so. Sometimes they post on the GNOME blog about changes
> but that's usually only for major stuff. Usually commit messages are what I
> look for, or I go to the GTK+ IRC channel and ask them for help.

OK thanks! I think I figured out what to add, but not what to remove. But that's a first good step. I'll look at sending the fix upstream (Ubuntu)
Comment 15 Marc-André Laperle CLA 2016-05-05 16:42:45 EDT
https://bugs.launchpad.net/ubuntu-themes/+bug/1578810
Comment 16 Marc-André Laperle CLA 2016-05-05 17:11:33 EDT
(In reply to Marc-Andre Laperle from comment #15)
> https://bugs.launchpad.net/ubuntu-themes/+bug/1578810

I pushed a patch there. If you are a Ubuntu user, feel free to log to launchpad and mark this bug as affecting you, in order to raise awareness. Thanks!
Comment 17 Claudio Tagliola CLA 2016-05-05 17:23:08 EDT
+1 on the Ubuntu bug, thank you for investing this ticket and making a patch on Launchpad!

As for earlier remarks, when using ubuntu-gnome-16.04-desktop-amd64 and 4.6M7, the issue is not there. It is indeed using the Adwaita theme as default. The original issue was with 4.6M6, iirc.

There is a different artefact on the initial workspace location window where the 'make this the default workspace location' checkbox text is not visible (gray on gray), only a floating textbox is visible. When I have a screenshot, I'll open a new ticket for that one.
Comment 18 Peter Severin CLA 2016-05-24 03:12:24 EDT
I also see this issue with the default installation of Ubuntu 16.04 and the latest Neon RC2 package. Using SWT_GTK3=0 fixes this issue, but it's not a good solution.
Comment 19 Marc-André Laperle CLA 2016-09-22 10:56:35 EDT
wireshark-gtk and remmina are also affected by this bug and they are fixed with the patch I proposed. If you are affected by this bug on Ubuntu (or if you know you'll be affected, I know some people will upgrade soon), it would be great if you can go click "this bug affects me" in launchpad.
Comment 20 Marc Khouzam CLA 2016-09-22 11:18:15 EDT
(In reply to Marc-Andre Laperle from comment #19)
>  it would be great if you can go click "this bug affects me"
> in launchpad.

I gather we need to go to
https://bugs.launchpad.net/ubuntu-themes/+bug/1578810

we need to have an account, and then we'll be able to find the button "this bug affects me"?
Comment 21 Patrick-Jeffrey Pollo Guilbert CLA 2016-09-22 11:22:49 EDT
(In reply to Marc Khouzam from comment #20)
> (In reply to Marc-Andre Laperle from comment #19)
> >  it would be great if you can go click "this bug affects me"
> > in launchpad.
> 
> I gather we need to go to
> https://bugs.launchpad.net/ubuntu-themes/+bug/1578810
> 
> we need to have an account, and then we'll be able to find the button "this
> bug affects me"?

Yes, once you're logged in you should see the button next to the number of people affected.
Comment 22 Marc Khouzam CLA 2016-09-22 11:29:09 EDT
(In reply to Patrick-Jeffrey Pollo Guilbert from comment #21)
> (In reply to Marc Khouzam from comment #20)
> > (In reply to Marc-Andre Laperle from comment #19)
> > >  it would be great if you can go click "this bug affects me"
> > > in launchpad.
> > 
> > I gather we need to go to
> > https://bugs.launchpad.net/ubuntu-themes/+bug/1578810
> > 
> > we need to have an account, and then we'll be able to find the button "this
> > bug affects me"?
> 
> Yes, once you're logged in you should see the button next to the number of
> people affected.

That was easy.  Done.  I hope others do the same.
Comment 23 Marc-André Laperle CLA 2016-11-03 17:31:11 EDT
I am happy to say that the patch was finally merged in Ubuntu 16.04 (and 16.10) and it's now available through regular update (apt-get, etc). I will close this one as NOT_ECLIPSE since nothing had to be done on the Eclipse side.