1
0
mirror of https://github.com/wolfpld/tracy synced 2025-04-30 04:43:53 +00:00

Normalize names in ghost zone tooltips.

This commit is contained in:
Bartosz Taudul 2022-08-15 16:54:12 +02:00
parent 57cabc1e09
commit d27cb4a094
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3

View File

@ -258,12 +258,19 @@ int View::DrawGhostLevel( const Vector<GhostZone>& vec, bool hover, double pxns,
TextDisabledUnformatted( ICON_FA_HAT_WIZARD " kernel" ); TextDisabledUnformatted( ICON_FA_HAT_WIZARD " kernel" );
} }
ImGui::Separator(); ImGui::Separator();
ImGui::TextUnformatted( origSymName ); const auto normalized = m_shortenName == ShortenName::Never ? origSymName : ShortenZoneName( ShortenName::OnlyNormalize, origSymName );
ImGui::TextUnformatted( normalized );
if( isInline ) if( isInline )
{ {
ImGui::SameLine(); ImGui::SameLine();
TextDisabledUnformatted( "[inline]" ); TextDisabledUnformatted( "[inline]" );
} }
if( normalized != origSymName && strcmp( normalized, origSymName ) != 0 )
{
ImGui::PushFont( m_smallFont );
TextDisabledUnformatted( origSymName );
ImGui::PopFont();
}
const auto symbol = m_worker.GetSymbolData( sym.symAddr ); const auto symbol = m_worker.GetSymbolData( sym.symAddr );
if( symbol ) TextFocused( "Image:", m_worker.GetString( symbol->imageName ) ); if( symbol ) TextFocused( "Image:", m_worker.GetString( symbol->imageName ) );
TextDisabledUnformatted( "Location:" ); TextDisabledUnformatted( "Location:" );