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
When a explicit minimum size is smaller than default minimum size, Layout(alignment: stretch) will ignore the explicit minimum size: Layout won't use the explicit minimum, it use default minimum instead. Attached code may convey my issue more clearly.
The expected behavior: Layout use explicit minimum size to allocate the layout space.
Setting minimum size to 0 is intended to allocate the layout space to elements only through vertical-stretch(horizontal-stretch), rather than allocating the spare space.
I it work correctly: You can resize the layout to 0.
For the purpose of the default space allocation, it would use preferred-height.
ogoffart
added
needs info
Further information from the reporter is requested
a:layouts
Related to the layouting and positioning of the elements (mO,bT)
labels
Aug 6, 2024
In the document Stretch algorithm, it describes that algorithm will size elements to their minimum size and allocate spare space to elements. I previously think minimum size refer to min-height/min-width. After your reply, I made some tests and know it actually refer to the bigger one between min-* and preferred-*
I hope I understand correctly. If I'm correct, the document may need an update to clarify what property it actually used. And if possible, it may be helpful for some user to add a link to corresponding source code as "advanced insight" part or something similar.
C /Slint 1.7.1
When a explicit minimum size is smaller than default minimum size, Layout(
alignment: stretch
) will ignore the explicit minimum size: Layout won't use the explicit minimum, it use default minimum instead. Attached code may convey my issue more clearly.The expected behavior: Layout use explicit minimum size to allocate the layout space.
Setting minimum size to 0 is intended to allocate the layout space to elements only through
vertical-stretch
(horizontal-stretch
), rather than allocating the spare space.The text was updated successfully, but these errors were encountered: