From 6bbed5db82a386da498b4ee933124e42f1c091a6 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sun, 26 Nov 2017 02:31:48 +0100 Subject: [PATCH] Increase plot min/max value legibility. --- server/TracyView.cpp | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index 550f6978..462410ec 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -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 ); 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; - { - char tmp[64]; - sprintf( tmp, "%s", RealToString( min, true ) ); - draw->AddText( wpos + ImVec2( 0, offset ), 0x8844DDDD, tmp ); - } + sprintf( tmp, "%s", RealToString( min, true ) ); + DrawTextContrast( draw, wpos + ImVec2( 0, offset ), 0x8844DDDD, tmp ); + draw->AddLine( wpos + ImVec2( 0, offset + ty - 1 ), wpos + ImVec2( w, offset + ty - 1 ), 0x8844DDDD ); offset += ty; }