1
0
mirror of https://github.com/wolfpld/tracy synced 2025-04-29 04:23:51 +00:00

Add appropriate tooltips for image names.

This commit is contained in:
Bartosz Taudul 2025-02-07 02:21:52 +01:00
parent 408939862b
commit c38764db3c
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3

View File

@ -528,10 +528,15 @@ void View::DrawSamplesStatistics( Vector<SymList>& data, int64_t timeRange, Accu
while( end > imageName && *end != '/' && *end != '\\' ) end--;
if( *end == '/' || *end == '\\' ) end++;
TextDisabledUnformatted( end );
TooltipIfHovered( imageName );
}
else
{
const char* end = imageName + strlen( imageName );
const auto cw = ImGui::GetContentRegionAvail().x;
const auto tw = ImGui::CalcTextSize( imageName, end ).x;
TextDisabledUnformatted( imageName );
if( tw > cw ) TooltipIfHovered( imageName );
}
ImGui::TableNextColumn();
const auto baseCnt = cnt;