Skip to content

Commit fd31e98

Browse files
committed
fix centering of messages
1 parent baf1572 commit fd31e98

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/messages.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,10 @@ void buildWarningUI(std::string warningBaseString, std::string warningDetailStri
106106
std::max(warningBaseTextSize.y, std::max(warningDetailTextSize.y, warningRepeatTextSize.y)));
107107
ImVec2 warningModalSize(
108108
std::max(view::windowWidth / 5.0f, std::min(warningMaxTextSize.x + 50, view::windowWidth / 2.0f)), 0);
109+
ImVec2 warningModalPos((view::windowWidth - warningModalSize.x) / 2, view::windowHeight / 3);
109110

110111
ImGui::SetNextWindowSize(warningModalSize);
112+
ImGui::SetNextWindowPos(warningModalPos, ImGuiCond_Always);
111113
ImGui::PushStyleColor(ImGuiCol_TitleBgActive, ImVec4(190. / 255., 166. / 255., 0, 1.0));
112114
if (ImGui::BeginPopupModal("WARNING", NULL, ImGuiWindowFlags_NoMove)) {
113115

0 commit comments

Comments
 (0)