From 6f6ac84228a6502b6f21c7dc3641195783a06fb2 Mon Sep 17 00:00:00 2001 From: Jack Holmes Date: Wed, 4 Dec 2024 17:59:51 +0000 Subject: [PATCH] Demo: Assets Browser: use correct axis for layout computation, to allow making items non-square. (#8207) --- imgui_demo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imgui_demo.cpp b/imgui_demo.cpp index c822c162e..5efbe6304 100644 --- a/imgui_demo.cpp +++ b/imgui_demo.cpp @@ -10175,7 +10175,7 @@ struct ExampleAssetsBrowser } ImGuiIO& io = ImGui::GetIO(); - ImGui::SetNextWindowContentSize(ImVec2(0.0f, LayoutOuterPadding + LayoutLineCount * (LayoutItemSize.x + LayoutItemSpacing))); + ImGui::SetNextWindowContentSize(ImVec2(0.0f, LayoutOuterPadding + LayoutLineCount * (LayoutItemSize.y + LayoutItemSpacing))); if (ImGui::BeginChild("Assets", ImVec2(0.0f, -ImGui::GetTextLineHeightWithSpacing()), ImGuiChildFlags_Borders, ImGuiWindowFlags_NoMove)) { ImDrawList* draw_list = ImGui::GetWindowDrawList();