Community
Participate
Working Groups
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.
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.
(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.
As said, I would be fine to resolve as WONTFIX or NOT_ECLIPSE .
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.