diff --git a/extern/igfd/ImGuiFileDialog.cpp b/extern/igfd/ImGuiFileDialog.cpp index 9cd46d1bc..5be457930 100644 --- a/extern/igfd/ImGuiFileDialog.cpp +++ b/extern/igfd/ImGuiFileDialog.cpp @@ -1105,7 +1105,7 @@ namespace IGFD bool needToApllyNewFilter = false; - ImGui::PushItemWidth(FILTER_COMBO_WIDTH); + ImGui::PushItemWidth(FILTER_COMBO_WIDTH*FileDialog::Instance()->DpiScale); if (ImGui::BeginCombo("##Filters", prSelectedFilter.filter.c_str(), ImGuiComboFlags_None)) { intptr_t i = 0; @@ -3279,7 +3279,7 @@ namespace IGFD //// FILE DIALOG CONSTRUCTOR / DESTRUCTOR /////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////// - IGFD::FileDialog::FileDialog() : BookMarkFeature(), KeyExplorerFeature(), ThumbnailFeature() {} + IGFD::FileDialog::FileDialog() : BookMarkFeature(), KeyExplorerFeature(), ThumbnailFeature() {DpiScale=1.0f;} IGFD::FileDialog::~FileDialog() = default; ////////////////////////////////////////////////////////////////////////////////////////////////// @@ -3829,7 +3829,7 @@ namespace IGFD float width = ImGui::GetContentRegionAvail().x; // fix this! fix this! fix this! if (!fdFile.puDLGDirectoryMode) - width -= FILTER_COMBO_WIDTH; + width -= FILTER_COMBO_WIDTH*DpiScale; ImGui::PushItemWidth(width); ImGui::InputText("##FileName", fdFile.puFileNameBuffer, MAX_FILE_DIALOG_NAME_BUFFER); if (ImGui::GetItemID() == ImGui::GetActiveID()) diff --git a/extern/igfd/ImGuiFileDialog.h b/extern/igfd/ImGuiFileDialog.h index 0b69f8306..2944bfbf4 100644 --- a/extern/igfd/ImGuiFileDialog.h +++ b/extern/igfd/ImGuiFileDialog.h @@ -1133,6 +1133,7 @@ namespace IGFD public: bool puAnyWindowsHovered = false; // not remember why haha :) todo : to check if we can remove + double DpiScale; public: static FileDialog* Instance() // Singleton for easier accces form anywhere but only one dialog at a time diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp index 2242c7d6f..c8e9edeb1 100644 --- a/src/gui/gui.cpp +++ b/src/gui/gui.cpp @@ -3915,6 +3915,7 @@ bool dirExists(String what) { void FurnaceGUI::openFileDialog(FurnaceGUIFileDialogs type) { if (!dirExists(workingDir)) workingDir=getHomeDir(); + ImGuiFileDialog::Instance()->DpiScale=dpiScale; switch (type) { case GUI_FILE_OPEN: ImGuiFileDialog::Instance()->OpenModal("FileDialog","Open File","compatible files{.fur,.dmf},.*",workingDir);