Push small font to SourceView.

This commit is contained in:
Bartosz Taudul 2021-11-20 14:47:13 +01:00
parent f0d524ad1f
commit 7b2ed41179
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3
3 changed files with 4 additions and 2 deletions

View File

@ -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 )

View File

@ -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;

View File

@ -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;