mirror of
https://github.com/wolfpld/tracy.git
synced 2024-09-20 05:42:18 +00:00
Try to display only frame time, if no space for full text.
This commit is contained in:
parent
2a6ccf8ee9
commit
db16aecf64
@ -1777,9 +1777,15 @@ bool View::DrawZoneFrames()
|
||||
if( fsz >= 5 )
|
||||
{
|
||||
auto buf = GetFrameText( i, ftime );
|
||||
const auto tx = ImGui::CalcTextSize( buf ).x;
|
||||
auto tx = ImGui::CalcTextSize( buf ).x;
|
||||
uint32_t color = i == 0 ? 0xFF4444FF : 0xFFFFFFFF;
|
||||
|
||||
if( fsz - 5 <= tx )
|
||||
{
|
||||
buf = TimeToString( ftime );
|
||||
tx = ImGui::CalcTextSize( buf ).x;
|
||||
}
|
||||
|
||||
if( fbegin >= m_zvStart )
|
||||
{
|
||||
draw->AddLine( wpos + ImVec2( ( fbegin - m_zvStart ) * pxns + 2, 1 ), wpos + ImVec2( ( fbegin - m_zvStart ) * pxns + 2, ty - 1 ), color );
|
||||
|
Loading…
Reference in New Issue
Block a user