mirror of
https://github.com/kusti8/proton-native.git
synced 2026-05-15 22:02:24 -06:00
[GH-ISSUE #8] Window size not working properly #6
Labels
No labels
bug
documentation
enhancement
libui issue
pull-request
question
wait for libui implementation
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/proton-native#6
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @zaguiini on GitHub (Feb 17, 2018).
Original GitHub issue: https://github.com/kusti8/proton-native/issues/8
Hi! Awesome library!
I don't know how the
libui-nodeworks properly, so please help.If I render a
<Window />element on the tree, without any children, theWindowget the right size. But, as soon as I insert the children, the window fits to the children and ignore the specified width and height. Is it expected?Also, it looks like updating the
heightof the window via state doesn't work as well. My code is the following:@kusti8 commented on GitHub (Feb 19, 2018):
Is this on Mac?
@zaguiini commented on GitHub (Feb 19, 2018):
Yes.
@kusti8 commented on GitHub (Feb 19, 2018):
I think that's just how Mac works. I don't think it has stretchy components. There's nothing I can do about that.
@zaguiini commented on GitHub (Feb 19, 2018):
But I don't want stretchy components... I want the Window to be with the size I defined, and that's not what's happening.
@kusti8 commented on GitHub (Feb 19, 2018):
Try adding a box and then the button inside the box.
@andlabs commented on GitHub (Feb 19, 2018):
Yes, buttons on macOS have a fixed height, and by default are programmed to resist growing vertically. Sorry about that. If you set the
contentHuggingPriorityinNSUserInterfaceLayoutOrientationVerticaltoNSLayoutPriorityDefaultLowyou'll be able to grow the window vertically, but the button will stay somewhat centered in the window; it won't grow vertically (and that's a thing with AppKit that I can't do anything about).@montanaflynn commented on GitHub (May 2, 2018):
I think this should be opened back up, it certainly seems like a bug when it happens. If it really can't be fixed then a note should be put in the docs.
@andlabs commented on GitHub (May 2, 2018):
There are a lot of other issues with resizing on Mac that I need to fix as well (and these are issues on my end due to probably not using Auto Layout correctly), so the answer to these questions will likely be a case-by-case thing until I fix them.
@KirankumarDafda commented on GitHub (Dec 5, 2018):
@zaguiini I was also looking for the same and found that adding box tag inside the window component will render the screen exact as the same size of given height and width of window.