Page MenuHome

UI: Don't use different active color for icons without an emboss
Needs ReviewPublic

Authored by Alessio Monti di Sopra (a.monti) on Nov 9 2021, 12:35 PM.

Details

Summary

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:

Part of the same problem, these toggles get the colored emboss when animated, but it's currently being mixed with different backgrounds based on the active state; this is also true for the dark theme.
Before and after the patch with the default theme:


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().

Diff Detail

Repository
rB Blender

Event Timeline

Alessio Monti di Sopra (a.monti) requested review of this revision.Nov 9 2021, 12:35 PM
Alessio Monti di Sopra (a.monti) created this revision.

This looks reasonable, I just wonder if adding a new widget type is the best way to handle that. I don't really know what the alternative would like like, but maybe a check in the existing UI_WTYPE_ICON?

It's also not clear to me that ui_but_is_toggle really means that "their active/inactive state is defined by changing the icon itself." Maybe it does mean that, it's just not obvious to me.

This looks reasonable, I just wonder if adding a new widget type is the best way to handle that. I don't really know what the alternative would like like, but maybe a check in the existing UI_WTYPE_ICON?

It was mainly in order to avoid this problem:


and incidentally to maintain the feedback in these cases: