Constrain sample entry stacks window size.

This commit is contained in:
Bartosz Taudul
2026-07-18 14:11:33 +02:00
parent ab46247a9c
commit 7539daa602
3 changed files with 4 additions and 0 deletions
+1
View File
@@ -1537,6 +1537,7 @@ void View::DpiScaleChanged()
m_llmConstraint.Reset();
m_waitStacksConstraint.Reset();
m_frameStatsConstraint.Reset();
m_sampleEntryConstraint.Reset();
}
void View::AddLlmAttachment( const nlohmann::json& json )
+1
View File
@@ -1102,6 +1102,7 @@ private:
WindowConstraints m_llmConstraint;
WindowConstraints m_waitStacksConstraint;
WindowConstraints m_frameStatsConstraint;
WindowConstraints m_sampleEntryConstraint;
#ifndef __EMSCRIPTEN__
TracyLlm m_llm;
@@ -842,6 +842,7 @@ void View::DrawSampleParents()
bool show = true;
const auto scale = GetScale();
ImGui::SetNextWindowSize( ImVec2( 1400 * scale, 500 * scale ), ImGuiCond_FirstUseEver );
m_sampleEntryConstraint.Constrain();
ImGui::Begin( "Sample entry stacks", &show, ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoScrollWithMouse );
if( !ImGui::GetCurrentWindowRead()->SkipItems )
{
@@ -1022,6 +1023,7 @@ void View::DrawSampleParents()
ImGui::SameLine();
ImGui::RadioButton( "Symbol address", &m_showCallstackFrameAddress, 2 );
ImGui::PopStyleVar();
m_sampleEntryConstraint.MarkMinWidth();
ImGui::Separator();
if( ImGui::BeginTable( "##callstack", 4, ImGuiTableFlags_Resizable | ImGuiTableFlags_Reorderable | ImGuiTableFlags_Hideable | ImGuiTableFlags_Borders | ImGuiTableFlags_ScrollY ) )