From 314b87dfaf6e5664e8e038e2a8c7b7040841d42d Mon Sep 17 00:00:00 2001 From: ocornut Date: Thu, 19 Mar 2015 14:15:51 +0000 Subject: [PATCH] InputFloat(): fixed label alignment if total widget width forcefully bigger than space available --- imgui.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imgui.cpp b/imgui.cpp index 5ae03a54..76c5d08d 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -5689,8 +5689,8 @@ bool ImGui::InputFloat(const char* label, float *v, float step, float step_fast, if (label_size.x > 0) { ImGui::SameLine(0, (int)style.ItemInnerSpacing.x); + RenderText(ImVec2(window->DC.CursorPos.x, window->DC.CursorPos.y + style.FramePadding.y), label); ItemSize(label_size, style.FramePadding.y); - RenderText(ImVec2(frame_bb.Max.x + style.ItemInnerSpacing.x, frame_bb.Min.y + style.FramePadding.y), label); } return value_changed;