Push big font to source view.

This commit is contained in:
Bartosz Taudul 2022-08-15 22:48:00 +02:00
parent d3cb8ccef2
commit fa0322f6b4
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3
2 changed files with 3 additions and 2 deletions

View File

@ -143,7 +143,7 @@ private:
public: public:
SourceView(); SourceView();
void UpdateFont( ImFont* fixed, ImFont* small ) { m_font = fixed; m_smallFont = small; } void UpdateFont( ImFont* fixed, ImFont* small, ImFont* big ) { m_font = fixed; m_smallFont = small; m_bigFont = big; }
void SetCpuId( uint32_t cpuid ); void SetCpuId( uint32_t cpuid );
void OpenSource( const char* fileName, int line, const View& view, const Worker& worker ); void OpenSource( const char* fileName, int line, const View& view, const Worker& worker );
@ -200,6 +200,7 @@ private:
ImFont* m_font; ImFont* m_font;
ImFont* m_smallFont; ImFont* m_smallFont;
ImFont* m_bigFont;
uint64_t m_symAddr; uint64_t m_symAddr;
uint64_t m_baseAddr; uint64_t m_baseAddr;
uint64_t m_targetAddr; uint64_t m_targetAddr;

View File

@ -1180,7 +1180,7 @@ void View::DrawTextEditor()
ImGui::Begin( "Source view", &show, ImGuiWindowFlags_NoScrollbar ); ImGui::Begin( "Source view", &show, ImGuiWindowFlags_NoScrollbar );
if( !ImGui::GetCurrentWindowRead()->SkipItems ) if( !ImGui::GetCurrentWindowRead()->SkipItems )
{ {
m_sourceView->UpdateFont( m_fixedFont, m_smallFont ); m_sourceView->UpdateFont( m_fixedFont, m_smallFont, m_bigFont );
m_sourceView->Render( m_worker, *this ); m_sourceView->Render( m_worker, *this );
} }
ImGui::End(); ImGui::End();