Skip to content

BUG: Auto Layout: Horizontal layout cannot preserve child aspect but AspectRatioFitter is not layout aware #13

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
awiebe opened this issue Jan 25, 2024 · 0 comments

Comments

@awiebe
Copy link

awiebe commented Jan 25, 2024

Suppose you want to a achieve an effect like the dock on MacOS where scaling the tray Rect causes the child icons to scale up while preserving their aspect and laying out horizontally center-middle.

This effect cannot be achieved because the layout can only upscale the width and height it cannot perform an aspect preserving scale.

Attaching an AspectRatioFitter to the child does achieve the desired effect, but on Start() the horizontal layout will shove all of the children to overlap each-other as I guess it believes their width is zero.
Then the layout group forces the scale height of the child to fill itself, and the aspect ratio fitter scales the object to the correct aspect because height controls width, but following this, the horizontal auto-layout does not execute again, so the newly sized rects do not correctly move into place.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy