-
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Can't set border radius using an image #127
Comments
After some research and testing, it seems quite hard with the current way we handle the widgets on TLDR: We would need to create a specific The ClipRRect seems to be a good solution compared to the previous one but according to developers the ClipRRect needs more computing power so this might be bad for apps that use a lot of image clipping. It also adds a new component to Lenra which could be avoided. We need to discuss this issue with the team. @lenra-io/devs |
This problem is linked to this issue: lenra-io/api#6 |
What happened?
It is impossible with the current state of the lenra components to use the border radius with an image. The container will properly use the radius but the image will just overflow in the corners.
A solution could be to use the Container.decoration.image property to assign an image to a container, then the border radius will work properly and we will still be able to customize the image.
Another solution would be to implement the ClipRRect widget that properly clips its child such as an image. This brings a new component on Lenra that is not straightforward to find but it could be used for other things than images (even though I can't think of any for the moment).
The text was updated successfully, but these errors were encountered: