slint-ui / slint

Slint is a declarative GUI toolkit to build native user interfaces for Rust, C++, or JavaScript apps.
https://slint.dev
Other
17.19k stars 580 forks source link

Opacity not always having an effect on the dropshadow of a rectangle #6359

Closed NigelBreslaw closed 1 week ago

NigelBreslaw commented 2 weeks ago

Normally the drop shadow opacity will change when the Rectangle it belongs to has it opacity changed. So a zero opacity rectangle draws nothing. No rect. No shadow.

In this example you need to swipe right to bring on a hidden sidebar. It has a pink dropshadow that should start with opacity 0 and be invisible and ramp up to 1.0 opacity and be fully visible once the whole sidebar shows. However it is always 1.0 opacity.

If you comment back in line 38 that gives the Rectangle with a shadow a background colour then it starts to work correctly. This issue is only in the live-preview on VSCode. The same example in Slintpad works as expected.

tronical commented 1 week ago

This issue is only in the live-preview on VSCode. The same example in Slintpad works as expected.

Ahh, this is very helpful. I can reproduce this.