Menu Item Icon size

Answered
0
0

Next question to your product

I have added a menu bar and there I added a menu item with an icon.

The “problem” now is, that I want to use a 32×32 size (png file) for a good UI experience.

but this is not set. The image is cut and looks ugly.

Is there any possibility to set the image size?

THX

  • You must to post comments
Best Answer
1
0

The size and other settings for the image in menu items is set in the themes. The key is menu/item/icon for the items in the drop down menu and menubar/item/icon for the items in the menu bar. I just noticed that the items in the menubar and menu don’t have the “scale”:true property – probably because we mostly use svg images.

You can set the size of the menubar, and menu items and icon, etc. in a theme mixin that changes only specific settings in the loaded theme, allowing the app to personalize a theme and still be able to use any theme. I have attached a mixin that fixes the missing scale property (now any image will scale to fit the size of the icon widget) and it sets the size to 32×32 and the menubar height to 40.

Place the mixin.theme file in /Themes. You can either deploy it or set it to “EmbeddedResource”.

Added screenshot. You can also change the size and padding (or any other theme property or style).

screen

 

HTH

  • Harald Bacik
    Just for your information: Same issue with the image in button – THX
  • Luca (ITG)
    The image in button defaults/scales to the size set in the theme to avoid having to resize the images and to have a consistent look. See answer above with screenshot.
  • You must to post comments
0
0

WOW – Your support is great!

Works 100%

THX a lot!

  • You must to post comments
0
0

The first button defaults to the image size in the theme.

The second button uses an image list with size set to 32×32.

 

screen

  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.