Set sane callstack window column widths.

This commit is contained in:
Bartosz Taudul 2019-03-09 00:34:04 +01:00
parent 5445ffb149
commit 815d7fdcb4

View File

@ -7555,6 +7555,7 @@ void View::DrawStatistics()
void View::DrawCallstackWindow() void View::DrawCallstackWindow()
{ {
bool show = true; bool show = true;
ImGui::SetNextWindowSize( ImVec2( 1200, 500 ), ImGuiCond_FirstUseEver );
ImGui::Begin( "Call stack", &show ); ImGui::Begin( "Call stack", &show );
#ifdef TRACY_EXTENDED_FONT #ifdef TRACY_EXTENDED_FONT
@ -7565,7 +7566,16 @@ void View::DrawCallstackWindow()
auto& cs = m_worker.GetCallstack( m_callstackInfoWindow ); auto& cs = m_worker.GetCallstack( m_callstackInfoWindow );
const auto w = ImGui::GetWindowWidth();
static bool widthSet = false;
ImGui::Columns( 3 ); 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::TextUnformatted( "Frame" );
ImGui::NextColumn(); ImGui::NextColumn();
ImGui::TextUnformatted( "Function" ); ImGui::TextUnformatted( "Function" );