| Summary: | [GTK3.18+] some set/get Background/Foreground color methods have no effect | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Eric Williams <ericwill> | ||||
| Component: | SWT | Assignee: | Platform-SWT-Inbox <platform-swt-inbox> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | critical | ||||||
| Priority: | P3 | CC: | adietish, mat.booth, mistria, peekpoker, snjezana.peco | ||||
| Version: | 4.6 | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | PC | ||||||
| OS: | Linux | ||||||
| See Also: |
https://git.eclipse.org/r/61027 https://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=3dc220718412431322c00e1f820c9ce0168892f5 https://git.eclipse.org/r/61185 https://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=ba37193032191f6c121bbbe35024e212582acf06 |
||||||
| Whiteboard: | |||||||
| Bug Depends on: | |||||||
| Bug Blocks: | 474628 | ||||||
| Attachments: |
|
||||||
|
Description
Eric Williams
Note, this is also responsible for 6 additional JUnit tests to fail. (In reply to Eric Williams from comment #1) > Note, this is also responsible for 6 additional JUnit tests to fail. I did some investigation regarding this matter and it can be broken down in the following manner: There are 8 additional tests that fail. They are all either setBackground() or setForeground() tests. Of these, there are two kinds of failure I am seeing. 1) Fetching a color: this happens only with setForeground() where a color will be set, but an entirely different color will be fetched when using getForeground(). This test failed once on GTK3.16 with setBackground(), but never with setForeground(). 2) Setting a (background or foreground) color to null: this is supposed to reset the control's background/foreground color to the system default. On numerous occasions this test fails on GTK3.18. (In reply to Eric Williams from comment #0) > I believe the solution is to set background/foreground colors using CSS > individually in each Widget, but I will investigate this further. This approach doesn't seem to work. I would like to raise the importance of this issue as it currently prevents from showing Eclipse IDE working on recent GTK without having this ugly and highly visible issue. Isn't this issue related to transparency of some composites? Downstream bug: https://bugzilla.redhat.com/show_bug.cgi?id=1269892 (In reply to Mickael Istria from comment #3) > I would like to raise the importance of this issue as it currently prevents > from showing Eclipse IDE working on recent GTK without having this ugly and > highly visible issue. > > Isn't this issue related to transparency of some composites? Not exactly. Currently in SWT we use gtk_widget_override_background_color() to set background colors for Widgets when the public method setBackground() is called. As of GTK3.16 this function is deprecated and is broken as of GTK3.18. This means that it does not work reliably and thus results in these background color issues. I am currently working on a fix using CSS and it's at the top of my to-do list. New Gerrit change created: https://git.eclipse.org/r/61027 (In reply to Eclipse Genie from comment #6) > New Gerrit change created: https://git.eclipse.org/r/61027 This Gerrit change eliminates the failing set/getForegroundColor() test cases. The solution is outlined in this blog post, under the section "What do you have to do?": https://blogs.gnome.org/mclasen/2015/11/20/a-gtk-update/ Please note that this only fixes foreground color issues, and that the background color bug is still present in GTK3.18+. Gerrit change https://git.eclipse.org/r/61027 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=3dc220718412431322c00e1f820c9ce0168892f5 New Gerrit change created: https://git.eclipse.org/r/61185 (In reply to Eclipse Genie from comment #9) > New Gerrit change created: https://git.eclipse.org/r/61185 This change is just to fix a simple typo from the original patch. Gerrit change https://git.eclipse.org/r/61185 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=ba37193032191f6c121bbbe35024e212582acf06 *** Bug 483706 has been marked as a duplicate of this bug. *** I'm going to mark this fixed as the failing tests are resolved, and forms/wizards now have their correct background colors. For the replacement/removal of gtk_widget_override_background_color() and gtk_widget_override_color(), please see bug 483096 and bug 483097, respectively. Now that this has been addressed, is there any chance the fix will be available sometime in the current stable Mars release, or will those using gtk 3.18 need to wait until 4.6 in ~6 months? Thanks (In reply to Michael from comment #14) > Now that this has been addressed, is there any chance the fix will be > available sometime in the current stable Mars release, or will those using > gtk 3.18 need to wait until 4.6 in ~6 months? Thanks I don't see any issues backporting this fix to Mars. I'll make a patch. |