You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm new to GUI programming, so I may just be going about this the wrong way, but I haven't found a way to get the results that I'm looking for. Consider the following layout:
I want B and C to fill their column horizontally and vertically. Since the column's width is set to shrink, the column's width should be the shortest possible (just wide enough for button B). Similarly, the column's height should fill the row, which is shrunk to the height of button A. So something like this:
However, instead on desktop I get this:
The elements fill the entire window, not their container.
and on web:
Widths seem to work the way I hoped, but setting height doesn't seem to work at all.
I think what should be happening is that Length::Fill elements should only fill the space available in the parent, and Length::Shrink containers should take the minimum possible size for all elements and pick the largest one. If that's not the way it should work, then maybe a new variant (Length::FillParent?) would be useful.
The text was updated successfully, but these errors were encountered:
Yes, Shrink should be renamed to something like Content.
The current native layout engine, while usable, is one of the most experimental parts of the library. As you see, iced_web doesn't completely match its behavior.
We need to iterate further and fix any inconsistencies like this one. Either by renaming things or improving the engine itself.
I'm new to GUI programming, so I may just be going about this the wrong way, but I haven't found a way to get the results that I'm looking for. Consider the following layout:
I want B and C to fill their column horizontally and vertically. Since the column's width is set to shrink, the column's width should be the shortest possible (just wide enough for button B). Similarly, the column's height should fill the row, which is shrunk to the height of button A. So something like this:
However, instead on desktop I get this:

The elements fill the entire window, not their container.
and on web:

Widths seem to work the way I hoped, but setting height doesn't seem to work at all.
I think what should be happening is that
Length::Fill
elements should only fill the space available in the parent, andLength::Shrink
containers should take the minimum possible size for all elements and pick the largest one. If that's not the way it should work, then maybe a new variant (Length::FillParent
?) would be useful.The text was updated successfully, but these errors were encountered: