1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00

More compact locks drawing.

This commit is contained in:
Bartosz Taudul
2022-07-24 00:13:11 +02:00
parent efaf1df8d4
commit 0a00925a9b
2 changed files with 10 additions and 6 deletions
+6 -6
View File
@@ -293,6 +293,11 @@ void View::DrawTimeline()
const auto nspx = 1.0 / pxns;
ImGui::PushFont( m_smallFont );
const auto sty = ImGui::GetTextLineHeight();
const auto sstep = sty + 1;
ImGui::PopFont();
const auto ty = ImGui::GetTextLineHeight();
const auto ostep = ty + 1;
int offset = 0;
@@ -318,11 +323,6 @@ void View::DrawTimeline()
const auto oldOffset = offset;
ImGui::PushClipRect( wpos, wpos + ImVec2( w, oldOffset + vis.height ), true );
ImGui::PushFont( m_smallFont );
const auto sty = ImGui::GetTextLineHeight();
const auto sstep = sty + 1;
ImGui::PopFont();
const auto singleThread = v->threadData.size() == 1;
int depth = 0;
offset += ostep;
@@ -663,7 +663,7 @@ void View::DrawTimeline()
if( m_vd.drawLocks )
{
const auto lockDepth = DrawLocks( v->id, hover, pxns, wpos, offset, nextLockHighlight, yMin, yMax );
offset += ostep * lockDepth;
offset += sstep * lockDepth;
depth += lockDepth;
}
}