Tables: Angled headers: fixed an auto-resize feedback loop that could affect tables with empty non-resizing columns using angled headers.

This commit is contained in:
ocornut
2025-11-03 19:35:19 +01:00
parent df3f2fff88
commit dc6e0f4b9e
2 changed files with 4 additions and 1 deletions

View File

@@ -47,6 +47,9 @@ Other Changes:
result in temporarily incorrect state, which would lead to bugs to side effects result in temporarily incorrect state, which would lead to bugs to side effects
in various locations, e.g. GetContentRegionAvail() calls or using clipper. (#9005) in various locations, e.g. GetContentRegionAvail() calls or using clipper. (#9005)
EndTable() was mistakenly restoring a wrong current table. 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 - Disabled: fixed a bug when a previously enabled item that got nav focus
and then turns disabled could still be activated using keyboard. (#9036) and then turns disabled could still be activated using keyboard. (#9036)
- InputText: when buffer is not resizable, trying to paste contents that - InputText: when buffer is not resizable, trying to paste contents that

View File

@@ -3421,7 +3421,7 @@ void ImGui::TableAngledHeadersRowEx(ImGuiID row_id, float angle, float max_label
// Left<>Right alignment // Left<>Right alignment
float line_off_curr_x = flip_label ? (label_lines - 1) * line_off_step_x : 0.0f; 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; line_off_curr_x += line_off_for_align_x - line_off_for_ascent_x;
// Register header width // Register header width