1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00

Expose zone name normalization as a separate setting.

This commit is contained in:
Bartosz Taudul
2022-08-15 16:24:44 +02:00
parent 89016454f8
commit 07a1383304
4 changed files with 11 additions and 7 deletions
+2 -2
View File
@@ -217,7 +217,7 @@ int View::DrawGhostLevel( const Vector<GhostZone>& vec, bool hover, double pxns,
DrawLine( draw, dpos + ImVec2( px0, offset + tsz.y ), dpos + ImVec2( px1-1, offset + tsz.y ), dpos + ImVec2( px1-1, offset ), darkColor, 1.f );
auto origSymName = symName;
if( m_shortenName == ShortenName::Always || ( m_shortenName == ShortenName::WhenNoSpace && tsz.x > zsz ) )
if( m_shortenName != ShortenName::Never && ( m_shortenName != ShortenName::NoSpace || tsz.x > zsz ) )
{
symName = ShortenZoneName( symName, tsz, zsz );
}
@@ -510,7 +510,7 @@ int View::DrawZoneLevel( const V& vec, bool hover, double pxns, int64_t nspx, co
}
auto tsz = ImGui::CalcTextSize( zoneName );
if( m_shortenName == ShortenName::Always || ( m_shortenName == ShortenName::WhenNoSpace && tsz.x > zsz ) )
if( m_shortenName != ShortenName::Never && ( m_shortenName != ShortenName::NoSpace || tsz.x > zsz ) )
{
zoneName = ShortenZoneName( zoneName, tsz, zsz );
}