diff --git a/docs/CHANGELOG.txt b/docs/CHANGELOG.txt index bea104171..e2cca4da7 100644 --- a/docs/CHANGELOG.txt +++ b/docs/CHANGELOG.txt @@ -47,6 +47,9 @@ Other Changes: result in temporarily incorrect state, which would lead to bugs to side effects in various locations, e.g. GetContentRegionAvail() calls or using clipper. (#9005) EndTable() was mistakenly restoring a wrong current table. +- Tables: Angled headers: fixed an auto-resize feedback loop that could + affect tables with empty non-resizing columns using angled headers, making + them typically flicker back and forth between +0 and +1 pixels. - Disabled: fixed a bug when a previously enabled item that got nav focus and then turns disabled could still be activated using keyboard. (#9036) - InputText: when buffer is not resizable, trying to paste contents that diff --git a/imgui_tables.cpp b/imgui_tables.cpp index 39e45367b..faf859141 100644 --- a/imgui_tables.cpp +++ b/imgui_tables.cpp @@ -3421,7 +3421,7 @@ void ImGui::TableAngledHeadersRowEx(ImGuiID row_id, float angle, float max_label // Left<>Right alignment float line_off_curr_x = flip_label ? (label_lines - 1) * line_off_step_x : 0.0f; - float line_off_for_align_x = ImMax((((column->MaxX - column->MinX) - padding.x * 2.0f) - (label_lines * line_off_step_x)), 0.0f) * align.x; + float line_off_for_align_x = ImFloor(ImMax((((column->MaxX - column->MinX) - padding.x * 2.0f) - (label_lines * line_off_step_x)), 0.0f) * align.x); line_off_curr_x += line_off_for_align_x - line_off_for_ascent_x; // Register header width