mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 02:31:48 +00:00
Shorten frame names in callstack table.
This commit is contained in:
parent
f2001c95a5
commit
7f99ee2c13
@ -208,10 +208,30 @@ void View::DrawCallstackTable( uint32_t callstack, bool globalEntriesButton )
|
||||
{
|
||||
TextColoredUnformatted( 0xFF8888FF, txt );
|
||||
}
|
||||
else
|
||||
else if( m_shortenName == ShortenName::Never )
|
||||
{
|
||||
ImGui::TextUnformatted( txt );
|
||||
}
|
||||
else
|
||||
{
|
||||
const auto normalized = ShortenZoneName( ShortenName::OnlyNormalize, txt );
|
||||
ImGui::TextUnformatted( normalized );
|
||||
if( ImGui::IsItemHovered() && normalized != txt && strcmp( normalized, txt ) != 0 )
|
||||
{
|
||||
if( ImGui::CalcTextSize( txt ).x > 1400 * GetScale() )
|
||||
{
|
||||
ImGui::SetNextWindowSize( ImVec2( 1400 * GetScale(), 0 ) );
|
||||
ImGui::BeginTooltip();
|
||||
ImGui::TextWrapped( "%s", txt );
|
||||
}
|
||||
else
|
||||
{
|
||||
ImGui::BeginTooltip();
|
||||
ImGui::TextUnformatted( txt );
|
||||
}
|
||||
ImGui::EndTooltip();
|
||||
}
|
||||
}
|
||||
ImGui::PopTextWrapPos();
|
||||
}
|
||||
if( ImGui::IsItemClicked() )
|
||||
|
Loading…
Reference in New Issue
Block a user