Bug 477950 - [GTK3] Port SWT colors from using GdkColor to GdkRGBA so alpha is not lost
Summary: [GTK3] Port SWT colors from using GdkColor to GdkRGBA so alpha is not lost
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.6   Edit
Hardware: PC Linux
: P3 enhancement with 2 votes (vote)
Target Milestone: 4.8 M1   Edit
Assignee: Eric Williams CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 271618 (view as bug list)
Depends on: 499380 517578 519138
Blocks: 439884 470515 494883 Gtk3ImprovementTracker 518532 519321 519711 519787 520127 520160 520164
  Show dependency tree
 
Reported: 2015-09-21 09:22 EDT by Eric Williams CLA
Modified: 2018-01-02 15:29 EST (History)
10 users (show)

See Also:


Attachments
Screenshot (23.90 KB, image/png)
2016-09-30 08:44 EDT, Markus Duft CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Williams CLA 2015-09-21 09:22:10 EDT
This is more of a long term project rather than a bug. Currently in SWT we have alpha values being lost for many widgets, as colors are currently stored in GdkColor objects, not GdkRGBA. There are also instances where alpha values are hard-coded to 1 and never set.

This would take quite a bit of effort since many widgets are affected by this. Code duplication would also ensue because separate code paths for Gtk2 and Gtk3 would be needed. However this issue affects lots of different areas, so it would probably be worth fixing eventually, and Gtk2 will be around for the foreseeable future.

This affects things like bug 441566, bug 439884, etc. -- places where a lack of transparency is particularly ugly (for example, colored text on a black background).

