Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 342149

Summary: [FieldAssist] Image of ControlDecoration is painted outside the parent area
Product: [Eclipse Project] Platform Reporter: m.blank
Component: UIAssignee: Platform-UI-Inbox <Platform-UI-Inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: bsd, echan, ob1.eclipse, prakash, remy.suen
Version: 3.7   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Small application showing the bug
none
Application Source, created with WindowBuilder
none
ControlDecoration painting outside
none
Test snippet none

Description m.blank CLA 2011-04-07 08:57:47 EDT
Build Identifier: 20100917-0705

When i use a ScrolledComposite, the ControlDecoration of a Control is displayed outside the area of the ScrolledComposite

Reproducible: Always

Steps to Reproduce:
1. Create a field inside a ScrolledComposite
2. Add a ControlDecoration
3. Move the border of the ScrolledComposite over the decoration image
Comment 1 m.blank CLA 2011-04-07 08:59:36 EDT
Created attachment 192728 [details]
Small application showing the bug
Comment 2 m.blank CLA 2011-04-07 09:02:16 EDT
Created attachment 192730 [details]
Application Source, created with WindowBuilder
Comment 3 Prakash Rangaraj CLA 2011-04-08 01:12:18 EDT
We are painting the image on the control's parent, so it should also get clipped with the parent. I think this bug belongs to SWT,  but not sure. I'll leave it to Susan to decide that.
Comment 4 Ethan Chan CLA 2011-06-22 14:18:41 EDT
Created attachment 198427 [details]
ControlDecoration painting outside

created in a Formpage with bare minimum:

Label l = new Label(form.getBody(), SWT.NULL);
l.setText("wow");
ControlDecoration nestedErrorDecoration = new ControlDecoration(l, SWT.TOP | SWT.LEFT);
final FieldDecoration fd2 = registry.getFieldDecoration(FieldDecorationRegistry.DEC_ERROR);
nestedErrorDecoration.setImage(fd2.getImage());
Comment 5 Ethan Chan CLA 2011-06-22 14:22:37 EDT
Forgot to mention, notice the 'ghost' decorator outside the FormPage on the left.  Not sure why it is rendered at all.  Once I resize the page however, it disappears.
Comment 6 Oleg Besedin CLA 2011-06-27 16:30:46 EDT
Created attachment 198685 [details]
Test snippet
Comment 7 Oleg Besedin CLA 2011-06-27 16:33:16 EDT
(In reply to comment #3)
> We are painting the image on the control's parent, so it should also get
> clipped with the parent. I think this bug belongs to SWT,  but not sure. I'll
> leave it to Susan to decide that.

Yes, seems to be the case. The simple test snippet is attached.
Comment 8 Brian de Alwis CLA 2017-08-25 12:18:54 EDT
From the description, this seems like a dupe of bug 339663.

*** This bug has been marked as a duplicate of bug 339663 ***