Community
Participate
Working Groups
I'm adding a PaintListener to the Table underlying a TableTree, and seeing a problem in paintControl() on GTK. There seems to be a misallignment between the bounds of the PaintEvent's gc and the bounds of its widget (the Table). For example, see the attached screen capture. On it, I've just drawn two lines, to show the top-left corner: event.gc.drawLine(0, 0, 0, 15); event.gc.drawLine(0, 0, 15, 0); On other platforms, (0,0) is at the top of the header, but here, it's under it. Since I'm using the bounds of the items to figure out where to draw, I've got a problem. For example, if I getBounds() on the first item, it reports x=1, y=31, which clearly doesn't line up with the GC like it does on other platforms. The Table available from event.widget has bounds just like on other platforms: x=0, y=0.
Created attachment 5951 [details] Screen capture of a TableTree showing (0,0) on the GC. In paintControl(), the origin appears under the Table's header.
Investigating further, it seems that it's not just the GC that's misaligned, but also the PaintEvent's x, y, width, and height values. For example, my Table's height is 115, according to getBounds(), but when the whole thing is repainting, the PaintEvent has y=0 and height=84.
*** This bug has been marked as a duplicate of 42416 ***