rio-labs / rio

WebApps in pure Python. No JavaScript, HTML and CSS needed
https://rio.dev
Apache License 2.0
453 stars 14 forks source link

Add FrostedGlassFill fill type #32

Closed 16amattice closed 1 month ago

16amattice commented 1 month ago

What does it do?

Added a new Fill type called FrostedGlassFill. This new fill type allows users to specify a color using RGB format (so you can specify the opacity of the color) and a blur in px, which is later converted to rem.

Why is it needed?

I wanted a way to be able to have see-through components with a blur added.

How to test it?

Create a rectangle and set the fill to FrostedGlassFill, providing color and blur. ex: fill=rio.FrostedGlassFill(rio.Color.from_rgb(0, 0, 0, 0.4), 10),

Aran-Fey commented 1 month ago

Thanks for the PR! You honestly did a good job navigating our code base, but unfortunately there are a few issues:

Looking at all this code again made me realize that it's overdue for a refactor, so I'm going to take care of that and then fix all of these issues. So unfortunately I can't accept this PR, but don't worry, your commits will be merged.