From 4ae317109d3c7489481c3c97d2593b87e8e77099 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Fri, 29 Jun 2018 18:57:49 +0200 Subject: [PATCH] Improve compare menu histogram tooltip. --- server/TracyView.cpp | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index e7fb067a..ddbc4843 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -4839,11 +4839,21 @@ void View::DrawCompare() } ImGui::BeginTooltip(); - ImGui::Text( "Time range: %s - %s", TimeToString( t0 ), TimeToString( t1 ) ); - ImGui::Text( "Count: %g / %g", floor( bins[bin].v0 ), floor( bins[bin].v1 ) ); - ImGui::Text( "Time spent in bin: %s / %s", TimeToString( binTime[bin].v0 ), TimeToString( binTime[bin].v1 ) ); - ImGui::Text( "Time spent in the left bins: %s / %s", TimeToString( tBefore[0] ), TimeToString( tBefore[1] ) ); - ImGui::Text( "Time spent in the right bins: %s / %s", TimeToString( tAfter[0] ), TimeToString( tAfter[1] ) ); + ImGui::TextDisabled( "Time range:" ); + ImGui::SameLine(); + ImGui::Text( "%s - %s", TimeToString( t0 ), TimeToString( t1 ) ); + ImGui::TextDisabled( "Count:" ); + ImGui::SameLine(); + ImGui::Text( "%g / %g", floor( bins[bin].v0 ), floor( bins[bin].v1 ) ); + ImGui::TextDisabled( "Time spent in bin:" ); + ImGui::SameLine(); + ImGui::Text( "%s / %s", TimeToString( binTime[bin].v0 ), TimeToString( binTime[bin].v1 ) ); + ImGui::TextDisabled( "Time spent in the left bins:" ); + ImGui::SameLine(); + ImGui::Text( "%s / %s", TimeToString( tBefore[0] ), TimeToString( tBefore[1] ) ); + ImGui::TextDisabled( "Time spent in the right bins:" ); + ImGui::SameLine(); + ImGui::Text( "%s / %s", TimeToString( tAfter[0] ), TimeToString( tAfter[1] ) ); ImGui::TextDisabled( "(Data is displayed as: [this trace] / [external trace])" ); ImGui::EndTooltip(); }