From d27cb4a094a7933cfec50d4806f2c6f072cb5638 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Mon, 15 Aug 2022 16:54:12 +0200 Subject: [PATCH] Normalize names in ghost zone tooltips. --- server/TracyView_ZoneTimeline.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/server/TracyView_ZoneTimeline.cpp b/server/TracyView_ZoneTimeline.cpp index 41a3decd..2430e260 100644 --- a/server/TracyView_ZoneTimeline.cpp +++ b/server/TracyView_ZoneTimeline.cpp @@ -258,12 +258,19 @@ int View::DrawGhostLevel( const Vector& vec, bool hover, double pxns, TextDisabledUnformatted( ICON_FA_HAT_WIZARD " kernel" ); } ImGui::Separator(); - ImGui::TextUnformatted( origSymName ); + const auto normalized = m_shortenName == ShortenName::Never ? origSymName : ShortenZoneName( ShortenName::OnlyNormalize, origSymName ); + ImGui::TextUnformatted( normalized ); if( isInline ) { ImGui::SameLine(); 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 ); if( symbol ) TextFocused( "Image:", m_worker.GetString( symbol->imageName ) ); TextDisabledUnformatted( "Location:" );