Skip to content

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