diff --git a/server/TracySourceView.cpp b/server/TracySourceView.cpp index 03306704..97b464e2 100644 --- a/server/TracySourceView.cpp +++ b/server/TracySourceView.cpp @@ -687,20 +687,22 @@ void SourceView::RenderSymbolSourceView( uint32_t iptotal, unordered_flat_mapAddRectFilled( ImVec2( x14, ly ), ImVec2( x34, ly+3 ), 0x000000FF | ( a << 24 ) ); + color = 0x000000FF | ( a << 24 ); } else if( ipPercent <= 1.f ) { const auto g = int( ( ipPercent - 0.5f ) * 511 ); - draw->AddRectFilled( ImVec2( x14, ly ), ImVec2( x34, ly+3 ), 0xFF0000FF | ( g << 8 ) ); + color = 0xFF0000FF | ( g << 8 ); } else { - draw->AddRectFilled( ImVec2( x14, ly ), ImVec2( x34, ly+3 ), 0xFF00FFFF ); + color = 0xFF00FFFF; } + draw->AddRectFilled( ImVec2( x14, ly ), ImVec2( x34, ly+3 ), color ); } ImGui::PopClipRect(); @@ -938,20 +940,22 @@ uint64_t SourceView::RenderSymbolAsmView( uint32_t iptotal, unordered_flat_mapAddRectFilled( ImVec2( x14, ly ), ImVec2( x34, ly+3 ), 0x000000FF | ( a << 24 ) ); + color = 0x000000FF | ( a << 24 ); } else if( ipPercent <= 1.f ) { const auto g = int( ( ipPercent - 0.5f ) * 511 ); - draw->AddRectFilled( ImVec2( x14, ly ), ImVec2( x34, ly+3 ), 0xFF0000FF | ( g << 8 ) ); + color = 0xFF0000FF | ( g << 8 ); } else { - draw->AddRectFilled( ImVec2( x14, ly ), ImVec2( x34, ly+3 ), 0xFF00FFFF ); + color = 0xFF00FFFF; } + draw->AddRectFilled( ImVec2( x14, ly ), ImVec2( x34, ly+3 ), color ); } }