1
0
Fork 0
mirror of https://github.com/ocornut/imgui.git synced 2026-02-02 03:40:06 +00:00

TextLink(), TextLinkOpenURL(): fixed honoring text baseline alignment. (#8451, #7660)

This commit is contained in:
ocornut 2025-03-02 13:39:29 +01:00
parent 9c2876b9f8
commit c5ade6591e
2 changed files with 3 additions and 1 deletions

View file

@ -1444,7 +1444,7 @@ bool ImGui::TextLink(const char* label)
const ImGuiID id = window->GetID(label);
const char* label_end = FindRenderedTextEnd(label);
ImVec2 pos = window->DC.CursorPos;
ImVec2 pos(window->DC.CursorPos.x, window->DC.CursorPos.y + window->DC.CurrLineTextBaseOffset);
ImVec2 size = CalcTextSize(label, label_end, true);
ImRect bb(pos, pos + size);
ItemSize(size, 0.0f);