diff --git a/profiler/src/profiler/TracyView.cpp b/profiler/src/profiler/TracyView.cpp index a916af79..34ca2182 100644 --- a/profiler/src/profiler/TracyView.cpp +++ b/profiler/src/profiler/TracyView.cpp @@ -1528,6 +1528,7 @@ bool View::WasActive() const void View::DpiScaleChanged() { + m_flameGraphConstraint.Reset(); } void View::AddLlmAttachment( const nlohmann::json& json ) diff --git a/profiler/src/profiler/TracyView.hpp b/profiler/src/profiler/TracyView.hpp index e95aa95c..01406d68 100644 --- a/profiler/src/profiler/TracyView.hpp +++ b/profiler/src/profiler/TracyView.hpp @@ -25,6 +25,7 @@ #include "TracyUserData.hpp" #include "TracyUtility.hpp" #include "TracyViewData.hpp" +#include "TracyWindowConstraints.hpp" #include "../server/TracyFileWrite.hpp" #include "../server/TracyTaskDispatch.hpp" #include "../server/TracyShortPtr.hpp" @@ -1092,6 +1093,8 @@ private: std::array m_ranges; + WindowConstraints m_flameGraphConstraint; + #ifndef __EMSCRIPTEN__ TracyLlm m_llm; diff --git a/profiler/src/profiler/TracyView_FlameGraph.cpp b/profiler/src/profiler/TracyView_FlameGraph.cpp index ee501067..8badb3a7 100644 --- a/profiler/src/profiler/TracyView_FlameGraph.cpp +++ b/profiler/src/profiler/TracyView_FlameGraph.cpp @@ -910,6 +910,7 @@ void View::DrawFlameGraph() { const auto scale = GetScale(); ImGui::SetNextWindowSize( ImVec2( 1400 * scale, 800 * scale ), ImGuiCond_FirstUseEver ); + m_flameGraphConstraint.Constrain(); ImGui::Begin( "Flame graph", &m_showFlameGraph, ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoScrollWithMouse ); if( ImGui::GetCurrentWindowRead()->SkipItems ) { ImGui::End(); return; } @@ -999,6 +1000,8 @@ void View::DrawFlameGraph() m_flameGraphPan = 0; } + m_flameGraphConstraint.MarkMinWidth(); + UpdateThreadOrder(); const auto& td = m_threadOrder; auto expand = ImGui::TreeNode( ICON_FA_SHUFFLE " Visible threads:" );