force minimum size on file picker

This commit is contained in:
tildearrow 2022-01-31 15:03:10 -05:00
parent 48046ef86c
commit 82d8728ca1
1 changed files with 3 additions and 0 deletions

View File

@ -3618,6 +3618,9 @@ namespace IGFD
if (beg)
{
ImGui::SetWindowPos(ImVec2((ImGui::GetMainViewport()->Size.x-ImGui::GetWindowWidth())*0.5f,(ImGui::GetMainViewport()->Size.y-ImGui::GetWindowHeight())*0.5f));
if (ImGui::GetWindowSize().x<vMinSize.x || ImGui::GetWindowSize().y<vMinSize.y) {
ImGui::SetWindowSize(vMinSize,ImGuiCond_Always);
}
#ifdef IMGUI_HAS_VIEWPORT
// if decoration is enabled we disable the resizing feature of imgui for avoid crash with SDL2 and GLFW3
if (ImGui::GetIO().ConfigViewportsNoDecoration)