Skip to content

How to achieve image scaling and adaptive width #927

Answered by coderedart
imxood asked this question in Q&A
Discussion options

You must be logged in to vote

Did you try just passing the https://docs.rs/egui/0.15.0/egui/struct.Ui.html#method.available_size as the size for image widget?
Just choose whatever container like egui area or central panel and inside the closure get the remaining area to set as image widget size.

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@imxood
Comment options

Answer selected by imxood
Comment options

You must be logged in to vote
1 reply
@imxood
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants