1
0
mirror of synced 2024-09-24 11:38:26 +02:00

fix: Icon text input boxes being wider than expected

This commit is contained in:
WerWolv 2024-05-15 18:26:44 +02:00
parent c69d3bc7f4
commit 027ff793ed
2 changed files with 2 additions and 2 deletions

View File

@ -915,7 +915,7 @@ namespace ImGuiExt {
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)
MarkItemEdited(GImGui->LastItemData.ID);

View File

@ -911,7 +911,7 @@ namespace hex::plugin::builtin {
auto &currOccurrences = *m_sortedOccurrences;
ImGui::PushItemWidth(-30_scaled);
ImGui::PushItemWidth(-15_scaled);
auto prevFilterLength = m_currFilter->length();
if (ImGuiExt::InputTextIcon("##filter", ICON_VS_FILTER, *m_currFilter)) {
if (prevFilterLength > m_currFilter->length())