Is it possible to scale widgets with window size? #1948
Unanswered
terrarier2111
asked this question in
Q&A
Replies: 1 comment 3 replies
-
For widgets you can use all the options of https://docs.rs/iced/latest/iced/enum.Length.html, some of them being relative to the size of the container. I'm not sure you can use them for text though. The other thing you want is padding. Some widgets like Row, Column and Container support it. I don't know if they support the relative Length variants, but you can try. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
There are size functions e.g on the Text widget, but the size is in pixels which means the widget will always be the same size no matter the window size, would it be possible for the text to be e.g 20% of the window's size consistently no matter the actual window size? Also would it be possible to offset widgets from the borders of the window by x% of the window's x size or y size?
Beta Was this translation helpful? Give feedback.
All reactions