Hi,
I create a menubar that has icons and align it right there.
When the menubar is first shown, it runs out of the browser window.
To me it looks as if the width calculation does not know the icons width and so ignores them.
After a browser refresh the menubar is shown correct.
Either the width calculation should wait until the icons are loaded or recalculate then.
Or there should be a way to tell the icons width by code.
Sample-Code:
setTheme("runo");
Window main=new Window("Test");
main.setSizeFull();
setMainWindow(main);
main.getContent().setSizeFull();
MenuBar menuBar=new MenuBar();
menuBar.addItem("Test", new ThemeResource("icons/16/calendar.png"), null);
menuBar.addItem("ABC", new ThemeResource("icons/16/document.png"), null);
menuBar.addItem("123", new ThemeResource("icons/16/help.png"), null);
main.getContent().addComponent(menuBar);
((VerticalLayout)main.getContent()).setComponentAlignment(menuBar,Alignment.TOP_RIGHT);