From 16925525c6418d211df06ea768d8ddc37a5f79d9 Mon Sep 17 00:00:00 2001 From: ocornut Date: Tue, 10 Feb 2015 22:56:28 +0000 Subject: [PATCH] Selectable: fixed text clipping. --- imgui.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imgui.cpp b/imgui.cpp index 89951093..338248a3 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -5781,7 +5781,7 @@ bool ImGui::Selectable(const char* label, bool selected, const ImVec2& size_arg) } //const ImVec2 off = ImVec2(ImMax(0.0f, size.x - text_size.x) * 0.5f, ImMax(0.0f, size.y - text_size.y) * 0.5f); - RenderTextClipped(bb.Min, label, NULL, &text_size, bb.Max); + RenderTextClipped(bb.Min, label, NULL, &text_size, bb_with_spacing.Max); return pressed; }