1
0
mirror of https://github.com/wolfpld/tracy synced 2025-05-05 22:53:52 +00:00

Increase plot min/max value legibility.

This commit is contained in:
Bartosz Taudul 2017-11-26 02:31:48 +01:00
parent 4b548156b1
commit 6bbed5db82

View File

@ -3246,12 +3246,6 @@ int View::DrawPlots( int offset, double pxns, const ImVec2& wpos, bool hover )
} }
} }
{
char tmp[64];
sprintf( tmp, "%s", RealToString( max, true ) );
draw->AddText( wpos + ImVec2( 0, offset ), 0x8844DDDD, tmp );
}
const auto revrange = 1.0 / ( max - min ); const auto revrange = 1.0 / ( max - min );
if( it == vec.begin() ) if( it == vec.begin() )
@ -3334,12 +3328,13 @@ int View::DrawPlots( int offset, double pxns, const ImVec2& wpos, bool hover )
} }
} }
char tmp[64];
sprintf( tmp, "%s", RealToString( max, true ) );
DrawTextContrast( draw, wpos + ImVec2( 0, offset ), 0x8844DDDD, tmp );
offset += PlotHeight - ty; offset += PlotHeight - ty;
{ sprintf( tmp, "%s", RealToString( min, true ) );
char tmp[64]; DrawTextContrast( draw, wpos + ImVec2( 0, offset ), 0x8844DDDD, tmp );
sprintf( tmp, "%s", RealToString( min, true ) );
draw->AddText( wpos + ImVec2( 0, offset ), 0x8844DDDD, tmp );
}
draw->AddLine( wpos + ImVec2( 0, offset + ty - 1 ), wpos + ImVec2( w, offset + ty - 1 ), 0x8844DDDD ); draw->AddLine( wpos + ImVec2( 0, offset + ty - 1 ), wpos + ImVec2( w, offset + ty - 1 ), 0x8844DDDD );
offset += ty; offset += ty;
} }