1
0
mirror of synced 2025-01-11 05:42:15 +01:00

fix: Icon text inputs not being the same length as other items

This commit is contained in:
WerWolv 2024-12-23 21:48:47 +01:00
parent 914024c0b5
commit 5f2c07f2d8

View File

@ -981,7 +981,7 @@ namespace ImGuiExt {
SetCursorPosX(GetCursorPosX() + frame_size.x); SetCursorPosX(GetCursorPosX() + frame_size.x);
bool value_changed = InputTextEx(label, nullptr, buffer.data(), buffer.size() + 1, ImVec2(CalcItemWidth(), label_size.y + style.FramePadding.y * 2.0F), ImGuiInputTextFlags_CallbackResize | flags, UpdateStringSizeCallback, &buffer); bool value_changed = InputTextEx(label, nullptr, buffer.data(), buffer.size() + 1, ImVec2(CalcItemWidth() - icon_frame_size.x, label_size.y + style.FramePadding.y * 2.0F), ImGuiInputTextFlags_CallbackResize | flags, UpdateStringSizeCallback, &buffer);
if (value_changed) if (value_changed)
MarkItemEdited(GImGui->LastItemData.ID); MarkItemEdited(GImGui->LastItemData.ID);