Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 345798 - Tree.setBackground() doesn't work as expected on OpenSuSE 11.4
Summary: Tree.setBackground() doesn't work as expected on OpenSuSE 11.4
Status: RESOLVED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.6.2   Edit
Hardware: PC Linux
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-13 20:32 EDT by Chris Williams CLA
Modified: 2016-03-17 12:01 EDT (History)
2 users (show)

See Also:


Attachments
Installed packages on SUSE 11.3 (45.77 KB, text/plain)
2016-03-17 08:26 EDT, Martin Oberhuber CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Williams CLA 2011-05-13 20:32:46 EDT
Build Identifier: I20110428-0848

We do some custom theming and set different FG/BG colors of various views and controls. Calling Tree.setBackground with a black color typically just does what you'd expect on most OSes. On OpenSuSE 11.4 and some other Linux variants, the tree does _not_ end up with a black background, as it seems the OS is using it's own drawing (an odd/even white/light grey row scheme).

In addition, the rest of the area below the tree items to the bottom of the client area for the tree is filled with a white bg.

As a result of this, to force colors for this case I need to add custom EraseItem and Paint listeners. The EraseItem explicitly draws the black background with the GC object for each TreeItem. The Paint listener draws from the bottom of the last item's bounds to the end of the clientArea bounds.

I'm running OpenSUES 11.4 (x86_64) through VMWare on my Mac OSX 10.6.7 system.

OS:  Linux 2.6.37.1-1.2-desktop x86_64
System:  openSUSE 11.4 (x86_64)
KDE:  4.6.00 (4.6.0) "release 6"

Reproducible: Always

Steps to Reproduce:
1. Create a Tree Object as a child of some view onscreen.
2. When constructing it call setBackground with a Color for black.
3. Notice how the background remains white/light grey alternating by rows.
Comment 1 Martin Oberhuber CLA 2016-03-17 08:26:48 EDT
Created attachment 260380 [details]
Installed packages on SUSE 11.3

CQ:WIND00-WB4-6656
We could also reproduce the problem on SUSE 11.3 / GTK 2.18 -- attached is a list of all installed packages. For both "List" and "Tree" widgets, SWT cannot set the background color.

The workaround on https://bugs.eclipse.org/bugs/show_bug.cgi?id=255810#c11 resolved the problem for us.

I'm not sure if it is even possible for SWT to fix this problem -- maybe the bug should just be fixed as NOT_ECLIPSE ? For us, SUSE 12 doesn't show the problem any more.
Comment 2 Eric Williams CLA 2016-03-17 10:13:17 EDT
(In reply to Martin Oberhuber from comment #1)
> Created attachment 260380 [details]
> Installed packages on SUSE 11.3
> 
> CQ:WIND00-WB4-6656
> We could also reproduce the problem on SUSE 11.3 / GTK 2.18 -- attached is a
> list of all installed packages. For both "List" and "Tree" widgets, SWT
> cannot set the background color.
> 
> The workaround on https://bugs.eclipse.org/bugs/show_bug.cgi?id=255810#c11
> resolved the problem for us.
> 
> I'm not sure if it is even possible for SWT to fix this problem -- maybe the
> bug should just be fixed as NOT_ECLIPSE ? For us, SUSE 12 doesn't show the
> problem any more.

This is either an OS specific or GTK related bug. Since it's very old (GTK2.18), we don't have the resources to fix this at the moment.
Comment 3 Martin Oberhuber CLA 2016-03-17 11:25:45 EDT
As said, I would be fine to resolve as WONTFIX or NOT_ECLIPSE .
Comment 4 Alexander Kurtakov CLA 2016-03-17 12:01:00 EDT
Gtk 2.18 is way too old and if it wasn't AIX holding back SWT would have moved to 2.24 as min already. Resolving as wontfix.