Fix tooltip active area.

This commit is contained in:
Bartosz Taudul 2019-01-23 18:04:31 +01:00
parent 5019b2e507
commit 56b530e99c

View File

@ -3847,15 +3847,15 @@ void View::DrawZoneInfoWindow()
const auto selftime = ztime - GetZoneChildTime( ev ); const auto selftime = ztime - GetZoneChildTime( ev );
TextFocused( "Time from start of program:", TimeToString( ev.start - m_worker.GetTimeBegin() ) ); TextFocused( "Time from start of program:", TimeToString( ev.start - m_worker.GetTimeBegin() ) );
TextFocused( "Execution time:", TimeToString( ztime ) ); TextFocused( "Execution time:", TimeToString( ztime ) );
TextFocused( "Self time:", TimeToString( selftime ) );
ImGui::SameLine();
ImGui::TextDisabled( "(%.2f%%)", 100.f * selftime / ztime );
if( ImGui::IsItemHovered() ) if( ImGui::IsItemHovered() )
{ {
ImGui::BeginTooltip(); ImGui::BeginTooltip();
TextFocused( "Without profiling:", TimeToString( ztime - m_worker.GetDelay() * dmul ) ); TextFocused( "Without profiling:", TimeToString( ztime - m_worker.GetDelay() * dmul ) );
ImGui::EndTooltip(); ImGui::EndTooltip();
} }
TextFocused( "Self time:", TimeToString( selftime ) );
ImGui::SameLine();
ImGui::TextDisabled( "(%.2f%%)", 100.f * selftime / ztime );
auto& mem = m_worker.GetMemData(); auto& mem = m_worker.GetMemData();
if( mem.plot ) if( mem.plot )