|
@@ -6738,6 +6738,7 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags)
|
|
|
|
|
|
// [LEGACY] Content Region
|
|
// [LEGACY] Content Region
|
|
// FIXME-OBSOLETE: window->ContentRegionRect.Max is currently very misleading / partly faulty, but some BeginChild() patterns relies on it.
|
|
// FIXME-OBSOLETE: window->ContentRegionRect.Max is currently very misleading / partly faulty, but some BeginChild() patterns relies on it.
|
|
|
|
+ // Unless explicit content size is specified by user, this currently represent the region leading to no scrolling.
|
|
// Used by:
|
|
// Used by:
|
|
// - Mouse wheel scrolling + many other things
|
|
// - Mouse wheel scrolling + many other things
|
|
window->ContentRegionRect.Min.x = window->Pos.x - window->Scroll.x + window->WindowPadding.x + window->DecoOuterSizeX1;
|
|
window->ContentRegionRect.Min.x = window->Pos.x - window->Scroll.x + window->WindowPadding.x + window->DecoOuterSizeX1;
|
|
@@ -9773,10 +9774,10 @@ ImVec2 ImGui::GetContentRegionMax()
|
|
{
|
|
{
|
|
ImGuiContext& g = *GImGui;
|
|
ImGuiContext& g = *GImGui;
|
|
ImGuiWindow* window = g.CurrentWindow;
|
|
ImGuiWindow* window = g.CurrentWindow;
|
|
- ImVec2 mx = window->ContentRegionRect.Max - window->Pos;
|
|
|
|
|
|
+ ImVec2 mx = window->ContentRegionRect.Max;
|
|
if (window->DC.CurrentColumns || g.CurrentTable)
|
|
if (window->DC.CurrentColumns || g.CurrentTable)
|
|
- mx.x = window->WorkRect.Max.x - window->Pos.x;
|
|
|
|
- return mx;
|
|
|
|
|
|
+ mx.x = window->WorkRect.Max.x;
|
|
|
|
+ return mx - window->Pos;
|
|
}
|
|
}
|
|
|
|
|
|
// [Internal] Absolute coordinate. Saner. This is not exposed until we finishing refactoring work rect features.
|
|
// [Internal] Absolute coordinate. Saner. This is not exposed until we finishing refactoring work rect features.
|