Skip to content
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

NightAndDay breaks .previewLayout(.sizeThatsFits) #6

Closed
pteasima opened this issue May 22, 2020 · 5 comments · Fixed by #7
Closed

NightAndDay breaks .previewLayout(.sizeThatsFits) #6

pteasima opened this issue May 22, 2020 · 5 comments · Fixed by #7

Comments

@pteasima
Copy link
Contributor

Thanks for the awesome work!

Using NightAndDay seems to break .previewLayout(.sizeThatsFits), in different ways, depending on whether I use .previewLayout inside or outside of NightAndDay.

Is there a different way to achieve .sizeThatFits with Gala?

Im opening this issue without much research with hope that you'll instantly know whats going on. If not, Im happy to investigate more and PR if I can find a solution.

@finestructure
Copy link
Owner

Hey @pteasima !

Glad you're finding Gala useful :) Have you tried it with Gala's Layouts([...]) { } wrapper? It might help with nesting. I'll need to check but I added a ZStack recently (5c29859) and that might have messed things up.

@pteasima
Copy link
Contributor Author

pteasima commented May 22, 2020

Same results with Layouts([.sizeThatFits]) unfortunatelly. When you combine it with NightAndDay, you either get an iPhone-sized rectangle or an actual iPhone with a slightly cut-off content inside.

I have to run now but let me know if you're on it or I should have a closer look. Thanks.

@finestructure
Copy link
Owner

Aw, too bad - thanks for checking. I don't think I'll have a chance to look into this anytime soon so if you can figure that one out that'd be great!

@pteasima
Copy link
Contributor Author

pteasima commented May 23, 2020

It was indeed the ZStack, thanks for the pointer ;)

PR: #7

@finestructure
Copy link
Owner

Ah, fantastic - thanks for fixing this!

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 a pull request may close this issue.

2 participants