Modals: fixed an assert displaying a modal in an environment where io.DisplayFramebufferScale is not an integer. (#9598)

This commit is contained in:
ocornut 2026-10-28 15:41:13 +01:00
parent 80d572ce35
commit 2fb554b1c8
2 changed files with 9 additions and 4 deletions

View File

@ -66,14 +66,18 @@ Autumn cleanup of stuff marked obsolete more than two years ago:
Other Changes: Other Changes:
- Style: `StyleColorsDark()`: tweaked WindowBg to be darker than in 1.93.0. - Style:
- Style: added `style.SymbolArrowSizeFactor`, `style.SymbolArrowThicknessFactor` to tweak - `StyleColorsDark()`: tweaked WindowBg to be darker than in 1.93.0.
the shape and look of arrows. Made default arrow stroked. (#5233, #2431, #2235, #6730, #8243) - Added `style.SymbolArrowSizeFactor`, `style.SymbolArrowThicknessFactor` to tweak the
shape and look of arrows. Made default arrow stroked. (#5233, #2431, #2235, #6730, #8243)
Legacy arrow: size: (0.60f,0.70f), thickness: 0.0f Legacy arrow: size: (0.60f,0.70f), thickness: 0.0f
New arrow: size: (0.72f,0.40f), thickness: 0.30f New arrow: size: (0.72f,0.40f), thickness: 0.30f
- TreeNode: - TreeNode:
- TreeNodeGetOpen(): added flags parameter to allow passing `ImGuiTreeNodeFlags_DefaultOpen` - TreeNodeGetOpen(): added flags parameter to allow passing `ImGuiTreeNodeFlags_DefaultOpen`
or `ImGuiTreeNodeFlags_Leaf`. (#9569, #9592, #3823, #9251) [@adalisk-emikhaylov, @Yaki-Blake] or `ImGuiTreeNodeFlags_Leaf`. (#9569, #9592, #3823, #9251) [@adalisk-emikhaylov, @Yaki-Blake]
- Popups:
- Modals: fixed an assert displaying a modal in an environment where
`io.DisplayFramebufferScale` is not an integer (regression in 1.93.0). (#9598)
- ImVec2: added a check for cases where a custom `IM_VEC2_CLASS_EXTRA` macro - ImVec2: added a check for cases where a custom `IM_VEC2_CLASS_EXTRA` macro
adds an extra `operator=` to ImVec2. This isn't supported but should not adds an extra `operator=` to ImVec2. This isn't supported but should not
be needed as you should have a constructor to convert from your type to ImVec2. be needed as you should have a constructor to convert from your type to ImVec2.

View File

@ -6122,7 +6122,8 @@ static void ImGui::RenderDimmedBackgroundBehindWindow(ImGuiWindow* window, ImU32
if (draw_list->CmdBuffer.Size == 0) if (draw_list->CmdBuffer.Size == 0)
draw_list->AddDrawCmd(); draw_list->AddDrawCmd();
draw_list->PushClipRect(viewport_rect.Min - ImVec2(1, 1), viewport_rect.Max + ImVec2(1, 1), false); // FIXME: Need to strictly ensure ImDrawCmd are not merged (ElemCount==6 checks below will verify that) draw_list->PushClipRect(viewport_rect.Min - ImVec2(1, 1), viewport_rect.Max + ImVec2(1, 1), false); // FIXME: Need to strictly ensure ImDrawCmd are not merged (ElemCount==6 checks below will verify that)
draw_list->AddRectFilled(viewport_rect.Min, viewport_rect.Max, col); draw_list->PrimReserve(6, 4);
draw_list->PrimRect(viewport_rect.Min, viewport_rect.Max, col);
ImDrawCmd cmd = draw_list->CmdBuffer.back(); ImDrawCmd cmd = draw_list->CmdBuffer.back();
IM_ASSERT(cmd.ElemCount == 6); IM_ASSERT(cmd.ElemCount == 6);
draw_list->CmdBuffer.pop_back(); draw_list->CmdBuffer.pop_back();