mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 02:31:48 +00:00
Text editor needs fixed-width font.
This commit is contained in:
parent
f3cc5cfd07
commit
5cd61c4b07
@ -294,7 +294,7 @@ enum { MinFrameSize = 5 };
|
||||
|
||||
static View* s_instance = nullptr;
|
||||
|
||||
View::View( const char* addr )
|
||||
View::View( const char* addr, ImFont* fixedWidth )
|
||||
: m_worker( addr )
|
||||
, m_staticView( false )
|
||||
, m_frameScale( 0 )
|
||||
@ -330,6 +330,7 @@ View::View( const char* addr )
|
||||
, m_statSort( 0 )
|
||||
, m_statSelf( false )
|
||||
, m_namespace( Namespace::Full )
|
||||
, m_textEditorFont( fixedWidth )
|
||||
{
|
||||
assert( s_instance == nullptr );
|
||||
s_instance = this;
|
||||
@ -340,7 +341,7 @@ View::View( const char* addr )
|
||||
InitTextEditor();
|
||||
}
|
||||
|
||||
View::View( FileRead& f )
|
||||
View::View( FileRead& f, ImFont* fixedWidth )
|
||||
: m_worker( f )
|
||||
, m_staticView( true )
|
||||
, m_frameScale( 0 )
|
||||
@ -375,6 +376,7 @@ View::View( FileRead& f )
|
||||
, m_statSort( 0 )
|
||||
, m_statSelf( false )
|
||||
, m_namespace( Namespace::Full )
|
||||
, m_textEditorFont( fixedWidth )
|
||||
{
|
||||
assert( s_instance == nullptr );
|
||||
s_instance = this;
|
||||
|
@ -15,6 +15,7 @@
|
||||
#include "tracy_flat_hash_map.hpp"
|
||||
|
||||
struct ImVec2;
|
||||
struct ImFont;
|
||||
|
||||
namespace tracy
|
||||
{
|
||||
@ -42,9 +43,9 @@ class View
|
||||
};
|
||||
|
||||
public:
|
||||
View() : View( "127.0.0.1" ) {}
|
||||
View( const char* addr );
|
||||
View( FileRead& f );
|
||||
View( ImFont* fixedWidth = nullptr ) : View( "127.0.0.1", fixedWidth ) {}
|
||||
View( const char* addr, ImFont* fixedWidth = nullptr );
|
||||
View( FileRead& f, ImFont* fixedWidth = nullptr );
|
||||
~View();
|
||||
|
||||
static bool Draw();
|
||||
@ -236,6 +237,7 @@ private:
|
||||
|
||||
std::unique_ptr<TextEditor> m_textEditor;
|
||||
const char* m_textEditorFile;
|
||||
ImFont* m_textEditorFont;
|
||||
|
||||
struct FindZone {
|
||||
enum : uint64_t { Unselected = std::numeric_limits<uint64_t>::max() - 1 };
|
||||
|
Loading…
Reference in New Issue
Block a user