From 1d4c752c2946a148041133ef62bd7e04da83387d Mon Sep 17 00:00:00 2001 From: ocornut Date: Tue, 30 Jul 2024 18:01:33 +0200 Subject: [PATCH] Shadows: remove use of GetWindowContentRegionMax(). --- imgui_demo.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/imgui_demo.cpp b/imgui_demo.cpp index c28d36aa3..fd69ec79a 100644 --- a/imgui_demo.cpp +++ b/imgui_demo.cpp @@ -9650,7 +9650,10 @@ static void ShowExampleAppCustomRendering(bool* p_open) draw_list->Flags &= ~ImDrawListFlags_AntiAliasedFill; // Fill a strip of background - draw_list->AddRectFilled(ImVec2(ImGui::GetCursorScreenPos().x, ImGui::GetCursorScreenPos().y), ImVec2(ImGui::GetCursorScreenPos().x + ImGui::GetWindowContentRegionMax().x, ImGui::GetCursorScreenPos().y + 200.0f), ImGui::GetColorU32(background_color)); + { + ImVec2 p = ImGui::GetCursorScreenPos(); + draw_list->AddRectFilled(p, ImVec2(p.x + ImGui::GetContentRegionAvail().x, p.y + 200.0f), ImGui::GetColorU32(background_color)); + } // Rectangle {