Skip to content

Path: Add support for configuring the transform from viewbox to Path #8886

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
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tronical
Copy link
Member

By default, we preserve the aspect ratio, but this isn't quite always what's wanted. So the fit-style property permits configuring this.

Fixes #8853

By default, we preserve the aspect ratio, but this isn't quite always what's wanted. So the fit-style property permits configuring this.

Fixes #8853
@ogoffart
Copy link
Member

Shouldn't we reuse the ImageFit enum ?

https://docs.slint.dev/latest/docs/slint/reference/elements/image/#image-fit

@tronical
Copy link
Member Author

I was contemplating, but it's called Image fit, the docs are quite image specific.

@ogoffart
Copy link
Member

I think it would be worth merging it, don't you think? We could rename it (deprecate the old name)

I think also the "preserve" is interesting and could be used for many use case were you actually want the bounding box to be the same as the width/height of the item. Although I realize that this doesn't map 1:1

@tronical
Copy link
Member Author

You're right. The task at hand is the same for both. I'll think about a better name for the enum and then make a PR to deprecate the old, introduce the new, and implement it for Path.

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

Successfully merging this pull request may close these issues.

Path doesn't fit all space available
2 participants