Bug 492376 - [GTK2] Quick outline white on white with
Summary: [GTK2] Quick outline white on white with
Status: RESOLVED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.5.2   Edit
Hardware: PC Linux
: P5 major (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: triaged
Depends on:
Blocks: 530841
  Show dependency tree
 
Reported: 2016-04-25 11:36 EDT by Aleksei Lissitsin CLA
Modified: 2018-07-12 10:14 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Aleksei Lissitsin CLA 2016-04-25 11:36:49 EDT
It seems there is a regression after the update to 4.5.2 when using GTK2 backend.

The tree elements and text in quick outline (ctrl+o) or type hierarchy (ctrl+t)
are white on white (in the default gtk theme). The dark theme displays them with #CCC on white (which is hardly visible, too).

It might be related (or even caused by fixes) to Bug 487687 and Bug 491327, which are dealing with GTK3 backend instead.

System info: Archlinux, Gnome/Gtk 3.20, default light Adwaita theme.

A workaround is, e.g., to append the following to e4_default_gtk.css:

Tree {
  color: black;
}

Note that this only fixes the color of tree elements not the search text.

P.S. (I am not sure if there is a bug for the following.)
The reason why this is important is because Eclipse with GTK3 backend unfortunately suffers major usability issues and is virtually unusable at least on my system. The issues are: 
1) It crashes a lot (e.g., the marketplace does not start at all).
2) It is not as responsive. Feels at least 2 times slower.
3) The screen flickers on scroll. 
4) the default gtk3 theme (adwaita) does not seem to blend well with eclipse: the panel buttons are too big and take a lot of unnecessary space. There are some rough edges everywhere.
Comment 1 Patrik Suzzi CLA 2016-06-30 04:10:21 EDT
Thanks for reporting. 

Neon has a good support for GTK 3, and most of the bugs are solved. 

Could you please verify if the issue persists with Neon ?
Comment 2 Patrik Suzzi CLA 2016-06-30 04:33:23 EDT
Note about Usability in Linux.

There are two main issues:

1. GTK 2 vs GTK 3
2. WEBKIT (libwebkitgtk ) vs WEBKIT 2 (libwebkit2gtk) [see Bug 492379]

1 - Neon works properly with GTK3.
  - For Mars.2 or below you can use GTK_2

2 - Eclipse uses by default WEBKIT, but some systems have only WEBKIT 2. 
  - if you have libwebkit2gtk, start eclipse with SWT_WEBKIT2=1
    (or install libwebkitgtk)
Comment 3 Aleksei Lissitsin CLA 2016-06-30 05:33:43 EDT
(In reply to Patrik Suzzi from comment #2)
------------------------------
> 2 - Eclipse uses by default WEBKIT, but some systems have only WEBKIT 2. 
>   - if you have libwebkit2gtk, start eclipse with SWT_WEBKIT2=1
>     (or install libwebkitgtk)
I have libwebkitgtk installed, so did not test if there is a problem with libwebkit2gtk.
------------------------------
> 1. GTK 2 vs GTK 3

GTK2: 
The issue persists in Neon.

GTK3:
In Neon, it is now better than in Mars. Of my previous complaints 1-4, 
4) is fixed (it blends well now)
2) and 3) are better now, although the responsiveness with GTK2 still feels very noticeably better,
1) I did manage to get a crash with GTK3 (after trying to search via quick access), (after which any action (like triggering a dialog or closing a tab) was hanging until you press the eclipse exit button, then it proceeded, but any subsequent actions still hanged). 
The same search with GTK2 does also gives an error but no hang. 
Still this crash might not depend on GTK version at all.

5)
There is another issue with GTK3: https://bugs.eclipse.org/bugs/show_bug.cgi?id=439884
This affects javadoc, ctrl+t and ctrl+o screens.
The thin blue on black (e.g., links in javadoc or inherited members in ctrl+o) are hardly readable.

