From 7f28b377ddad4224340f314ccd1d87551ebfc9e1 Mon Sep 17 00:00:00 2001 From: scawful Date: Sun, 28 Dec 2025 10:59:18 -0600 Subject: [PATCH] imgui-frontend-engineer: stabilize editor card layout --- src/app/editor/ui/dashboard_panel.cc | 2 ++ src/app/editor/ui/editor_selection_dialog.cc | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/app/editor/ui/dashboard_panel.cc b/src/app/editor/ui/dashboard_panel.cc index adf79b46..e835d164 100644 --- a/src/app/editor/ui/dashboard_panel.cc +++ b/src/app/editor/ui/dashboard_panel.cc @@ -430,6 +430,7 @@ void DashboardPanel::DrawEditorPanel(const EditorInfo& info, int index, bool clicked = ImGui::Button(absl::StrCat("##", info.name).c_str(), card_size); bool is_hovered = ImGui::IsItemHovered(); + const ImVec2 after_button = ImGui::GetCursorScreenPos(); ImGui::PopStyleColor(3); @@ -511,6 +512,7 @@ void DashboardPanel::DrawEditorPanel(const EditorInfo& info, int index, } } + ImGui::SetCursorScreenPos(after_button); ImGui::PopID(); } diff --git a/src/app/editor/ui/editor_selection_dialog.cc b/src/app/editor/ui/editor_selection_dialog.cc index 1a71ab21..2a9bac76 100644 --- a/src/app/editor/ui/editor_selection_dialog.cc +++ b/src/app/editor/ui/editor_selection_dialog.cc @@ -462,6 +462,7 @@ void EditorSelectionDialog::DrawEditorPanel(const EditorInfo& info, int index, bool clicked = ImGui::Button(absl::StrCat("##", info.name).c_str(), card_size); bool is_hovered = ImGui::IsItemHovered(); + const ImVec2 after_button = ImGui::GetCursorScreenPos(); ImGui::PopStyleColor(3); @@ -531,6 +532,7 @@ void EditorSelectionDialog::DrawEditorPanel(const EditorInfo& info, int index, selected_editor_ = info.type; } + ImGui::SetCursorScreenPos(after_button); ImGui::PopID(); }