mirror of
https://github.com/ocornut/imgui.git
synced 2026-04-04 22:59:43 +00:00
Internals: extracted a more reusable BeginViewportSideBar() out of BeginMainMenuBar(). (#3966, #3518)
Complement ca34c81c in docking branch which removed assumption that we can't tell size ahead of Begin().
This commit is contained in:
@@ -10566,9 +10566,9 @@ static void ImGui::UpdateViewportsNewFrame()
|
||||
ImGuiViewportP* viewport = g.Viewports[n];
|
||||
|
||||
// Lock down space taken by menu bars and status bars, reset the offset for fucntions like BeginMainMenuBar() to alter them again.
|
||||
viewport->WorkOffsetMin = viewport->CurrWorkOffsetMin;
|
||||
viewport->WorkOffsetMax = viewport->CurrWorkOffsetMax;
|
||||
viewport->CurrWorkOffsetMin = viewport->CurrWorkOffsetMax = ImVec2(0.0f, 0.0f);
|
||||
viewport->WorkOffsetMin = viewport->BuildWorkOffsetMin;
|
||||
viewport->WorkOffsetMax = viewport->BuildWorkOffsetMax;
|
||||
viewport->BuildWorkOffsetMin = viewport->BuildWorkOffsetMax = ImVec2(0.0f, 0.0f);
|
||||
viewport->UpdateWorkRect();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user