I notice that when I create several MenuItems and sub Menus the icons are not positioned correctly. In all cases here I'm making MenuItems with text and an ImageResource.
Specifically if I make top level menus the icons are shifted to the right and are touching the vertical separator bar that separates the icon from the text, I would expect the icon to be centered between the edge of the menu item and that separator, at least not touching it, or perhaps the same distance the text is away from the separator on the other side.
Also when hovering over the same menu items it seems the icon is positioned too low as its touching the bottom of the selection rectangle. I would expect the icon to be centered in this respect vertically.
P.S. Currently is there a way I can move the icon over and position it more accurately in this version?
It's difficult to picture what you're saying, and there are a few critical details that we're missing. Please consider making a small app with EntryPoint that shows off the problem and including the icons that you're using. Also, be sure to mention in which browser you're noticing this. As an alternative (or in addition), attach a few screenshots so we can see exactly what you're seeing.
Thanks for the example code. At the moment, the menu seems to expect a 16x16 icon. I'll file a bug against the team to investigate basing the size of the gutter and the menu items on the size of the icon. As a workaround, you will probably be able to modify the current menu appearance (specifically the CSS) to accomodate your icons.
Yes, I can confirm that using 16x16 pixel icons makes things look much better.
So it seems at a minimum you should document in all method javadocs that you are expecting 16x16 sized images, there is simply no way that someone is going to know this otherwise. Also it would be good if in the javadocs or someplace you show an example of how one can use CSS to correct the layout if the images are something other than 16x16, I tried to do this but could not find a way to make anything work.
In my current use case I will see if I can change my icons to be 16 x 16 now that I know that's the expected size.