From 815d7fdcb4bc08cf7a70cab323fb4942d245d754 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sat, 9 Mar 2019 00:34:04 +0100 Subject: [PATCH] Set sane callstack window column widths. --- server/TracyView.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index 7c5debbf..c3ac9008 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -7555,6 +7555,7 @@ void View::DrawStatistics() void View::DrawCallstackWindow() { bool show = true; + ImGui::SetNextWindowSize( ImVec2( 1200, 500 ), ImGuiCond_FirstUseEver ); ImGui::Begin( "Call stack", &show ); #ifdef TRACY_EXTENDED_FONT @@ -7565,7 +7566,16 @@ void View::DrawCallstackWindow() auto& cs = m_worker.GetCallstack( m_callstackInfoWindow ); + const auto w = ImGui::GetWindowWidth(); + static bool widthSet = false; ImGui::Columns( 3 ); + if( !widthSet ) + { + widthSet = true; + ImGui::SetColumnWidth( 0, w * 0.05f ); + ImGui::SetColumnWidth( 1, w * 0.475f ); + ImGui::SetColumnWidth( 2, w * 0.475f ); + } ImGui::TextUnformatted( "Frame" ); ImGui::NextColumn(); ImGui::TextUnformatted( "Function" );