Bug 483096: [GTK3.16+] gtk_widget_override_background_color is
deprecated

This patch is combined backport for the following commits:
9227d728eba1d0a4ac6bdb3c2c1622885187e116
428cc3497ee844b9262d1bdc7cb09a8332eee87c
b32e6b93f9f20497aefb1aafcabe5599e6ab946a

As of GTK3.16, gtk_widget_override_background_color() is deprecated. The
preferred GTK method of setting background colors is through the CSS
theme machinery. Unfortunately this also means some calls to
gtk_widget_override_background_color() will fail (i.e. bug 479998). This
patch aims to prevent cases like that happening in the future. 

We already apply certain CSS properties to individual widgets in
Control, therefore setting background colors isn't problematic -- this
patch merely builds off of this functionality. In addition, this patch
implements the ability to read and parse GTK CSS, converting properties
like "background-color" and "background" into GdkRGBA/GdkColor objects. 

Note, there are a few widgets that override setBackgroundColor() and
therefore need some additional tweaks: Table/Tree, ToolBar, Text, Label,
and Spinner. 

Tested on GTK3.18, 3.16, 3.14, and 2.24. AllNonBrowser JUnit tests pass
on GTK2 and GTK3.

Change-Id: I909c45f36e5dcf16adf884250fb83f259232363e
Signed-off-by: Eric Williams <ericwill@redhat.com>
22 files changed
tree: 59a6d27935331f4f9875de4c452be524ca27b11e
  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:

Information regarding source code management, builds, coding standards, and more.

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!