From bc565e65d1a6c0820935fe0112f69c3ce8966ecf Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Wed, 20 Jun 2018 14:41:00 +0200 Subject: [PATCH] Better callstack info window layout. --- server/TracyView.cpp | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index c33d6070..6800443b 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -4777,24 +4777,40 @@ void View::DrawCallstackWindow() auto& cs = m_worker.GetCallstack( m_callstackInfoWindow ); + ImGui::Columns( 3 ); + ImGui::Text( "Frame" ); + ImGui::NextColumn(); + ImGui::Text( "Function" ); + ImGui::NextColumn(); + ImGui::Text( "Location" ); + ImGui::NextColumn(); + int fidx = 0; for( auto& entry : cs ) { + ImGui::Separator(); + ImGui::Text( "%i", fidx++ ); + ImGui::NextColumn(); + auto frame = m_worker.GetCallstackFrame( entry ); if( !frame ) { - ImGui::Text( "%i. 0x%" PRIX64, fidx++, entry ); + ImGui::Text( "0x%" PRIX64, entry ); + ImGui::NextColumn(); + ImGui::NextColumn(); } else { - ImGui::Text( "%i. %s", fidx++, m_worker.GetString( frame->name ) ); - ImGui::SameLine(); + ImGui::TextWrapped( "%s", m_worker.GetString( frame->name ) ); + ImGui::NextColumn(); ImGui::PushTextWrapPos( 0.0f ); ImGui::TextDisabled( "(%s:%i)", m_worker.GetString( frame->file ), frame->line ); ImGui::PopTextWrapPos(); + ImGui::NextColumn(); } } + ImGui::EndColumns(); ImGui::End(); if( !show )