From 83cb040d203e3964bcbb672f4e5357232b4006b0 Mon Sep 17 00:00:00 2001 From: ocornut Date: Mon, 25 May 2015 23:03:16 +0100 Subject: [PATCH] Selectable: text baseline alignment for line that aren't of text height. --- imgui.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/imgui.cpp b/imgui.cpp index a89b6cf3..b3cbd2c3 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -7289,6 +7289,7 @@ static bool SelectableEx(const char* label, bool selected, const ImVec2& size_ar ImVec2 label_size = ImGui::CalcTextSize(label, NULL, true); ImVec2 size(size_arg.x != 0.0f ? size_arg.x : label_size.x, size_arg.y != 0.0f ? size_arg.y : label_size.y); ImVec2 pos = window->DC.CursorPos; + pos.y += window->DC.CurrentLineTextBaseOffset; ImRect bb(pos, pos + size); ItemSize(bb);