diff --git a/ImGuiFileDialog.cpp b/ImGuiFileDialog.cpp index ac21990..b4f2f0a 100644 --- a/ImGuiFileDialog.cpp +++ b/ImGuiFileDialog.cpp @@ -10,7 +10,7 @@ /* MIT License -Copyright (c) 2019-2020 Stephane Cuillerdier (aka aiekick) +Copyright (c) 2019-2024 Stephane Cuillerdier (aka aiekick) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -3387,8 +3387,7 @@ bool IGFD::KeyExplorerFeature::m_FlashableSelectable(const char* label, bool sel ItemSize(size, 0.0f); // Fill horizontal space - // We don't support (size < 0.0f) in Selectable() because the ItemSpacing extension would make explicitly right-aligned sizes not visibly match - // other widgets. + // We don't support (size < 0.0f) in Selectable() because the ItemSpacing extension would make explicitly right-aligned sizes not visibly match other widgets. const bool span_all_columns = (flags & ImGuiSelectableFlags_SpanAllColumns) != 0; const float min_x = span_all_columns ? window->ParentWorkRect.Min.x : pos.x; const float max_x = span_all_columns ? window->ParentWorkRect.Max.x : window->WorkRect.Max.x; @@ -3412,7 +3411,7 @@ bool IGFD::KeyExplorerFeature::m_FlashableSelectable(const char* label, bool sel } // if (g.IO.KeyCtrl) { GetForegroundDrawList()->AddRect(bb.Min, bb.Max, IM_COL32(0, 255, 0, 255)); } - // Modify ClipRect for the ItemAdd(), faster than doing a PushColumnsBackground/PushTableBackground for every Selectable.. + // Modify ClipRect for the ItemAdd(), faster than doing a PushColumnsBackground/PushTableBackgroundChannel for every Selectable.. const float backup_clip_rect_min_x = window->ClipRect.Min.x; const float backup_clip_rect_max_x = window->ClipRect.Max.x; if (span_all_columns) { @@ -3435,10 +3434,14 @@ bool IGFD::KeyExplorerFeature::m_FlashableSelectable(const char* label, bool sel // FIXME: We can standardize the behavior of those two, we could also keep the fast path of override ClipRect + full push on render only, // which would be advantageous since most selectable are not selected. - if (span_all_columns && window->DC.CurrentColumns) - PushColumnsBackground(); - else if (span_all_columns && g.CurrentTable) - TablePushBackgroundChannel(); + if (span_all_columns) { + if (g.CurrentTable) + TablePushBackgroundChannel(); + else if (window->DC.CurrentColumns) + PushColumnsBackground(); + g.LastItemData.StatusFlags |= ImGuiItemStatusFlags_HasClipRect; + g.LastItemData.ClipRect = window->ClipRect; + } // We use NoHoldingActiveID on menus so user can click and _hold_ on a menu then drag to browse child entries ImGuiButtonFlags button_flags = 0; @@ -3498,12 +3501,14 @@ bool IGFD::KeyExplorerFeature::m_FlashableSelectable(const char* label, bool sel const ImU32 col = GetColorU32((held && hovered) ? ImGuiCol_HeaderActive : hovered ? ImGuiCol_HeaderHovered : ImGuiCol_Header); RenderFrame(bb.Min, bb.Max, col, false, 0.0f); } - if (g.NavId == id) RenderNavHighlight(bb, id, ImGuiNavHighlightFlags_TypeThin | ImGuiNavHighlightFlags_NoRounding); + if (g.NavId == id) RenderNavHighlight(bb, id, ImGuiNavHighlightFlags_Compact | ImGuiNavHighlightFlags_NoRounding); - if (span_all_columns && window->DC.CurrentColumns) - PopColumnsBackground(); - else if (span_all_columns && g.CurrentTable) - TablePopBackgroundChannel(); + if (span_all_columns) { + if (g.CurrentTable) + TablePopBackgroundChannel(); + else if (window->DC.CurrentColumns) + PopColumnsBackground(); + } RenderTextClipped(text_min, text_max, label, NULL, &label_size, style.SelectableTextAlign, &bb); diff --git a/ImGuiFileDialog.h b/ImGuiFileDialog.h index 9582ae3..5b1112f 100644 --- a/ImGuiFileDialog.h +++ b/ImGuiFileDialog.h @@ -15,7 +15,7 @@ /* MIT License -Copyright (c) 2018-2023 Stephane Cuillerdier (aka aiekick) +Copyright (c) 2018-2024 Stephane Cuillerdier (aka aiekick) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -72,7 +72,7 @@ solutions. ## ImGui Supported Version -ImGuiFileDialog follow the master and docking branch of ImGui . currently ImGui 1.90.1 WIP +ImGuiFileDialog follow the master and docking branch of ImGui . currently ImGui 1.90.4 WIP ## Structure @@ -1217,8 +1217,8 @@ The Custom Icon Font (in CustomFont.cpp and CustomFont.h) was made with ImGuiFon #pragma region IGFD VERSION -// compatible with 1.90.1 WIP -#define IMGUIFILEDIALOG_VERSION "v0.6.6.1" +// compatible with 1.90.4 WIP +#define IMGUIFILEDIALOG_VERSION "v0.6.7" #pragma endregion diff --git a/LICENSE b/LICENSE index b4d3f81..55e17ad 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2018-2023 Stephane Cuillerdier (aka Aiekick) +Copyright (c) 2018-2024 Stephane Cuillerdier (aka Aiekick) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index de1b77e..210f52d 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ [![Win](https://github.com/aiekick/ImGuiFileDialog/actions/workflows/Win.yml/badge.svg?branch=DemoApp)](https://github.com/aiekick/ImGuiFileDialog/actions/workflows/Win.yml) [![Linux](https://github.com/aiekick/ImGuiFileDialog/actions/workflows/Linux.yml/badge.svg?branch=DemoApp)](https://github.com/aiekick/ImGuiFileDialog/actions/workflows/Linux.yml) [![Osx](https://github.com/aiekick/ImGuiFileDialog/actions/workflows/Osx.yml/badge.svg?branch=DemoApp)](https://github.com/aiekick/ImGuiFileDialog/actions/workflows/Osx.yml) -[![Wrapped Dear ImGui Version](https://img.shields.io/badge/Dear%20ImGui%20Version-1.90.1-blue.svg)](https://github.com/ocornut/imgui) +[![Wrapped Dear ImGui Version](https://img.shields.io/badge/Dear%20ImGui%20Version-1.90.4-blue.svg)](https://github.com/ocornut/imgui) # ImGuiFileDialog @@ -14,7 +14,7 @@ solutions. ## ImGui Supported Version -ImGuiFileDialog follow the master and docking branch of ImGui. Currently ImGui 1.90.1 +ImGuiFileDialog follow the master and docking branch of ImGui. Currently ImGui 1.90.4 ## Structure