-
-
Notifications
You must be signed in to change notification settings - Fork 10.4k
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
Automatically adjust height of a docking node #7631
Comments
That might be contradictory with making the bottom part a docking node, aka you cannot expect user to resize this section while making it automatically resizing at all time. Suggestion 1: We don't have enough information about your setup, but if the setup use a Suggestion 2: It may be more natural that you directly poke into the dock node where that timeline is docked by finding the (It's also expected that other constraints in place may prevent that exact value from being full-filed, namely if e.g. the total available height is too small, but that's probably something you'd want) |
hi @ocornut Sorry about that! My setup, as in the attached photo, consists of three parts.
I also attach a small snippet of the code. To be clearer, rather than automatically adjusting the height of the bottom part, I would like to put limits on its height. That is, that it cannot be larger than a certain amount. I.e., that it cannot be larger than the contents inside it. Is there then a way me put these limits and to calculate the size of the content inside it?
|
Sizing constraints are currently not supported for docking nodes (#4228, but also technically #6326, #2849). Some early work I did for potential support for toolbars might help, see code #2648, namely those lines: node->WantLockSizeOnce = true;
node->Size[toolbar_axis_perp] = node->SizeRef[toolbar_axis_perp] = TOOLBAR_SIZE_WHEN_DOCKED; But generally I think this is not easy to achieve and currently not worth investigating further, considering your need doesn't seem that important (as user can resize). As mentioned in my first message, another workaround would be to use a manual splitter #319 or two |
hi @ocornut , I thought that for my case the best thing is to use a manual splitter as you suggest.
test.movwhat am I doing wrong?
|
Version/Branch of Dear ImGui:
Version 1.90.5, Branch: docking
Back-ends:
ImGui_ImplGlfw ImGui_ImplOpenGL3
Compiler, OS:
macOS
Details:
hello everyone, I am in docking branch and I am developing an application but I don't quite understand how to proceed on one point.
The layout of my window is very simple:
at the bottom of the layout i am creating a sequencer. The content, so the height, of the sequencer changes over time.
I would like to figure out how to automatically adjust the height of the window so that everything is flush.
The text was updated successfully, but these errors were encountered: