mirror of
https://github.com/Drezil/imgui.git
synced 2025-04-01 17:02:45 +00:00
InputFloat(): fixed label alignment if total widget width forcefully bigger than space available
This commit is contained in:
parent
c151f35751
commit
314b87dfaf
@ -5689,8 +5689,8 @@ bool ImGui::InputFloat(const char* label, float *v, float step, float step_fast,
|
|||||||
if (label_size.x > 0)
|
if (label_size.x > 0)
|
||||||
{
|
{
|
||||||
ImGui::SameLine(0, (int)style.ItemInnerSpacing.x);
|
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);
|
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;
|
return value_changed;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user