Extract ShortenZoneName() function to a separate file.

This commit is contained in:
Bartosz Taudul
2022-08-15 16:34:37 +02:00
parent 07a1383304
commit 8531ef6591
7 changed files with 155 additions and 125 deletions

View File

@@ -219,7 +219,7 @@ int View::DrawGhostLevel( const Vector<GhostZone>& vec, bool hover, double pxns,
auto origSymName = symName;
if( m_shortenName != ShortenName::Never && ( m_shortenName != ShortenName::NoSpace || tsz.x > zsz ) )
{
symName = ShortenZoneName( symName, tsz, zsz );
symName = ShortenZoneName( m_shortenName, symName, tsz, zsz );
}
if( tsz.x < zsz )
@@ -512,7 +512,7 @@ int View::DrawZoneLevel( const V& vec, bool hover, double pxns, int64_t nspx, co
auto tsz = ImGui::CalcTextSize( zoneName );
if( m_shortenName != ShortenName::Never && ( m_shortenName != ShortenName::NoSpace || tsz.x > zsz ) )
{
zoneName = ShortenZoneName( zoneName, tsz, zsz );
zoneName = ShortenZoneName( m_shortenName, zoneName, tsz, zsz );
}
const auto pr0 = ( ev.Start() - m_vd.zvStart ) * pxns;