Minor optimization: reduce redudant label scanning in common widgets.

Missing stuff from 11de9df.
The 6 remaining use of CalcTextSize(...,true) don't need this.
This commit is contained in:
ocornut
2026-04-10 18:37:08 +02:00
parent 5da7eb0a84
commit 2dc64f99bc
2 changed files with 8 additions and 6 deletions

View File

@@ -3180,7 +3180,7 @@ void ImGui::TableHeader(const char* label)
if (label == NULL)
label = "";
const char* label_end = FindRenderedTextEnd(label);
ImVec2 label_size = CalcTextSize(label, label_end, true);
ImVec2 label_size = CalcTextSize(label, label_end, false);
ImVec2 label_pos = window->DC.CursorPos;
// If we already got a row height, there's use that.