diff --git a/profiler/src/profiler/TracyView.cpp b/profiler/src/profiler/TracyView.cpp index 32df5d15..898a6566 100644 --- a/profiler/src/profiler/TracyView.cpp +++ b/profiler/src/profiler/TracyView.cpp @@ -1538,6 +1538,7 @@ void View::DpiScaleChanged() m_waitStacksConstraint.Reset(); m_frameStatsConstraint.Reset(); m_sampleEntryConstraint.Reset(); + m_callstackConstraint.Reset(); } void View::AddLlmAttachment( const nlohmann::json& json ) diff --git a/profiler/src/profiler/TracyView.hpp b/profiler/src/profiler/TracyView.hpp index ed83eceb..66b0ba2a 100644 --- a/profiler/src/profiler/TracyView.hpp +++ b/profiler/src/profiler/TracyView.hpp @@ -86,6 +86,7 @@ struct CallstackTableParams bool showThread = false; bool hasCrashed = false; int64_t callstack = -1; + WindowConstraints* constraints = nullptr; }; @@ -1103,6 +1104,7 @@ private: WindowConstraints m_waitStacksConstraint; WindowConstraints m_frameStatsConstraint; WindowConstraints m_sampleEntryConstraint; + WindowConstraints m_callstackConstraint; #ifndef __EMSCRIPTEN__ TracyLlm m_llm; diff --git a/profiler/src/profiler/TracyView_Callstack.cpp b/profiler/src/profiler/TracyView_Callstack.cpp index 42964504..16e5955f 100644 --- a/profiler/src/profiler/TracyView_Callstack.cpp +++ b/profiler/src/profiler/TracyView_Callstack.cpp @@ -21,6 +21,7 @@ void View::DrawCallstackWindow() bool show = true; const auto scale = GetScale(); ImGui::SetNextWindowSize( ImVec2( 1400 * scale, 500 * scale ), ImGuiCond_FirstUseEver ); + m_callstackConstraint.Constrain(); ImGui::Begin( "Call stack", &show, ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoScrollWithMouse ); if( !ImGui::GetCurrentWindowRead()->SkipItems ) { @@ -29,6 +30,7 @@ void View::DrawCallstackWindow() .wait = m_callstackView.wait, .entryStacks = true, .showThread = true, + .constraints = &m_callstackConstraint } ); } ImGui::End(); @@ -47,6 +49,7 @@ void View::DrawCallstackTable( uint32_t callstack, const CallstackTableParams& p .showThread = params.showThread, .hasCrashed = crash.thread != 0 && crash.callstack == callstack, .callstack = callstack, + .constraints = params.constraints } ); } @@ -387,6 +390,7 @@ void View::DrawCallstackTable( const CallstackFrameId* data, size_t size, const TextColoredUnformatted( ImVec4( 0.2f, 0.6f, 0.2f, 1.f ), "Fiber" ); } } + if( params.constraints ) params.constraints->MarkMinWidth(); #ifndef __EMSCRIPTEN__ if( s_config.llm && params.callstack >= 0 )