All in all, setting backend to GTK2 (and applying workaround) still seems to improve usability (and I suspect due to 2) and 3) on slower computers even more so). 

So, IMHO, fixing the experience with GTK2 is very much worth it.
Comment 4 Patrik Suzzi CLA 2016-06-30 06:12:59 EDT
(In reply to Aleksei Lissitsin from comment #3)
> So, IMHO, fixing the experience with GTK2 is very much worth it.

Aleksei, you mentioned you already have in mind a fix for this. 

Why don't you sign the Eclipse CLA, setup the Development environment, and contribute yourself the patch ?

#1 https://wiki.eclipse.org/Development_Resources/Contributing_via_Git#Eclipse_Foundation_Contributor_License_Agreement
#2 https://wiki.eclipse.org/Platform_UI/How_to_Contribute
Comment 5 Aleksei Lissitsin CLA 2016-06-30 06:48:11 EDT
(In reply to Patrik Suzzi from comment #4)
> Aleksei, you mentioned you already have in mind a fix for this. 

I don't really have a fix. Just a workaround, which adds some classes to css.

>A workaround is, e.g., to append the following to e4_default_gtk.css:
>
>Tree {
>  color: black;
>}

This is not a perfect fix because it breaks GTK3 experience (it will be black on black there). So one solution using this would be to somehow add another theme choice to eclipse (GTK for GTK2 backend) or try to use some gtk-backend-aware selectors (if it is at all possible). I do not know how to do any of this.

Another problem with this is that it only fixes text in the outline tree not in the search text field.

-----------------------

The regression is most probably caused by deletion of

	} else {
		super.setBackgroundColor(context, handle, rgba);
		OS.gtk_widget_override_background_color(handle, OS.GTK_STATE_FLAG_SELECTED, selectedBackground);

in

https://git.eclipse.org/r/#/c/70680/3/bundles/org.eclipse.swt/Eclipse+SWT/gtk/org/eclipse/swt/widgets/Text.java

from commit https://git.eclipse.org/r/#/c/70680/
in https://bugs.eclipse.org/bugs/show_bug.cgi?id=491327.

but I am not sure how it affects the rest of Eclipse. Maybe Eric Williams can answer this.

------------------------

But thanks for the suggestion. I might sign the CLA if I knew what was the proper fix.
Comment 6 Patrik Suzzi CLA 2016-06-30 08:45:47 EDT
Adding Eric in c/c, as he might give advice.
Comment 7 Patrik Suzzi CLA 2016-06-30 11:09:05 EDT
Moving
Comment 8 Eric Williams CLA 2016-07-02 12:19:42 EDT
Will investigate.
Comment 9 Eric Williams CLA 2016-07-04 15:07:40 EDT
This issue is reproducible on my machine. I will investigate further.
Comment 10 Eric Williams CLA 2016-07-04 16:14:50 EDT
(In reply to Eric Williams from comment #9)
> This issue is reproducible on my machine. I will investigate further.

The issue has been present since Luna.
Comment 11 Eric Williams CLA 2016-07-19 16:53:54 EDT
Since this isn't a regression from my patch, I'm tossing this bug back into the pool. GTK2 bugs are low priority at the moment, as man power is focused on fixing GTK3 issues.
Comment 12 Leo Ufimtsev CLA 2018-02-07 10:10:42 EST
Triaging Gtk2-only bugs. Please see Bug 530841 for details.
Comment 13 Eric Williams CLA 2018-07-10 13:57:35 EDT
Please note: GTK2 support for SWT is being dropped in Eclipse 4.10 / SimRel 2018-12 release. 

See the following mail for more info: http://dev.eclipse.org/mhonarc/lists/cross-project-issues-dev/msg15783.html
Comment 14 Alexander Kurtakov CLA 2018-07-12 10:14:07 EDT
Marking the bug as wontfix as no work for GTK2 issues will happen. Please reopen if you still face the issue using GTK 3.x.