Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 342149 - [FieldAssist] Image of ControlDecoration is painted outside the parent area
Summary: [FieldAssist] Image of ControlDecoration is painted outside the parent area
Status: CLOSED DUPLICATE of bug 339663
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.7   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-07 08:57 EDT by m.blank CLA
Modified: 2017-08-25 12:18 EDT (History)
5 users (show)

See Also:


Attachments
Small application showing the bug (7.12 KB, image/png)
2011-04-07 08:59 EDT, m.blank CLA
no flags Details
Application Source, created with WindowBuilder (3.71 KB, text/plain)
2011-04-07 09:02 EDT, m.blank CLA
no flags Details
ControlDecoration painting outside (49.40 KB, image/png)
2011-06-22 14:18 EDT, Ethan Chan CLA
no flags Details
Test snippet (6.49 KB, application/x-zip-compressed)
2011-06-27 16:30 EDT, Oleg Besedin CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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 ***