Context Menu Icon Size and Hover Color

0
0

Hi All,

Using the Theme builder, I have been able to Increase the Font Size and Item size for my Context Menu essentially making each item bigger.

Using the IconSource property, I have attached icons from the ModernUI theme to each item.

I’m struggling however to adjust 2 additional items

  1. How can I increase the Icon size inside each item?  It still seems to be the original size
  2. I have adjusted the properties so when I hover over each item, the background color changes and the Text Color changes, but the icon color doesnt change and I cant seem to find an option for that.  Is it possible to change icon color on hover?  It doesnt seem to adhere to the TextColor.

 

Thanks,

Brayden.

  • You must to post comments
0
0

I’ve attached a sample that shows increased icon size, custom icon color, and custom icon color on hover. Run the sample and right-click on the button to open the context menu.

Here’s a code snippet from the theme file that shows where I edited the width/height of the icon, the color of the icon, and the hover color of the icon. You can find the full theme file in the sample-it’s called menucolor.theme.


"menu": {
"components": {
"item": {
"components": {
"icon": {
"states": {
"default": {
"properties": {
"width": 100,
"height": 100,
"marginRight": 8,
"scale": true,
"textColor": "#F16513"
},
"styles": {
}
},
"selected": {
"properties": {
"textColor": "#00FF57"
},
"styles": {
}
}
}
}
}
}

I’ve also included screenshots of what the theme looks like in the theme builder.

Note that you will have to edit the JSON text of the theme file manually to add the “width” and “height” properties to the icon- they are not included by default.

-Julie

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.