From a41db80ff2714e967de713793dd430f0227b2d1d Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sat, 23 Sep 2017 01:29:27 +0200 Subject: [PATCH] Separate thread names from zones in zone view. --- server/TracyView.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index 928f1e5f..c06dade0 100755 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -869,9 +869,14 @@ void View::DrawZones() while( false ); // zones + const auto ostep = ImGui::GetFontSize(); int offset = 20; for( auto& v : m_threads ) { + draw->AddLine( wpos + ImVec2( 0, offset + ostep - 1 ), wpos + ImVec2( w, offset + ostep - 1 ), 0x33FFFFFF ); + draw->AddText( wpos + ImVec2( 0, offset ), 0xFFFFFFFF, GetThreadString( v.id ) ); + offset += ostep; + auto& timeline = v.timeline; auto it = std::lower_bound( timeline.begin(), timeline.end(), m_zvStart, [] ( const auto& l, const auto& r ) { return l->end < r; } ); if( it != timeline.end() ) @@ -910,9 +915,7 @@ void View::DrawZones() } } - draw->AddText( wpos + ImVec2( 0, offset ), 0xFFFFFFFF, GetThreadString( v.id ) ); - - offset += 20; + offset += ostep * 1.2f; } }