Bug 571394

Summary: Text.setBackgroundImage() with MacOS Big Sur is not painting correctly
Product: [Eclipse Project] Platform Reporter: andreas <au>
Component: SWTAssignee: Platform-SWT-Inbox <platform-swt-inbox>
Status: NEW --- QA Contact:
Severity: major    
Priority: P3    
Version: 4.19   
Target Milestone: ---   
Hardware: Macintosh   
OS: Mac OS X   
Whiteboard:
Attachments:
Description Flags
Example with displaced backgroundImage none

Description andreas CLA 2021-02-21 16:00:33 EST
Created attachment 285623 [details]
Example with displaced backgroundImage

With MacOSX Big Sur, background images set with Text.setBackgroundImage() are not painted correctly. The x,y origin of the image is moving, depending on the layout of the Text widget. 
  
It is very strange, because it seems to depend on the layoutData.

I have seen the effect with Composite and with Text widgets with style SWT.MULTI.

In my attached example, I use three Text widgets. If the last one (TextWidget3) has SWT.SINGLE, then the position of the background image of TextWidget2 is correct. 

Also if the numerator of all FormAttachments of the widgets are 0 or 100 (composite2 and textWidget1), than the painting of the background of these widgets are correct.

During resizing the shell, the position of the background image in the widgets are moving.