Bug 519321: [GTK3] Preferences window sometimes has white background

In Control.setBackgroundGdkRGBA(): if the incoming GdkRGBA is null, then
the background color needs to be reset to COLOR_WIDGET_BACKGROUND. 

On GTK3.16+ there is an automatic check with GTK CSS to set incoming
GdkRGBA's as COLOR_WIDGET_BACKGROUND if they are null. Setting a null
GdkRGBA using GtkStyleContext machinery resets the current color to its
previous value, which now (after bug 477950) could sometimes be
transparent. This is what was causing the bug. The fix is to set
incoming GdkRGBA's that are null to COLOR_WIDGET_BACKGROUND. Of course
not every widget uses COLOR_WIDGET_BACKGROUND as the default, so it's
been overriden in those places.

This ensures GTK3.14 and below still works correctly when
setBackground(null) is called.

Change-Id: Ib635be9ed61edf8c8e602fe3e27dd8c418210b12
Signed-off-by: Eric Williams <ericwill@redhat.com>
8 files changed
tree: 6d6fbb0777e79c562f0352903664be7b614f966c
  1. bundles/
  2. examples/
  3. features/
  4. local-build/
  5. tests/
  6. .gitignore
  7. pom.xml
  8. README.md
README.md

Contributing to SWT

Thanks for your interest in this project.

Developer resources:

See the following description for how to contribute a feature or a bug fix to SWT.

Information regarding source code management, builds, coding standards, and more and be found under the following link.

Contributor License Agreement:

Before your contribution can be accepted by the project, you need to create and electronically sign the Eclipse Foundation Contributor License Agreement (CLA).

Contact:

Contact the project developers via the project's “dev” list.

Search for bugs:

This project uses Bugzilla to track ongoing development and issues.

Create a new bug:

Be sure to search for existing bugs before you create another one. Remember that contributions are always welcome!