Submenu Icon not aligned with text

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.

Hi!

It definately looks like a bug to me, so I filed a ticket for you at http://dev.itmill.com/ticket/2821

The R&D guys will have a look at it and decide whether to incorporate your fix or do some other magic :slight_smile:

Thanks for the report!

/Jonatan