From 268af5b67cddb8bd01da2e8a77a36bf1ff75f3ef Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sat, 4 Apr 2020 14:19:23 +0200 Subject: [PATCH] Adapt to DPI scaling. --- server/TracySourceView.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/server/TracySourceView.cpp b/server/TracySourceView.cpp index 6ad6d293..e05b8631 100644 --- a/server/TracySourceView.cpp +++ b/server/TracySourceView.cpp @@ -18,7 +18,7 @@ namespace tracy { enum { JumpSeparation = 6 }; -enum { JumpArrow = 9 }; +enum { JumpArrowBase = 9 }; SourceView::SourceView( ImFont* font ) : m_font( font ) @@ -406,7 +406,7 @@ void SourceView::Render( const Worker& worker ) } else { - const auto th = ImGui::GetTextLineHeightWithSpacing(); + const auto th = (int)ImGui::GetTextLineHeightWithSpacing(); ImGuiListClipper clipper( (int)m_asm.size(), th ); while( clipper.Step() ) { @@ -443,6 +443,7 @@ void SourceView::Render( const Worker& worker ) const auto minAddr = m_asm[clipper.DisplayStart].addr; const auto maxAddr = m_asm[clipper.DisplayEnd-1].addr; const auto mjl = m_maxJumpLevel; + const auto JumpArrow = JumpArrowBase * ts.y / 15; int i = -1; for( auto& v : m_jumpTable )