-
-
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
Vertical scrollbar in child window doesn't affect content region width #8195
Comments
I am not sure what you mean exactly? If you mean that the issue is that the If you use Then you have both the parent padding + the child padding. |
Yes, thanks! I thought for some reason that scrollbar overlaps it. |
If you child window completely fill the parent window (and that's where the issue is most likely to happen) then there's no value in using a child window. What's your actual setup? |
I realize it is not ideal, but the easiest way at the moment would be to "undo" the current offset in the parent window and then submit the child with padding: ImGui::SetCursorPos(GetCursorPos() - style.WindowPadding);
ImGui::BeginChild(...., ImGuiChildFlags_AlwaysUseWindowPadding) |
Version/Branch of Dear ImGui:
master
Back-ends:
imgui_impl_glfw.cpp + imgui_impl_opengl3.cpp
Compiler, OS:
Linux + GCC
Full config/build information:
Details:
I've made a simple sidebar by using a child window, but when the scrollbar appears, it doesn't change the content region width as it should when using a normal window.
Screenshots/Video:
Expected behavior (as in normal window):
Current behavior (child window):
Minimal, Complete and Verifiable Example code:
The text was updated successfully, but these errors were encountered: