SWT.RIGHT in trim contributions toolbar [message #1696395] |
Tue, 26 May 2015 09:45 |
Arnaud MERGEY Messages: 243 Registered: March 2010 Location: France |
Senior Member |
|
|
Hello,
In my application I have a toolbar (toolbar:org.eclipse.ui.trim.command2) where I contribute actions declaratively.
Since RAP 3.0 RC1 and SWT.RIGHT support, text is displayed below the icon instead of next the icon as before.
Do you know if there is a way to set SWT.RIGHT style to declarative toolbars in workbench, or something else I could do, to restore previous behavior ?
Cheers,
Arnaud
[Updated on: Tue, 26 May 2015 11:13] Report message to a moderator
|
|
|
Re: SWT.RIGHT in trim contributions toolbar [message #1696431 is a reply to message #1696395] |
Tue, 26 May 2015 12:56 |
Arnaud MERGEY Messages: 243 Registered: March 2010 Location: France |
Senior Member |
|
|
I managed to restore previous behavior, but I am not sure it is really clean:
I have overriden org.eclipse.ui.application.WorkbenchWindowAdvisor.createWindowContents(Shell)
@Override
public void createWindowContents(Shell shell) {
super.createWindowContents(shell);
WorkbenchWindow wdw = (WorkbenchWindow) getWindowConfigurer().getWindow();
ITrimManager trimManager = wdw.getTrimManager();
IWindowTrim wtrim = new SwtRightToolBarTrimProxy("myid", wdw);
wtrim.dock(SWT.TOP);
trimManager.addTrim(SWT.TOP,wtrim);
}
Do you see a better way ?
[Updated on: Tue, 26 May 2015 12:58] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.03379 seconds