-
Notifications
You must be signed in to change notification settings - Fork 138
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
Allow SplitFixed to set the size of the second container #292
Comments
Hi @Ludar-Pavel, I think you raise a very good point here. Can you help me understand which of the following you are proposing? a) Allow the split functions to take one or the other size as a fixed number, but continue adjusting the other size dynamically according to the available space. I.e. the user can either set the left/top side to a fixed size and the size right/bottom part gets the remaining space as its size, or vice versa. or b) Allow the split functions to take both sizes as a fixed number, allowing the user to set both the left/top and right/bottom parts ti a fixed size. I think (a) is something very workable in the current architecture and we just need to discuss how to change the API. (b) would be harder due to assumptions made by the infrastructure. We can discuss these and try to find solutions if (b) is the goal. |
(a) is definitely the goal here - it's hard to imagine how (b) would work with the current way layout is set up. |
Thank you for confirming that @Ludar-Pavel, (a) is definitely workable and we just need to agree on how we make the API change. Before we do that, can you please indicate if this is something you would be interested in implementing, or if you would prefer I do the implementation? |
I imagine you doing it would incur less overhead - not very versed in Go myself. Do wish you all the best in implementation, though! |
Thank you @Ludar-Pavel, I will update here once it gets implemented. |
Hey @mum4k , any updates on a potential implementation? Would you still be interested in changing the API to allow for this, or interested in possible contributions for it? |
Thank you for expressing interest in this @spacez320. As far as I know, this isn't currently worked on, you are more than welcome to pick it up if interested. From the API perspective, I would recommend we implement a new option instead of giving negative numbers special meaning when
Please feel free to suggest a cleaner way. |
@mum4k I like Let me know if there is a timeline I should work against, otherwise I should be able to approach this soon. |
Thank you for offering to help, I will assign this issue to you. No particular timeline, please work at your convenience. I am happy to tag a new release whenever this will be available. |
Issue
As per the documentation,
This allows for simple adaptive design if one wants to fix widgets on the left side or on top of the screen. Fixing a widget on the bottom is comparatively complex, (or entirely simple, but not documented).
It would be a helpful change to allow fixing the second container in splits.
Proposed API change:
container.SplitFixed
is to allow numbers from1-cells
to-1
as its argument. Providing it with a number like this fixes the second container to the absolute value of the argument. Values of0
andcells
are preserved as is to maintain backwards compatibility.The text was updated successfully, but these errors were encountered: