imgui-frontend-engineer: stabilize editor card layout

This commit is contained in:
scawful
2025-12-28 10:59:18 -06:00
parent 51aac88868
commit 7f28b377dd
2 changed files with 4 additions and 0 deletions

View File

@@ -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();
}

View File

@@ -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();
}