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

Add yoga support. Fixes #67 #76

Closed
wants to merge 4 commits into from
Closed

Add yoga support. Fixes #67 #76

wants to merge 4 commits into from

Conversation

kusti8
Copy link
Owner

@kusti8 kusti8 commented Apr 1, 2018

This is the PR that fixes #67.

It can't be merged right away because I still need libui support for GtkFixed and their equivalents on Windows and Mac, as well as sizing. Once that is done, which I'm going to work on now, then I can merge this. The API shouldn't change too much. If you're interested, I've added uiFixedAppend and uiFixedMove, as well as uiSize and uiSetSize. These are what need to be added to Windows and Mac and can be found on my libui and libui-node fork.

This currently supports full yoga layout, as far as I've tested. Meaning nested Views and all styling works. One thing that doesn't work is having a container such as a box as a child. You can't really mix yoga and stretchy layout.

To test:

  • Clone my libui fork and checkout the alpha3.5 fork (because libui-node currently only supports alpha3.5). This has my changes.
  • cd libui && mkdir build && cd build && cmake .. && make
  • Clone my libui-node fork
  • Copy the header files in libui into libui-node root directory and the build/out/*.so files into the libui-node root directory also
  • cd libui-node && npm i
  • sudo npm link
  • Clone proton-native and checkout the yoga branch
  • npm link libui-node
  • npm i
  • npm run demo

@SkyzohKey
Copy link

Any update on this? 😇

@kusti8
Copy link
Owner Author

kusti8 commented May 13, 2018

Currently, I need to merge a component into libui that allows fixed positioning, but I need to rewrite the GTK version, and its taking some research and time to do that.

@SkyzohKey
Copy link

What would be the stuffs to investigate with Gtk for this to progress, I have a long experience with it, may I help?

@mischnic
Copy link
Contributor

@SkyzohKey This is the PR: andlabs/libui#332.

These are the comments about GTK: andlabs/libui#332 (comment).

@hdev1
Copy link

hdev1 commented Nov 14, 2018

Update on this?

@zaguiini
Copy link

zaguiini commented Apr 6, 2019

👀

@kusti8
Copy link
Owner Author

kusti8 commented May 5, 2019

Closing and rewriting in #213

@kusti8 kusti8 closed this May 5, 2019
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.

Add yoga layout support
5 participants