kockie69 / SquinkyVCV-main

GNU General Public License v3.0
22 stars 12 forks source link

Adjust brightness of SVG lights #38

Closed xandramax closed 2 years ago

xandramax commented 2 years ago

I use Kitchen Sink often, and found the new v2 lit buttons to be uncomfortably bright when Rack brightness is reduced-- especially the white ones.

This PR scales the brightness (alpha) of these SVG-lights from maximum to a hard-coded minimum as Rack brightness is reduced from maximum to zero. This way, the SVGs render as normal when the "room lights" are bright, and as the room lights dim the "underlying LED brightness" of the buttons is revealed.

This roughly approximates the behavior of a frosted surface with soft back-lighting; in daylight conditions, the ambient light reflected by the surface is greater than the light produced from the LED.

xandramax commented 2 years ago

Implementing this revealed some odd things that maybe could be improved, for example:

Basically, the class structure for these particular button components could probably be simplified or homogenized to make future maintenance easier.

kockie69 commented 2 years ago

I have merged it, I like the effect. I think I will apply it to the other modules to.

As soon as v2 is stable I am planning to have a thorough look at the complete codeset to optimise/improve but for now this has no priority.

Thanks