mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 10:41:50 +00:00
Push small font to SourceView.
This commit is contained in:
parent
f0d524ad1f
commit
7b2ed41179
@ -163,6 +163,7 @@ enum { JumpArrowBase = 9 };
|
||||
|
||||
SourceView::SourceView( GetWindowCallback gwcb )
|
||||
: m_font( nullptr )
|
||||
, m_smallFont( nullptr )
|
||||
, m_symAddr( 0 )
|
||||
, m_targetAddr( 0 )
|
||||
, m_targetLine( 0 )
|
||||
|
@ -144,7 +144,7 @@ public:
|
||||
|
||||
SourceView( GetWindowCallback gwcb );
|
||||
|
||||
void UpdateFont( ImFont* font ) { m_font = font; }
|
||||
void UpdateFont( ImFont* fixed, ImFont* small ) { m_font = fixed; m_smallFont = small; }
|
||||
void SetCpuId( uint32_t cpuid );
|
||||
|
||||
void OpenSource( const char* fileName, int line, const View& view, const Worker& worker );
|
||||
@ -198,6 +198,7 @@ private:
|
||||
tracy_force_inline void UnsetFont();
|
||||
|
||||
ImFont* m_font;
|
||||
ImFont* m_smallFont;
|
||||
uint64_t m_symAddr;
|
||||
uint64_t m_baseAddr;
|
||||
uint64_t m_targetAddr;
|
||||
|
@ -15277,7 +15277,7 @@ void View::DrawTextEditor()
|
||||
ImGui::SetNextWindowSize( ImVec2( 1800 * scale, 800 * scale ), ImGuiCond_FirstUseEver );
|
||||
bool show = true;
|
||||
ImGui::Begin( "Source view", &show, ImGuiWindowFlags_NoScrollbar );
|
||||
m_sourceView->UpdateFont( m_fixedFont );
|
||||
m_sourceView->UpdateFont( m_fixedFont, m_smallFont );
|
||||
m_sourceView->Render( m_worker, *this );
|
||||
ImGui::End();
|
||||
if( !show ) m_sourceViewFile = nullptr;
|
||||
|
Loading…
Reference in New Issue
Block a user