From 0d5fbff07f9973455521c722b4a3af35bdc8367a Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Wed, 29 Dec 2021 13:44:58 +0100 Subject: [PATCH] Adjust jump arrow separation to DPI scale. --- server/TracySourceView.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server/TracySourceView.cpp b/server/TracySourceView.cpp index f1fc9dbf..35807985 100644 --- a/server/TracySourceView.cpp +++ b/server/TracySourceView.cpp @@ -166,7 +166,7 @@ static void PrintHwSampleTooltip( size_t cycles, size_t retired, size_t cacheRef } -enum { JumpSeparation = 6 }; +enum { JumpSeparationBase = 6 }; enum { JumpArrowBase = 9 }; SourceView::SourceView( GetWindowCallback gwcb ) @@ -2377,6 +2377,7 @@ uint64_t SourceView::RenderSymbolAsmView( const AddrStatData& as, Worker& worker const auto maxAddr = m_asm[clipper.DisplayEnd-1].addr; const auto mjl = m_maxJumpLevel; const auto JumpArrow = JumpArrowBase * ts.y / 15; + const auto JumpSeparation = JumpSeparationBase * ts.y / 15; int i = -1; for( auto& v : m_jumpTable ) @@ -3564,6 +3565,7 @@ void SourceView::RenderAsmLine( AsmLine& line, const AddrStat& ipcnt, const Addr m_jumpOffset = xoff; const auto JumpArrow = JumpArrowBase * ty / 15; + const auto JumpSeparation = JumpSeparationBase * ts.y / 15; ImGui::SameLine( 0, ty + JumpArrow + m_maxJumpLevel * JumpSeparation ); auto jit = m_jumpOut.find( line.addr ); if( jit != m_jumpOut.end() )