mirror of
https://github.com/wolfpld/tracy.git
synced 2026-09-10 20:38:18 +00:00
Constrain flame graph window size.
This commit is contained in:
@@ -1528,6 +1528,7 @@ bool View::WasActive() const
|
||||
|
||||
void View::DpiScaleChanged()
|
||||
{
|
||||
m_flameGraphConstraint.Reset();
|
||||
}
|
||||
|
||||
void View::AddLlmAttachment( const nlohmann::json& json )
|
||||
|
||||
@@ -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<RangeEntry, size_t( RangeId::NUM )> m_ranges;
|
||||
|
||||
WindowConstraints m_flameGraphConstraint;
|
||||
|
||||
#ifndef __EMSCRIPTEN__
|
||||
TracyLlm m_llm;
|
||||
|
||||
|
||||
@@ -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:" );
|
||||
|
||||
Reference in New Issue
Block a user