Package/core tooltip cosmetics.

This commit is contained in:
Bartosz Taudul 2020-01-24 21:32:36 +01:00
parent c43bd2bfe2
commit 2377911313

View File

@ -4686,13 +4686,16 @@ int View::DrawCpuData( int offset, double pxns, const ImVec2& wpos, bool hover,
{ {
ImGui::PopFont(); ImGui::PopFont();
ImGui::BeginTooltip(); ImGui::BeginTooltip();
TextFocused( "CPU:", RealToString( i, true ) );
if( tt ) if( tt )
{ {
ImGui::SameLine();
ImGui::Spacing();
ImGui::SameLine();
TextFocused( "Package:", RealToString( tt->package, true ) ); TextFocused( "Package:", RealToString( tt->package, true ) );
ImGui::SameLine(); ImGui::SameLine();
TextFocused( "Core:", RealToString( tt->core, true ) ); TextFocused( "Core:", RealToString( tt->core, true ) );
} }
TextFocused( "CPU:", RealToString( i, true ) );
TextFocused( "Context switch regions:", RealToString( num, true ) ); TextFocused( "Context switch regions:", RealToString( num, true ) );
ImGui::Separator(); ImGui::Separator();
TextFocused( "Start time:", TimeToString( start ) ); TextFocused( "Start time:", TimeToString( start ) );
@ -4797,13 +4800,16 @@ int View::DrawCpuData( int offset, double pxns, const ImVec2& wpos, bool hover,
m_drawThreadHighlight = thread; m_drawThreadHighlight = thread;
ImGui::PopFont(); ImGui::PopFont();
ImGui::BeginTooltip(); ImGui::BeginTooltip();
TextFocused( "CPU:", RealToString( i, true ) );
if( tt ) if( tt )
{ {
ImGui::SameLine();
ImGui::Spacing();
ImGui::SameLine();
TextFocused( "Package:", RealToString( tt->package, true ) ); TextFocused( "Package:", RealToString( tt->package, true ) );
ImGui::SameLine(); ImGui::SameLine();
TextFocused( "Core:", RealToString( tt->core, true ) ); TextFocused( "Core:", RealToString( tt->core, true ) );
} }
TextFocused( "CPU:", RealToString( i, true ) );
if( local ) if( local )
{ {
TextFocused( "Program:", m_worker.GetCaptureProgram().c_str() ); TextFocused( "Program:", m_worker.GetCaptureProgram().c_str() );
@ -4872,13 +4878,16 @@ int View::DrawCpuData( int offset, double pxns, const ImVec2& wpos, bool hover,
{ {
ImGui::PopFont(); ImGui::PopFont();
ImGui::BeginTooltip(); ImGui::BeginTooltip();
TextFocused( "CPU:", RealToString( i, true ) );
if( tt ) if( tt )
{ {
ImGui::SameLine();
ImGui::Spacing();
ImGui::SameLine();
TextFocused( "Package:", RealToString( tt->package, true ) ); TextFocused( "Package:", RealToString( tt->package, true ) );
ImGui::SameLine(); ImGui::SameLine();
TextFocused( "Core:", RealToString( tt->core, true ) ); TextFocused( "Core:", RealToString( tt->core, true ) );
} }
TextFocused( "CPU:", RealToString( i, true ) );
TextFocused( "Context switch regions:", RealToString( cs.size(), true ) ); TextFocused( "Context switch regions:", RealToString( cs.size(), true ) );
ImGui::EndTooltip(); ImGui::EndTooltip();
ImGui::PushFont( m_smallFont ); ImGui::PushFont( m_smallFont );