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

[FEATURE] Arrange and Align helper methods #7

Open
g-mark opened this issue Apr 8, 2019 · 0 comments
Open

[FEATURE] Arrange and Align helper methods #7

g-mark opened this issue Apr 8, 2019 · 0 comments

Comments

@g-mark
Copy link
Contributor

g-mark commented Apr 8, 2019

Seems that a common task is for a bunch of child views to horizontally fill their parent, with possibly different insets. It would be interesting to explore this kind of convenience:

.arrangeViews(.fillX, view1 - 40, view2 - 40, view3 - 15, view4 - 32)
  • options could be: centerX, fillX, leftAlign, rightAlign, plus same for vertical
  • maybe have a param for an at: offset, like (.leftAlign, at: leftEdge + 20, ...)

Or, something like:

   align(.top/.left/.right/.bottom, views: Anchorable...)
   
   distribute(.horizontally/.vertically, views: Anchorable...)
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