"grayed-color" style property for screen menus

5 messages - 1779 views

When I use the "grayed-color" property for screen menus, the screenbottombar is also covered by the grayed-color. However, I think this is the wrong behaviour. PopupBox widgets seem to display okay because they have their own dedicated "bottombar" Widget, but MenuPopups seem to just change the Screen bottombar (which is covered by the grayed-color overlay). If this doesn't make much sense, I can provide an image.

A simple workaround for this is to not display the grayed-color property on MenuPopups by adding a condition to the Desktop.java file such as:

if (grayedColor != null && !KuixConstants.MENU_POPUP_WIDGET_TAG.equals(popupContainer.getLastChild().getTag())) {

...

But this isn't a nice solution.

Yes, this is a knowed problem. But the problem occure only if you define a grayed color for menupopups. Why defining this style attribute and after add a line into Desktop to ignore it ?

Why defining this style attribute and after add a line into Desktop to ignore it?

Well, it means that the grayed-color will at least be displayed for a "normal" PopupBox but will be ignored for the MenuPopups (that are displaying the problem) - as mentioned it's not ideal.

MenuPopups doesn't extends PopupBox, then you can have a different style configuration for each kind of widget.

Or simply do something like this (if you define the grayed color at a high level) :

menupopup {

grayed-color:none;

}

Ah right, I see how this works now thanks. I was just applying it as a global property on the desktop style ("desktop { grayed-color: black; }") and hadn't realised it should be used in the way you just outlined.