From 1a883f0d6c02a0adb5cd69ec7f7a10bc4de27895 Mon Sep 17 00:00:00 2001 From: dijunkun Date: Fri, 5 Dec 2025 17:53:17 +0800 Subject: [PATCH] [fix] fix menu BeginPopup & EndPopup pairing --- src/gui/toolbars/title_bar.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gui/toolbars/title_bar.cpp b/src/gui/toolbars/title_bar.cpp index b58a9f2..d5fdbfe 100644 --- a/src/gui/toolbars/title_bar.cpp +++ b/src/gui/toolbars/title_bar.cpp @@ -131,7 +131,7 @@ int Render::TitleBar(bool main_window) { ImGui::EndTooltip(); } - ImGui::EndMenu(); + ImGui::EndPopup(); } else { show_new_version_icon_in_menu_ = true; } @@ -152,7 +152,9 @@ int Render::TitleBar(bool main_window) { // render for 1 second if (show_new_version_icon_) { ImGui::SetWindowFontScale(0.6f); - ImGui::SetCursorPos(ImVec2(bar_pos_x + 10, bar_pos_y - 17)); + ImGui::SetCursorPos( + ImVec2(bar_pos_x + title_bar_button_width * 0.15f, + bar_pos_y - title_bar_button_width * 0.325f)); ImGui::Text(ICON_FA_TRIANGLE_EXCLAMATION); ImGui::SetWindowFontScale(1.0f);