Skip to content

Commit 4a10cb4

Browse files
committed
2 parents c8384c9 + 63302e0 commit 4a10cb4

1 file changed

Lines changed: 16 additions & 4 deletions

File tree

ImGuiFileDialog.cpp

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4197,13 +4197,25 @@ void IGFD::FileDialog::m_BeginFileColorIconStyle(std::shared_ptr<FileInfos> vFil
41974197

41984198
vOutStr += " " + vFileInfos->fileNameExt;
41994199

4200-
if (vOutShowColor) ImGui::PushStyleColor(ImGuiCol_Text, vFileInfos->fileStyle->color);
4201-
if (*vOutFont) ImGui::PushFont(*vOutFont, 0.0f);
4200+
if (vOutShowColor) {
4201+
ImGui::PushStyleColor(ImGuiCol_Text, vFileInfos->fileStyle->color);
4202+
}
4203+
if (*vOutFont) {
4204+
#ifdef IMGUI_VERSION_NUM < 19201
4205+
ImGui::PushFont(*vOutFont);
4206+
#else
4207+
ImGui::PushFont(*vOutFont, 0.0f);
4208+
#endif
4209+
}
42024210
}
42034211

42044212
void IGFD::FileDialog::m_EndFileColorIconStyle(const bool vShowColor, ImFont* vFont) {
4205-
if (vFont) ImGui::PopFont();
4206-
if (vShowColor) ImGui::PopStyleColor();
4213+
if (vFont) {
4214+
ImGui::PopFont();
4215+
}
4216+
if (vShowColor) {
4217+
ImGui::PopStyleColor();
4218+
}
42074219
}
42084220

42094221
void IGFD::FileDialog::m_drawColumnText(int /*vColIdx*/, const char* vLabel, bool /*vSelected*/, bool /*vHovered*/) {

0 commit comments

Comments
 (0)