Search code examples
gwtshadowmenubarsubmenu

How can I disable the shadow dropping behind a sub-menu in GWT MenuBar?


I created a MenuBar with collapsing sub-menus using Googles GWT like in this example: GWT Showcase MenuBar

Hovering over a MenuItem opens a sub-menu if defined. The sub-menu drops a non-css3 shadow, which doesn't fit into my ui design, because I'm using a differently styled css3 box-shadow.

At first sight one doesn't seem to be able to disable this shadow in some property... does someone have an idea how to?


Solution

  • The MenuBar popup is a 9-box - a table with 9 cells. The boxes in the table have style names matching the pattern .menuPopup[Position] and .menuPopup[Position]Inner, where Position is, for example, TopLeft, BottomRight, Left, etc.

    If you copied the styles from the Showcase it should be sufficient to remove all references to the cells that are not .menuPopupMiddleCenter or .menuPopupMiddleCenterInner to remove the drop shadow you see.