-
-
Notifications
You must be signed in to change notification settings - Fork 10.1k
-
-
Notifications
You must be signed in to change notification settings - Fork 10.1k
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
Docking behavior on window resize #5802
Comments
Not a full answer as this has been covered elsewhere, but notice in your .ini file the "re-edit" node is marked as a CentralNode and we apply specific behavior to that node. See this answer: Links #3168 #4334 #5209 #4516 ##2350 It's an open issue AFAIK, but you may be able to manually clear that flag in the node for now. |
I edited the ini info to remove As a side note, I use ".ini strings" in my code like this (which have been generated by positioning the windows where I wanted and generating them): constexpr char const *kDefaultHorizontalLayout = R"(
[Window][DockSpaceViewport_11111111]
Pos=0,18
Size=1280,702
Collapsed=0
// ... rest of the string
)";
constexpr char const *kDefaultVerticalLayout = R"(
[Window][DockSpaceViewport_11111111]
Pos=0,18
Size=1280,702
Collapsed=0
// ... rest of the string
)"; When the application boots I simply do something like: ImGui::LoadIniSettingsFromMemory(kDefaultHorizontalLayout.c_str(), kDefaultHorizontalLayout.size()); This is really cool because I don't have to define all this values programmatically in my code. And this allows me to have 2 menu options to swap between horizontal and vertical layout by simply calling And of course when the user saves the project I also save the current layout in the project file by retrieving it using This is working quite well for my use case! |
ini format is likely to be brittle. I understand this is attractive for many but you should be using the work-in-progress DockBuilderXXX api for this. |
I've just run into this issue myself. Trying to fix in code at dock build time. Is the below what you mean by clearing the flag? It seems to be working, but I'm concerned about the root pointer to the central node. Will this be handled in this case?
|
Here are 2 screenshots showing the "problem"
When the window is "small" (~1280x700)
After stretching the window (~ 2275x1480)
I know I am putting "problem" in between quotes because I do not know if this is an actual problem with ImGui, expected behavior or an error on my part. What I would obviously like to happen is that as the window is stretched, each docked window is stretched proportionally and this is obviously not what is happening (in this instance, it seems that the top left window is stretched and the other are occupying the remaining space).
Am I using Docking improperly?
This is what my
.ini
file looks like:The text was updated successfully, but these errors were encountered: