crystallabs/crysterm

Fix ever-increasing opacity

Opened this issue · 0 comments

There is an issue with transparency, where a transparent element gets more opaque on every render.

This is caused by code found at first occurrence of 'transparency' in src/widget.cr.

Example can be seen e.g. on members list widget in examples/chat.cr.

In Blessed, the value of lines[y][x][attr] seems to always be the same, whereas in our case it has the resulting value from previous render, and so on every render the field's color gets additionally blended until it has 100% opacity rather than staying at initial/desired value.