Skip to content

Commit 72ee38b

Browse files
committed
Fix About dialog positioning
1 parent 84eb80d commit 72ee38b

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

src/editor_app.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ std::string EditorApp::get_version() {
175175
} else {
176176
version = "0.0.0 (unknown)"; // fallback if VERSION file missing
177177
}
178-
return "pCode Editor version 0.2.75 (814478e)" + version;
178+
return "pCode Editor version 0.2.76 (23f6772)" + version;
179179
}
180180

181181
// ============================================================================
@@ -2259,8 +2259,10 @@ void EditorApp::render_menu_split() {
22592259
void EditorApp::render_about_dialog() {
22602260
if (!show_about_) return;
22612261

2262-
ImGui::OpenPopup("About");
2263-
if (ImGui::BeginPopupModal("About", &show_about_)) {
2262+
ImVec2 center = ImGui::GetMainViewport()->GetCenter();
2263+
ImGui::SetNextWindowPos(center, ImGuiCond_Appearing, ImVec2(0.5f, 0.5f));
2264+
2265+
if (ImGui::BeginPopupModal("About", &show_about_, ImGuiWindowFlags_AlwaysAutoResize)) {
22642266
ImGui::Text("Personal Code Editor");
22652267
ImGui::Separator();
22662268

0 commit comments

Comments
 (0)