From bdbb6a4e9a2325caacb23d060b7a2b4ebb0d3a5f Mon Sep 17 00:00:00 2001 From: ocornut Date: Wed, 29 Jul 2026 15:02:15 +0200 Subject: [PATCH] Checkbox, Menus: check marks use anti-aliased ends. Currently not a satisfying resolution. --- docs/CHANGELOG.txt | 1 + imgui_draw.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/CHANGELOG.txt b/docs/CHANGELOG.txt index 451f8de26..a26f4b139 100644 --- a/docs/CHANGELOG.txt +++ b/docs/CHANGELOG.txt @@ -182,6 +182,7 @@ HOW TO UPDATE? - Tree: hierarchy lines (when thickness>1.0f). - TabBar: selected overline border ((when thickness>1.0f). - Demo: Custom Rendering: canvas lines. +- Checkbox, Menus: check marks use anti-aliased ends. - Demo: Custom Rendering: exposed new flags; Showcasing overlapping strokes and filled shapes; Added an option to animation thickness; Added new shapes to showcase new rendering features that previously hit limitations. diff --git a/imgui_draw.cpp b/imgui_draw.cpp index 6d13cb2b8..70dab2317 100644 --- a/imgui_draw.cpp +++ b/imgui_draw.cpp @@ -7579,7 +7579,7 @@ void ImGui::RenderCheckMark(ImDrawList* draw_list, ImVec2 pos, ImU32 col, float draw_list->PathLineTo(ImVec2(bx - third, by - third)); draw_list->PathLineTo(ImVec2(bx, by)); draw_list->PathLineTo(ImVec2(bx + third * 2.0f, by - third * 2.0f)); - draw_list->PathStroke(col, thickness); + draw_list->PathStroke(col, thickness, (draw_list->Flags & ImDrawFlags_AALines) ? ImDrawFlags_AALineEnds : 0); // FIXME: Design idiomatic selection/threshold for this? } // Render an arrow. 'pos' is position of the arrow tip. half_sz.x is length from base to tip. half_sz.y is length on each side.