Community
Participate
Working Groups
Build Identifier: I20100312-1448 Setting the background colour on a GalleryItem has no effect when the Gallery is using a ListItemRenderer. Culprit appears to be on line 171 (in rev 1.21): if (selected || RendererHelper.isColorsEquals(itemBackgroundColor, gallery .getBackground())) { if (selected) { gc.setBackground(selectionBackgroundColor); gc.setForeground(selectionBackgroundColor); } else if (itemBackgroundColor != null) { gc.setBackground(itemBackgroundColor); } The test "RendererHelper.isColorsEquals(itemBackgroundColor, gallery.getBackground())" should be negated with a "!" at the start, I believe. I can double check once I can check out the source rather than looking at the viewcvs webpage (can't checkout right now as on public WiFi which is blocking port 80...) Reproducible: Always
Created attachment 171917 [details] Snipped demonstrating the problem This is one of the standard snippets, with the addition of the following line which demonstrates the problem: > item.setBackground(item.getDisplay().getSystemColor(i%2 == 0 ? SWT.COLOR_WHITE : SWT.COLOR_YELLOW));
Created attachment 171963 [details] Patch that fixes the problem As expected, the fix was to negate the part of the if-statement as mentioned.
Bug fixed in Nebula V2.3.0 Thank you justin for the patch