From 2ffae6c626c9aa88cc1ab3dc7fe575fcccbb88b3 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sun, 1 Jun 2025 22:25:40 +0200 Subject: [PATCH] Don't repeat text. --- profiler/src/profiler/TracyLlm.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/profiler/src/profiler/TracyLlm.cpp b/profiler/src/profiler/TracyLlm.cpp index 9683d220..000f7eee 100644 --- a/profiler/src/profiler/TracyLlm.cpp +++ b/profiler/src/profiler/TracyLlm.cpp @@ -392,9 +392,10 @@ void TracyLlm::Draw() ImGui::PushStyleColor( ImGuiCol_Text, style.Colors[ImGuiCol_TextDisabled] ); ImGui::TextWrapped( "What I had not realized is that extremely short exposures to a relatively simple computer program could induce powerful delusional thinking in quite normal people." ); ImGui::Dummy( ImVec2( 0, ImGui::GetTextLineHeight() * 0.5f ) ); - const auto tw = ImGui::CalcTextSize( "-- Joseph Weizenbaum, 1976" ).x; + constexpr auto signature = "-- Joseph Weizenbaum, 1976"; + const auto tw = ImGui::CalcTextSize( signature ).x; ImGui::SetCursorPosX( ( ImGui::GetWindowWidth() - tw - 30 * scale ) ); - ImGui::TextUnformatted( "-- Joseph Weizenbaum, 1976" ); + ImGui::TextUnformatted( signature ); ImGui::PopStyleColor(); } else