mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-26 16:04:34 +00:00
Tighten assembly counts in source view.
This commit is contained in:
parent
14ec7ea6cd
commit
a6c0ac4273
@ -881,6 +881,8 @@ void SourceView::RenderLine( const Line& line, int lineNum, uint32_t ipcnt, uint
|
||||
match += ( addr >= m_baseAddr && addr < m_baseAddr + m_codeLen );
|
||||
}
|
||||
}
|
||||
const auto tmp = RealToString( m_asm.size() );
|
||||
const auto maxAsm = strlen( tmp ) + 1;
|
||||
if( match > 0 )
|
||||
{
|
||||
const auto asmString = RealToString( match );
|
||||
@ -888,11 +890,11 @@ void SourceView::RenderLine( const Line& line, int lineNum, uint32_t ipcnt, uint
|
||||
const auto asmsz = strlen( buf );
|
||||
TextDisabledUnformatted( buf );
|
||||
ImGui::SameLine( 0, 0 );
|
||||
ImGui::ItemSize( ImVec2( stw * ( 8 - asmsz ), ty ), 0 );
|
||||
ImGui::ItemSize( ImVec2( stw * ( maxAsm - asmsz ), ty ), 0 );
|
||||
}
|
||||
else
|
||||
{
|
||||
ImGui::ItemSize( ImVec2( stw * 8, ty ), 0 );
|
||||
ImGui::ItemSize( ImVec2( stw * maxAsm, ty ), 0 );
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user