From e47e6b0d9de3433dd9c3fee17e6e509163256fc9 Mon Sep 17 00:00:00 2001 From: ocornut Date: Thu, 30 Jul 2026 16:03:42 +0200 Subject: [PATCH 1/4] Fonts: made GetDefaultCompressedFontDataProggyClean()/GetDefaultCompressedFontDataProggyForever() undocumented non-static. (#9493) --- imgui_draw.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/imgui_draw.cpp b/imgui_draw.cpp index d89e36a9a..37ab7b4fc 100644 --- a/imgui_draw.cpp +++ b/imgui_draw.cpp @@ -3159,10 +3159,10 @@ static void Decode85(const unsigned char* src, unsigned char* dst) } } #if !defined(IMGUI_DISABLE_DEFAULT_FONT) && !defined(IMGUI_DISABLE_DEFAULT_FONT_BITMAP) -static const char* GetDefaultCompressedFontDataProggyClean(int* out_size); +const char* ImGui_GetDefaultCompressedFontDataProggyClean(int* out_size); #endif #if !defined(IMGUI_DISABLE_DEFAULT_FONT) && !defined(IMGUI_DISABLE_DEFAULT_FONT_VECTOR) -static const char* GetDefaultCompressedFontDataProggyForever(int* out_size); +const char* ImGui_GetDefaultCompressedFontDataProggyForever(int* out_size); #endif // This duplicates some of the logic in UpdateFontsNewFrame() which is a bit chicken-and-eggy/tricky to extract due to variety of codepaths and possible initialization ordering. @@ -3201,7 +3201,7 @@ ImFont* ImFontAtlas::AddFontDefaultBitmap(const ImFontConfig* font_cfg_template) font_cfg.GlyphOffset.y += 1.0f * (font_cfg.SizePixels / 13.0f); // Add +1 offset per 13 units int ttf_compressed_size = 0; - const char* ttf_compressed = GetDefaultCompressedFontDataProggyClean(&ttf_compressed_size); + const char* ttf_compressed = ImGui_GetDefaultCompressedFontDataProggyClean(&ttf_compressed_size); return AddFontFromMemoryCompressedTTF(ttf_compressed, ttf_compressed_size, font_cfg.SizePixels, &font_cfg); #else IM_ASSERT(0 && "Function is disabled in this build."); @@ -3229,7 +3229,7 @@ ImFont* ImFontAtlas::AddFontDefaultVector(const ImFontConfig* font_cfg_template) font_cfg.GlyphOffset.y += 0.5f * (font_cfg.SizePixels / 16.0f); // Closer match ProggyClean + avoid descenders going too high (with current code). int ttf_compressed_size = 0; - const char* ttf_compressed = GetDefaultCompressedFontDataProggyForever(&ttf_compressed_size); + const char* ttf_compressed = ImGui_GetDefaultCompressedFontDataProggyForever(&ttf_compressed_size); return AddFontFromMemoryCompressedTTF(ttf_compressed, ttf_compressed_size, font_cfg.SizePixels, &font_cfg); #else IM_ASSERT(0 && "Function is disabled in this build."); @@ -6536,7 +6536,7 @@ static const unsigned char proggy_clean_ttf_compressed_data[9583] = 239,32,57,141,239,32,57,141,239,32,57,141,239,32,57,141,239,32,57,141,239,35,57,102,0,0,5,250,72,249,98,247, }; -static const char* GetDefaultCompressedFontDataProggyClean(int* out_size) +const char* ImGui_GetDefaultCompressedFontDataProggyClean(int* out_size) { *out_size = proggy_clean_ttf_compressed_size; return (const char*)proggy_clean_ttf_compressed_data; @@ -6801,7 +6801,7 @@ static const unsigned char proggy_forever_minimal_ttf_compressed_data[14562] = 3,36,0,229,13,183,147,132,7,42,175,187,66,0,0,0,0,229,178,59,232,5,250,48,120,202,241, }; -static const char* GetDefaultCompressedFontDataProggyForever(int* out_size) +const char* ImGui_GetDefaultCompressedFontDataProggyForever(int* out_size) { *out_size = proggy_forever_minimal_ttf_compressed_size; return (const char*)proggy_forever_minimal_ttf_compressed_data; From ffbf21af6b61157473a711738ad6da0641bb267d Mon Sep 17 00:00:00 2001 From: ocornut Date: Thu, 30 Jul 2026 16:12:31 +0200 Subject: [PATCH 2/4] Demo: Custom Rendering: enable LiveEdit. Tweaks. --- imgui_demo.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/imgui_demo.cpp b/imgui_demo.cpp index 67aa1721a..85e1bc4b4 100644 --- a/imgui_demo.cpp +++ b/imgui_demo.cpp @@ -10265,6 +10265,7 @@ static void ShowExampleAppCustomRendering(bool* p_open) { IMGUI_DEMO_MARKER("Examples/Custom rendering/Primitives"); ImGui::PushItemWidth(-ImGui::GetFontSize() * 15); + ImGui::PushItemFlag(ImGuiItemFlags_LiveEditOnInput, true); ImDrawList* draw_list = ImGui::GetWindowDrawList(); // Draw gradients @@ -10291,7 +10292,7 @@ static void ShowExampleAppCustomRendering(bool* p_open) // Draw a bunch of primitives ImGui::Text("All primitives"); - static float sz = 36.0f; + static float sz = 42.0f; static float thickness = 3.0f; static int ngon_sides = 6; static bool circle_segments_override = false; @@ -10385,6 +10386,7 @@ static void ShowExampleAppCustomRendering(bool* p_open) x += sz + spacing; ImGui::Dummy(ImVec2((sz + spacing) * 13.2f, (sz + spacing) * 3.0f)); + ImGui::PopItemFlag(); ImGui::PopItemWidth(); ImGui::EndTabItem(); } From ed252c55aadd46e4ef78d85f795d6e3c4191a911 Mon Sep 17 00:00:00 2001 From: thedmd Date: Thu, 30 Jul 2026 21:40:05 +0200 Subject: [PATCH 3/4] Tables: fixed Y position of lower horizontal border being off by one pixel when vertical ones are not also enabled. Attributed to thedmd who reported this to me. --- docs/CHANGELOG.txt | 2 ++ imgui_tables.cpp | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/CHANGELOG.txt b/docs/CHANGELOG.txt index 35a67649a..fc3d69650 100644 --- a/docs/CHANGELOG.txt +++ b/docs/CHANGELOG.txt @@ -43,6 +43,8 @@ Breaking Changes: Other Changes: +- Tables: fixed Y2 position of lower horizontal border (ImGuiTableFlags_BordersOuterH) + being off by one pixel when vertical ones are not also enabled. [@thedmd] - ImDrawData: fixed a regression in 1.92.9 where legacy `ImDrawData::CmdListsCount` was always 0. Prefer using `ImDrawData::CmdList.Size` anyway. diff --git a/imgui_tables.cpp b/imgui_tables.cpp index 4799d5648..a6185d85d 100644 --- a/imgui_tables.cpp +++ b/imgui_tables.cpp @@ -3026,7 +3026,7 @@ void ImGui::TableDrawBorders(ImGuiTable* table) else if (table->Flags & ImGuiTableFlags_BordersOuterH) { inner_drawlist->AddLineH(outer_border.Min.x, outer_border.Max.x, outer_border.Min.y, outer_col, border_size); - inner_drawlist->AddLineH(outer_border.Min.x, outer_border.Max.x, outer_border.Max.y, outer_col, border_size); + inner_drawlist->AddLineH(outer_border.Min.x, outer_border.Max.x, outer_border.Max.y - border_size, outer_col, border_size); } } if ((table->Flags & ImGuiTableFlags_BordersInnerH) && table->RowPosY2 < table->OuterRect.Max.y) From b9adace7b575b401cef8cd77bfee1fed4706b913 Mon Sep 17 00:00:00 2001 From: thedmd Date: Thu, 30 Jul 2026 22:02:50 +0200 Subject: [PATCH 4/4] Tables: fixed X position of angled borders being off by half a pixel. --- docs/CHANGELOG.txt | 6 ++++-- imgui_tables.cpp | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/CHANGELOG.txt b/docs/CHANGELOG.txt index fc3d69650..642dbded5 100644 --- a/docs/CHANGELOG.txt +++ b/docs/CHANGELOG.txt @@ -43,8 +43,10 @@ Breaking Changes: Other Changes: -- Tables: fixed Y2 position of lower horizontal border (ImGuiTableFlags_BordersOuterH) - being off by one pixel when vertical ones are not also enabled. [@thedmd] +- Tables: + - Fixed Y2 position of lower horizontal border (ImGuiTableFlags_BordersOuterH) + being off by one pixel when vertical ones are not also enabled. [@thedmd] + - Fixed X position of angled borders being off by half a pixel. [@thedmd] - ImDrawData: fixed a regression in 1.92.9 where legacy `ImDrawData::CmdListsCount` was always 0. Prefer using `ImDrawData::CmdList.Size` anyway. diff --git a/imgui_tables.cpp b/imgui_tables.cpp index a6185d85d..3e7065bf9 100644 --- a/imgui_tables.cpp +++ b/imgui_tables.cpp @@ -3627,7 +3627,7 @@ void ImGui::TableAngledHeadersRowEx(ImGuiID row_id, float angle, float max_label if (pass == 1) { // Draw border - draw_list->AddLine(bg_shape[0], bg_shape[3], TableGetColumnBorderCol(table, order_n, column_n), TABLE_BORDER_SIZE); + draw_list->AddLine(bg_shape[0] - ImVec2(TABLE_BORDER_SIZE * 0.5f, 0.0f), bg_shape[3] - ImVec2(TABLE_BORDER_SIZE * 0.5f, 0.0f), TableGetColumnBorderCol(table, order_n, column_n), TABLE_BORDER_SIZE); } } PopClipRect();