-
Notifications
You must be signed in to change notification settings - Fork 620
Fixed positioning #306
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
Comments
Interesting that you did it with GTK+, as that's the one toolkit that already provides grids (and the uiGrid API is based on GtkGrid)... I'll look through all this (including yoga itself) later. |
Your A while back, I actually looked into adding support for Yoga into libui as well. Though I gave up on it because the Yoga native C API is not documented at all. Only supporting Yoga from within JS would be fine I guess. Let me know if I can help on this. |
I've historically had problems with GtkFixed and background drawing under certain themes. In this case I'd just use a custom GtkContainer subclass to do all the work. I can write that myself, should I decide to have uiCustomContainer at all... |
Yeah I removed the test code but forgot to remove the options in the cake
file. I wasn't sure what the signature was, so I just made something up.
Didn't realize it was text. I didn't prep is as a PR, just as a quick proof
of concept.
Yeah so it seems like they used to have documentation, but removed it. If
you go back far enough in the commits they have some OK documentation. I
thought about adding it to libui but honestly I don't know enough about C
to link it and integrate it. If we add it in JS, then it doesn't clutter
libui, but it depends on whether you think it should be required/built in
for libui, or sort of optional.
I haven't looked at yoga's JS documentation, but I don't imagine it to be
too hard. My only problem is figuring out how to do a fixed view in Windows
and Mac. I think I got a rough outline done for Windows, but it's more
complex than GTK so I'm not totally sure.
…On Thu, Mar 22, 2018, 8:54 PM cody271 ***@***.***> wrote:
@kusti8 <https://github.com/kusti8>,
Your uiFixed container control looks good to me, but
examples/layout-test/main.c is missing in that commit. (Also your
uiFixedSignature isn't valid ASCII, maybe use something like 0x46697864,
which is "Fixd".)
A while back, I actually looked into adding support for Yoga into libui as
well. Though I gave up on it because the Yoga native C API is not
documented at all. Only supporting Yoga from within JS would be fine I
guess. Let me know if I can help on this.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#306 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AJW73KuSUC5wvB2OuZj6ZTDIs9zj7y7Nks5thEfQgaJpZM4S31N2>
.
|
@andlabs @kusti8 Yoga would definitely be optional. My recommendation is to focus on getting Yoga from JS to work with your |
Yeah good idea. @parro-it any thoughts ? What do you think about integrating it into libui-node vs into proton-native? |
is now considering calling libui's next build system "cake" @cody271 you will have to go back into the really early git history of package ui itself for the answers. I think I also have a Stack Overflow question on the issue as well. Will respond to the rest later. |
I don't know yoga, I have to look at how it works... I saw there are some related packages on npm, maybe we can use them... |
Regarding where to put them, if there is a compilation phase required to use Yoga, I think libui-node could be a better choice, because otherwise we will have to prepare proton prebuilt binaries too. |
I saw yoga already have official bindings fir js, and they use nbind as libui-node does. So, I think we can either use it as is on proton side, or include theirs cpp sources in libui-node and produce a single library. |
It would be nice to have a single library, but I think we need to do it in JS on the proton side. It's going to get hard to integrate libui's current layout and yoga layout. On the proton-native I can just make the entire thing fixed and only rely on Fixed. We would need to expose the minimum size functions for every component because yoga needs to know the dimensions of every component. |
I've made a PR #332 with all of my changes, for Linux, Windows and Mac. |
Hi,
For
proton-native
, I want to incorporate Yoga Layout, which I can do on the JS side without adding extra dependencies here, but I would need a way to fixed position place widgets using x and y coordinates. I've been playing around with GTK, and I got it working here: https://github.com/kusti8/libui, but I don't know how to do that for Windows or for Mac. This would be more of a substitute for Grid and make it a lot easier to use and more stable.Thanks,
Gustav
The text was updated successfully, but these errors were encountered: