Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 322146 - [Forms] FormToolbar renders a separator using ControlContributions
Summary: [Forms] FormToolbar renders a separator using ControlContributions
Status: RESOLVED FIXED
Alias: None
Product: RAP
Classification: RT
Component: RWT (show other bugs)
Version: 1.3   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 1.4 M2   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-09 10:54 EDT by Niels Lippke CLA
Modified: 2010-08-24 04:42 EDT (History)
0 users

See Also:


Attachments
Simple snippet to reproduce it (1.41 KB, text/plain)
2010-08-13 08:01 EDT, Ivan Furnadjiev CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Niels Lippke CLA 2010-08-09 10:54:21 EDT
When adding a control to the form's toolbar using a ControlContribution,
additionally to the control a seperator is also drawn, which is not the case in an RCP  Application.

To reproduce:

public void createPartControl(Composite parent) {
FormToolkit toolkit = new FormToolkit(parent.getDisplay());
final Form form = toolkit.createForm(parent);
form.setText("Form Header");
form.getBody().setLayout(new FillLayout());
toolkit.decorateFormHeading(form);

IToolBarManager mgr = form.getToolBarManager();
mgr.add(new ControlContribution("label") {

@Override
protected Control createControl(Composite parent) {
CLabel label = new CLabel(parent, SWT.NONE);
label.setText("Test");
return label;
}});

mgr.update(true);
}
Comment 1 Ivan Furnadjiev CLA 2010-08-13 08:01:51 EDT
Created attachment 176546 [details]
Simple snippet to reproduce it

When the toolbar parent background mode is set to INHERIT_DEFAULT, the separator shines through the control (Label, CLabel).
Comment 2 Ivan Furnadjiev CLA 2010-08-24 04:42:02 EDT
Fixed in CVS HEAD. Now, separator tool item hides the separator line if a control has been set.