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:
parent
408939862b
commit
c38764db3c
@ -528,10 +528,15 @@ void View::DrawSamplesStatistics( Vector<SymList>& data, int64_t timeRange, Accu
|
|||||||
while( end > imageName && *end != '/' && *end != '\\' ) end--;
|
while( end > imageName && *end != '/' && *end != '\\' ) end--;
|
||||||
if( *end == '/' || *end == '\\' ) end++;
|
if( *end == '/' || *end == '\\' ) end++;
|
||||||
TextDisabledUnformatted( end );
|
TextDisabledUnformatted( end );
|
||||||
|
TooltipIfHovered( imageName );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
const char* end = imageName + strlen( imageName );
|
||||||
|
const auto cw = ImGui::GetContentRegionAvail().x;
|
||||||
|
const auto tw = ImGui::CalcTextSize( imageName, end ).x;
|
||||||
TextDisabledUnformatted( imageName );
|
TextDisabledUnformatted( imageName );
|
||||||
|
if( tw > cw ) TooltipIfHovered( imageName );
|
||||||
}
|
}
|
||||||
ImGui::TableNextColumn();
|
ImGui::TableNextColumn();
|
||||||
const auto baseCnt = cnt;
|
const auto baseCnt = cnt;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user