From 6532f622cb1cbc76163498f96c2b3e4f5ebb4904 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sat, 22 Feb 2020 21:17:10 +0100 Subject: [PATCH] Mute color of unknown call frames. --- server/TracyView.cpp | 33 +++++++++++++++++++++++++++++---- 1 file changed, 29 insertions(+), 4 deletions(-) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index 537739d5..9e93d3fb 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -11107,8 +11107,19 @@ void View::DrawCallstackWindow() TextDisabledUnformatted( "inline" ); } ImGui::NextColumn(); - - ImGui::TextWrapped( "%s", txt ); + { + ImGuiWindow* window = ImGui::GetCurrentWindow(); + ImGui::PushTextWrapPos( 0.0f ); + if( txt[0] == '[' ) + { + TextDisabledUnformatted( txt ); + } + else + { + ImGui::TextUnformatted( txt ); + } + ImGui::PopTextWrapPos(); + } if( ImGui::IsItemClicked() ) { ImGui::SetClipboardText( txt ); @@ -14327,7 +14338,14 @@ void View::CallstackTooltip( uint32_t idx ) TextDisabledUnformatted( "--" ); } ImGui::SameLine(); - ImGui::TextUnformatted( txt ); + if( txt[0] == '[' ) + { + TextDisabledUnformatted( txt ); + } + else + { + ImGui::TextUnformatted( txt ); + } } } } @@ -14741,7 +14759,14 @@ void View::DrawCallstackCalls( uint32_t callstack, uint8_t limit ) const } const auto& frame = frameData->data[frameData->size - 1]; auto txt = m_worker.GetString( frame.name ); - ImGui::TextUnformatted( txt ); + if( txt[0] == '[' ) + { + TextDisabledUnformatted( txt ); + } + else + { + ImGui::TextUnformatted( txt ); + } } }