Hi,
Sumbenu icon is not aligned with the menu item’s text.
Is this a bug?
I have fixed this in my own component (a pop-up menu system which is based on the existing menu bar):
I have just changed a few lines in my client-side component from what was written in IMenuBar.updateFromUIDL:
// Construct html from the text and the optional icon.
StringBuffer itemHTML = new StringBuffer();
itemHTML.append("<table cellspacing=\"0\" cellpadding=\"0\" width=\"100%\"><tr><td width=\"90%\">");
if (item.hasAttribute("icon"))
itemHTML.append("<img src=\"" + client.translateToolkitUri(item.getStringAttribute("icon")) + "\" align=\"left\" />");
itemHTML.append(itemText);
itemHTML.append("</td><td width=\"10%\">");
if (item.getChildCount() > 0 && submenuIcon != null)
itemHTML.append("<img src=\"" + submenuIcon + "\" align=\"right\"/>");
itemHTML.append("</td></tr></table>");
Thanks,
Houman.