Fork me on GitHub
#membrane
<
2022-12-01
>
phronmophobic09:12:49

I finally have something to share with regard to stretch layouts, https://github.com/phronmophobic/membrane.alpha.stretch. It's currently in a separate library until I can test it out with a few use cases. Honestly, there's really not much there. Layout is just data manipulation which means there's not much layout specific code. You can just use regular clojure data transformation. There is one important change that's now available in membrane 0.10.4-beta . All of the toolkits' run functions now accept an :include-container-info option which will pass container info to the view-fn. This has been a commonly requested feature and now you can write UIs that know the size of the window. There's more info in the https://github.com/phronmophobic/membrane.alpha.stretch#containers. If using the builtin state management, the container size is implicitly passed down via context. Stretching to fill the enclosing container is just a matter of doing a bit of math based on the container size. Would love to hear any feedback.

👀 1
👏 1