Why do UI elements resize different rates?
-
When resizing the window, not all of the elements scale at the same rate
Meaning if I resize the window to double its size, the UI should look like the same UI stretched but it doesn't not everything changes size at the same rate
Even creating a simple test program with only text and a button in a vertical layout and they still scale at different speeds.
-
what do you mean different "speeds"? "rates"? Speeds infers redraw time. Comment about stretched infers inconsistent scaling behaviour.
-
what do you mean different "speeds"? "rates"? Speeds infers redraw time. Comment about stretched infers inconsistent scaling behaviour.
@Kent-Dorfman I mean resizing of course, All the widgets don't change size proportionally.
I would expect that stretching out the window and resizing would result in UI looking the same just stretched or enlarged, but that's not what happens and I'd really appreciate some info
-
@Kent-Dorfman I mean resizing of course, All the widgets don't change size proportionally.
I would expect that stretching out the window and resizing would result in UI looking the same just stretched or enlarged, but that's not what happens and I'd really appreciate some info
@thetruejoyofcode
In that case it depends on the layout strategies of contained widgets and their size hints. Making a form scale correctly is a bit of an art. -
@thetruejoyofcode
In that case it depends on the layout strategies of contained widgets and their size hints. Making a form scale correctly is a bit of an art.@Kent-Dorfman okay, thank you!
So there isn't an easy way to keep everything at the same proportions?
-
@Kent-Dorfman okay, thank you!
So there isn't an easy way to keep everything at the same proportions?
@thetruejoyofcode everything depends on how you do size your components.
For example, if you size an item to be 100x50px for example, it will always be 100x50px what ever the size of your window, this item will never be resized.
If on the other hand you specify your item to be half the width and height of the parent window, it will always be resized to the half of the window.
In fact it is strongly dependent on whether you size your item in an absolute or relative manner.
-
When resizing the window, not all of the elements scale at the same rate
Meaning if I resize the window to double its size, the UI should look like the same UI stretched but it doesn't not everything changes size at the same rate
Even creating a simple test program with only text and a button in a vertical layout and they still scale at different speeds.
This post is deleted!