Skip to content

AvailableSize with winit #321

Answered by adjabaev
DasLixou asked this question in Q&A
Jan 5, 2023 · 2 comments · 3 replies
Discussion options

You must be logged in to vote

but when i print the layout of my size=100% element its:
Layout { order: 0, size: Size { width: 128000.0, height: 72000.0 }, location: Point { x: 0.0, y: 0.0 } }
and i wonder how i can convert the width: 128000.0, height: 72000.0 back to pixel data.

You probably should pass your percentage on a 0.0-1.0 scale

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
2 replies
@DasLixou
Comment options

@DasLixou
Comment options

Answer selected by nicoburns
Comment options

You must be logged in to vote
1 reply
@DasLixou
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