impr: Small performance improvements

This commit is contained in:
WerWolv
2025-08-02 17:30:58 +02:00
parent 29354f0bcb
commit 2440acda07
3 changed files with 6 additions and 9 deletions

View File

@@ -446,7 +446,7 @@ namespace ImGuiExt {
ImGuiContext &g = *GImGui;
const ImGuiStyle &style = g.Style;
const ImGuiID id = window->GetID(label);
const ImVec2 text_size = CalcTextSize((std::string(label) + "\n " + std::string(description)).c_str(), nullptr, true);
const ImVec2 text_size = CalcTextSize(label, nullptr, true) + CalcTextSize(description, nullptr, true);
const ImVec2 label_size = CalcTextSize(label, nullptr, true);
ImVec2 pos = window->DC.CursorPos;