Feel free to discuss. :)
Comment 1 Eric Williams CLA 2016-05-27 09:55:13 EDT
Looking to spend some time on this in the next 6-8 months. Would be nice to have this for Oxygen.
Comment 2 Leo Ufimtsev CLA 2016-09-19 10:19:59 EDT
*** Bug 271618 has been marked as a duplicate of this bug. ***
Comment 3 Markus Duft CLA 2016-09-30 07:29:57 EDT
I opt for raising priority of this bug, as it has some very negative effects in 4.6.0 and 4.6.1.
Comment 4 Lars Vogel CLA 2016-09-30 07:43:38 EDT
(In reply to Markus Duft from comment #3)
> I opt for raising priority of this bug, as it has some very negative effects
> in 4.6.0 and 4.6.1.

Can you attach some screenshots where we see this effect?
Comment 5 Markus Duft CLA 2016-09-30 08:44:59 EDT
Created attachment 264510 [details]
Screenshot

As described multiple times in 439884. The javadoc colors are completely wrong. This may not sound like a big issue, but it /is/ a big one for a lot of my colleagues. Als the quick outline, quick type hierarchy etc. are affected. No matter what colors are configured by the theme, they are completely ignored.

Sometimes, the /first/ javadoc tooltip shows up very shortly with the correct color, but immediately after it flickers and switches to white on black. Especially links are extremely hard to read in this color setup.
Comment 6 Lars Vogel CLA 2016-09-30 08:52:07 EDT
(In reply to Markus Duft from comment #5)
>The javadoc colors are  wrong.

I don't these wrong colors are part of the alpha issue. The Javadoc colors are reworked in Bug 501742 and for the tooltips are covered by Bug 381010.
Comment 7 Markus Duft CLA 2016-09-30 08:58:38 EDT
In this case comment 44 on bug 439884 is wrong, and also the depends on references this bug.
Comment 8 Leo Ufimtsev CLA 2016-09-30 10:35:26 EDT
1) Priority
(In reply to Markus Duft from comment #3)
> I opt for raising priority of this bug, as it has some very negative effects
> in 4.6.0 and 4.6.1.

Hello Markus.D, 

Eric is currently in 4th year of his university degree and won't be back full time until ~May 2018. Unless somebody else picks up where he paused, it might take a while before progress is made on this patch.

Me/Ian are currently working on Webkit/Wayland port, so we probably won't be able to work on this either.

2) Javadoc / Outline
(In reply to Lars Vogel from comment #6)
> (In reply to Markus Duft from comment #5)
> >The javadoc colors are  wrong.
> 
> I don't these wrong colors are part of the alpha issue. The Javadoc colors
> are reworked in Bug 501742 and for the tooltips are covered by Bug 381010.

The outline colors are already fixed, (try recent nightly build). I'm also nearly done with the Javadoc color fix. Hopefully these two color issues should be resolved soon. Please follow Bug 501742 for updates on the matter.
Comment 9 Eric Williams CLA 2016-09-30 11:17:27 EDT
(In reply to Leo Ufimtsev from comment #8)
> 1) Priority
> (In reply to Markus Duft from comment #3)
> > I opt for raising priority of this bug, as it has some very negative effects
> > in 4.6.0 and 4.6.1.
> 
> Hello Markus.D, 
> 
> Eric is currently in 4th year of his university degree and won't be back
> full time until ~May 2018. Unless somebody else picks up where he paused, it
> might take a while before progress is made on this patch.

Slight correction: May 2017!

The color port patch is done minus the issue with the GSlice error. It's an annoying bug I hope to track down in time for the 4.7 release, time permitting.
Comment 10 Leo Ufimtsev CLA 2016-10-03 09:30:34 EDT
(In reply to comment #9)
> (In reply to Leo Ufimtsev from comment #8)
> Slight correction: May 2017!
Ah yea... :-)
Comment 11 Eric Williams CLA 2017-03-24 09:55:44 EDT
Close to finishing, but not in time for 4.7. Moving to 4.8.
Comment 12 Eclipse Genie CLA 2017-06-02 15:18:22 EDT
New Gerrit change created: https://git.eclipse.org/r/98569
Comment 14 Eric Williams CLA 2017-06-27 09:41:26 EDT
(In reply to Eclipse Genie from comment #13)
> Gerrit change https://git.eclipse.org/r/76631 was merged to [master].
> Commit:
> http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/
> ?id=8f5c12dbbf0d52d77529e8b468c625831e5f4dd0

Patch is in master now. A big thanks to all that helped review! I will be merging JUnit tests in a bit.
Comment 15 Eclipse Genie CLA 2017-06-29 14:06:00 EDT
New Gerrit change created: https://git.eclipse.org/r/100400
Comment 17 Eric Williams CLA 2017-06-29 14:19:43 EDT
(In reply to Eclipse Genie from comment #16)
> Gerrit change https://git.eclipse.org/r/98569 was merged to [master].
> Commit:
> http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/
> ?id=4f872fd395164f725f4b93c20c939640f33f2146

Tests are merged.
Comment 19 Eclipse Genie CLA 2017-07-04 10:09:44 EDT
New Gerrit change created: https://git.eclipse.org/r/100636
Comment 21 Eclipse Genie CLA 2017-07-04 13:54:11 EDT
New Gerrit change created: https://git.eclipse.org/r/100659
Comment 22 Eric Williams CLA 2017-07-04 17:02:01 EDT
(In reply to Eclipse Genie from comment #20)
> Gerrit change https://git.eclipse.org/r/100636 was merged to [master].
> Commit:
> http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/
> ?id=a11c0c7796b373c0b90c36a2f484694075cc0994

This fixes the failing test cases on Win32, which has no transparent foreground color support.
Comment 23 Eclipse Genie CLA 2017-07-12 11:42:58 EDT
New Gerrit change created: https://git.eclipse.org/r/101133
Comment 25 Eric Williams CLA 2017-07-12 13:09:08 EDT
(In reply to Eclipse Genie from comment #24)
> Gerrit change https://git.eclipse.org/r/101133 was merged to [master].
> Commit:
> http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/
> ?id=beb7ed1153ccbc46a55dc532aa013d8744ac4ee8

Committed a snippet for comparing system color values. Only useful on Fedora with the Adwaita theme, but very helpful when dealing with system color issues.
Comment 26 Dani Megert CLA 2017-07-13 08:44:31 EDT
Could this be the cause for bug 519616?
Comment 27 Eric Williams CLA 2017-07-13 09:16:01 EDT
(In reply to Dani Megert from comment #26)
> Could this be the cause for bug 519616?

Possible but unlikely. The gerrit tests started failing yesterday morning even though the alpha test cases and main patch have been merged for almost 2 weeks. AllNonBrowser tests pass locally for GTK2.24 all the way through 3.22.
Comment 28 Eclipse Genie CLA 2017-07-26 07:41:08 EDT
New Gerrit change created: https://git.eclipse.org/r/101989
Comment 29 Eclipse Genie CLA 2017-07-26 07:41:11 EDT
New Gerrit change created: https://git.eclipse.org/r/101991
Comment 30 Eclipse Genie CLA 2017-07-26 07:41:12 EDT
New Gerrit change created: https://git.eclipse.org/r/101990
Comment 34 Eric Williams CLA 2017-07-26 11:18:23 EDT
(In reply to Eclipse Genie from comment #31)
> Gerrit change https://git.eclipse.org/r/101989 was merged to [master].
> Commit:
> http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/
> ?id=3b7a03ad4819bd0b57a0b8cd57a7a8d1f7604e9a

(In reply to Eclipse Genie from comment #32)
> Gerrit change https://git.eclipse.org/r/101990 was merged to [master].
> Commit:
> http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/
> ?id=06ebabcb138760679f584678c7485fb15f183f7f

(In reply to Eclipse Genie from comment #33)
> Gerrit change https://git.eclipse.org/r/101991 was merged to [master].
> Commit:
> http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/
> ?id=942848839aa09ec1e546f97e0b03ea8d287c8b89

All three patches are in master now. Thank you Andrey!
Comment 35 Eclipse Genie CLA 2017-09-06 11:19:21 EDT
New Gerrit change created: https://git.eclipse.org/r/104580