T64177 Toolbar icon theming support.
Toolbar icons will be automatically "inverted" depending on the background (toolbar item inner) color.
Differential D6649
T64177 Toolbar icon theming support Authored by Yevgeny Makarov (jenkm) on Jan 22 2020, 8:35 AM.
Details T64177 Toolbar icon theming support. Toolbar icons will be automatically "inverted" depending on the background (toolbar item inner) color.
Diff Detail
Event TimelineComment Actions The theme option has been removed. Comment Actions LGTM, but I'm not sure it was necessary to add yet another patch to do the same thing? You can just update your other one :) Anyway, it's not so important - the main thing is that this seems to work well. In my testing it appears to work great. Comment Actions Adding @Campbell Barton (campbellbarton) as reviewer since he coded toolbar icons, and @Clément Foucault (fclem) since he commented on previous implementation. Hope the other reviewers are ok with me removing them from this - if not, feel free to say so. Comment Actions I believe all colors here are in sRGB space. Please convert to linear colors before doing any operations and convert back to sRGB for storage. Also I would like to see if just decomposing to hsv and inverting the Value component is better or just the same. Comment Actions It seems faster and more correct to change the colors in BKE_icon_geom_rasterize before rasterization, instead of after. Comment Actions Then, maybe not to invert colors every time at re-rasterization, but once at loading .dat-files and store two sets of colors. Or maybe even better to store two prepared sets of colors in .dat files. @Brecht Van Lommel (brecht) @Campbell Barton (campbellbarton) ? Comment Actions To me that seems fine, it's probably a more effective way to get good looking results. But @Campbell Barton (campbellbarton) and @William Reynish (billreynish) know this system better than me. Comment Actions Using HSL now, gives the same result. I tried to use linear colors and HSV, for some reason it doesn't produce good results at all. Now it changes colors before rasterization. Comment Actions Inverting in sRGB usually works better than scene linear, since it's more perceptually linear. I'll commit this with some code tweaks. |