The patch makes so that buttons with a fixed background, like as an example the outilner restriction toggles, always use the regular text color, since their active/inactive state is defined by changing the icon itself.
Before and after the patch with the default Blender Light theme:
{F11770666} {F11770668}
This solves the immediate problemPart of the same problem, these toggles get the colored emboss when animated, but theme customizability is still limited,it's currently being mixed with different backgrounds based on the active state; since these "regular" icons are drawn in all sort of placesthis is also true for the dark theme.
I think that the best thing herBefore and after the patch with the default theme:
{F12668463}
---
This mostly solves the problem I think, but theme customizability is still limited, since these "regular" icons are drawn in all sort of places.
The best thing here maybe would be to get the theme settings from the region/panel where the icon is drawn, but I don't know if it's possible to get them from `ui_draw_but()`.