From f2d6c79742ce18f0e18bb60602d5165feccf80b5 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sun, 12 Jul 2020 15:00:56 +0200 Subject: [PATCH] Don't wrap messages. --- server/TracyView.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index dacdf035..315d6d7d 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -8715,7 +8715,16 @@ void View::DrawMessages() ImGui::TextDisabled( "(%s)", RealToString( tid ) ); ImGui::NextColumn(); ImGui::PushStyleColor( ImGuiCol_Text, v->color ); - ImGui::TextWrapped( "%s", text ); + const auto cw = ImGui::GetContentRegionAvail().x; + const auto tw = ImGui::CalcTextSize( text ).x; + ImGui::TextUnformatted( text ); + if( tw > cw && ImGui::IsItemHovered() ) + { + ImGui::SetNextWindowSize( ImVec2( 1000, 0 ) ); + ImGui::BeginTooltip(); + ImGui::TextWrapped( "%s", text ); + ImGui::EndTooltip(); + } ImGui::PopStyleColor(); ImGui::NextColumn(); if( hasCallstack )