Skip to content

Commit c5ade65

Browse files
committed
TextLink(), TextLinkOpenURL(): fixed honoring text baseline alignment. (#8451, #7660)
1 parent 9c2876b commit c5ade65

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

docs/CHANGELOG.txt

+2
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,8 @@ Other changes:
9999
- Default for unselected tabs: TabCloseButtonMinWidthUnselected = 0.0f (visible when hovered)
100100
- Tabs: fixed middle-mouse-button to close tab not checking that close button
101101
is hovered, merely it's visibility. (#8399, #8387) [@nicovanbentum]
102+
- TextLink(), TextLinkOpenURL(): fixed honoring text baseline alignment.
103+
(#8451, #7660) [@achabense]
102104
- TextLinkOpenURL(): fixed default Win32 io.PlatformOpenInShellFn handler to
103105
handle UTF-8 regardless of system regional settings. (#7660) [@achabense]
104106
- Debug Tools: Added io.ConfigDebugHighlightIdConflictsShowItemPicker (defaults to true)

imgui_widgets.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1444,7 +1444,7 @@ bool ImGui::TextLink(const char* label)
14441444
const ImGuiID id = window->GetID(label);
14451445
const char* label_end = FindRenderedTextEnd(label);
14461446

1447-
ImVec2 pos = window->DC.CursorPos;
1447+
ImVec2 pos(window->DC.CursorPos.x, window->DC.CursorPos.y + window->DC.CurrLineTextBaseOffset);
14481448
ImVec2 size = CalcTextSize(label, label_end, true);
14491449
ImRect bb(pos, pos + size);
14501450
ItemSize(size, 0.0f);

0 commit comments

Comments
 (0)