How to retrieve "Site Sizes" from my custom node source code

@BartButenaers
that was back in April so... err so I would thing 2.15.0 ? probably ?
The theme call gets the current theme. I think disabled is just transparent (opacity 0.5) or #808080 or something like that so that it works on both light and dark themes.

2.16.0 also adds the ui.isDark() call that returns true/false if the overall theme is dark (or light) - so the widget can switch locally.

Makes sense. Didn't knew it worked like that. Thanks!

But then the 3 widget colors also switch to a darker value I hope/assume? It is for our UI contextmenu node. We would like to show the menu items in the current theme colors. So I hoped we had enough by getting the widgetTextColor / widgetBackgroundColor / widgetBorderColor (combined with the opacity for disabled menu items).

If you are using the standard styles then yes you will get the theme colours in use at that time. The isDark() is useful if you had your own style you needed to switch ( like the table tabulator library)

1 Like