Display icons in table contextual menu

Hi

I have a table with quite a lot of actions, so it is not convenient to create buttons for each of them.

image

Is there a way to have the icon displayed in contextual menu ?

image

Regards
Michael

Hi,

Set cuba.gui.showIconsForPopupMenuActions=true (doc) in order ti show icons in a context menu.

Regards,
Gleb

Actually I did in web-app.properties (forgot to mention it) but no icons as you can see in the screenshots.

Maybe this is because I’m using Helium theme, and there is something specific for it ?

image

Michael

Sorry for the inconvenience, this property has been moved to the theme properties, so that it can be set for each theme individually.

If you extended the helium theme in your project, you may already have helium-ext-theme.properties, otherwise you need to create one manually:

  1. create the helium-theme.properties file in the web package of the web module with the following content:
@include=com/haulmont/addon/helium/web/helium-theme.properties
cuba.gui.showIconsForPopupMenuActions=true
  1. Register theme config in the web-app.properties:
cuba.themeConfig=com/company/demo/web/helium-theme.properties

Regards,
Gleb

It is working fine, thank you @gorelov

EDIT: BTW Is it posssible to have such beautiful icons displayed ?

In the screen xml:

The screen when displayed:
image

Michael

Setting cuba.web.useFontIcons=false in the ***-theme.properties file should help.

Well, I probably miss some additional configuration because I have no icons displayed now.

LookupPickerField
image

Buttons
image

Left menu, no more buttons either
image

I see no error in the log complaining about missing JPG icon files. Hereunder my helium-theme.properties file

image

@include=com/haulmont/addon/helium/web/helium-theme.properties
cuba.gui.showIconsForPopupMenuActions=true
cuba.web.useFontIcons=false

I’ don’t see anything obvious in web-app.properties file preventing icon JPG files to load.

Regards
Michael

Looks like a bug, I’ve created a GitHub issue.