From d0a7ee1692b94c15102958ccdfbf11fb35162b52 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Wed, 16 Oct 2024 00:32:11 +0200 Subject: [PATCH] Center elevated privileges warning message. --- profiler/src/main.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/profiler/src/main.cpp b/profiler/src/main.cpp index 0a37a309..5d9ae1f5 100644 --- a/profiler/src/main.cpp +++ b/profiler/src/main.cpp @@ -931,13 +931,15 @@ static void DrawContents() if( s_isElevated ) { ImGui::Separator(); - ImGui::TextColored( ImVec4( 1, 0.25f, 0.25f, 1 ), ICON_FA_TRIANGLE_EXCLAMATION " Profiler has elevated privileges! " ICON_FA_TRIANGLE_EXCLAMATION ); + ImGui::PushStyleColor( ImGuiCol_Text, ImVec4( 1.f, 0.25f, 0.25f, 1.f ) ); + tracy::TextCentered( ICON_FA_TRIANGLE_EXCLAMATION " Profiler has elevated privileges! " ICON_FA_TRIANGLE_EXCLAMATION ); ImGui::PushFont( s_smallFont ); - ImGui::TextColored( ImVec4( 1, 0.25f, 0.25f, 1 ), "You are running the profiler interface with admin privileges. This is" ); - ImGui::TextColored( ImVec4( 1, 0.25f, 0.25f, 1 ), "most likely a mistake, as there is no reason to do so. Instead, you" ); - ImGui::TextColored( ImVec4( 1, 0.25f, 0.25f, 1 ), "probably wanted to run the client (the application you are profiling)" ); - ImGui::TextColored( ImVec4( 1, 0.25f, 0.25f, 1 ), "with elevated privileges." ); + tracy::TextCentered( "You are running the profiler interface with admin privileges. This is" ); + tracy::TextCentered( "most likely a mistake, as there is no reason to do so. Instead, you" ); + tracy::TextCentered( "probably wanted to run the client (the application you are profiling)" ); + tracy::TextCentered( "with elevated privileges." ); ImGui::PopFont(); + ImGui::PopStyleColor(); } ImGui::Separator(); ImGui::TextUnformatted( "Client address" );