Skip to content
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

Widget Opacity #3473

Closed
soundprojects opened this issue Oct 15, 2023 · 2 comments · Fixed by #3965
Closed

Widget Opacity #3473

soundprojects opened this issue Oct 15, 2023 · 2 comments · Fixed by #3965

Comments

@soundprojects
Copy link

Is your feature request related to a problem? Please describe.
It seems that is currently not possible to easily set the opacity of a widget

Describe the solution you'd like
Would be nice if we can set the opacity with a set_opacity() method

Describe alternatives you've considered
Tried using colours to match background colours or use the alpha parameter in the premultiplied function but this is a bit tedious if you just want to change the opacity for a set of elements

Additional context

YgorSouza added a commit to YgorSouza/egui that referenced this issue Feb 4, 2024
@emilk
Copy link
Owner

emilk commented Feb 5, 2024

Can I ask what you want widget transparency for?

@soundprojects
Copy link
Author

Of course. A widget opacity option would allow me to create fade transitions more easily using the egui_animations crate.

I use a workaround currently where I animate an overlay the size of my widget with the same color as the background color but this does not scale well.

emilk pushed a commit that referenced this issue Feb 16, 2024
hacknus pushed a commit to hacknus/egui that referenced this issue Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants