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

Color plot background.

This commit is contained in:
Bartosz Taudul
2022-07-24 01:39:51 +02:00
parent 755df94f45
commit a3b6a9c95c
2 changed files with 13 additions and 1 deletions
+5 -1
View File
@@ -174,6 +174,11 @@ int View::DrawPlots( int offset, double pxns, const ImVec2& wpos, bool hover, fl
auto& vec = v->data;
vec.ensure_sorted();
const auto color = GetPlotColor( v );
const auto bg = 0x22000000 | ( DarkenColorMore( color ) & 0xFFFFFF );
draw->AddRectFilled( ImVec2( 0, yPos ), ImVec2( w, yPos + PlotHeight ), bg );
if( v->type == PlotType::Memory )
{
auto& mem = m_worker.GetMemoryNamed( v->name );
@@ -273,7 +278,6 @@ int View::DrawPlots( int offset, double pxns, const ImVec2& wpos, bool hover, fl
}
const auto revrange = 1.0 / ( max - min );
const auto color = GetPlotColor( v );
if( it == vec.begin() )
{