mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
Change way of updating fonts in View.
This makes the whole process more easy to follow. It also fixes a crash bug that was occuring when Wayland output scale changed.
This commit is contained in:
@@ -100,7 +100,7 @@ public:
|
||||
};
|
||||
|
||||
using SetTitleCallback = void(*)( const char* );
|
||||
using SetScaleCallback = void(*)( float, ImFont*&, ImFont*&, ImFont*& );
|
||||
using SetScaleCallback = void(*)( float );
|
||||
using AttentionCallback = void(*)();
|
||||
|
||||
View( void(*cbMainThread)(const std::function<void()>&, bool), const char* addr, uint16_t port, ImFont* fixedWidth, ImFont* smallFont, ImFont* bigFont, SetTitleCallback stcb, SetScaleCallback sscb, AttentionCallback acb, const Config& config );
|
||||
@@ -110,6 +110,8 @@ public:
|
||||
bool Draw();
|
||||
bool WasActive() const;
|
||||
|
||||
void UpdateFont( ImFont* fixed, ImFont* small, ImFont* big ) { m_fixedFont = fixed; m_smallFont = small; m_bigFont = big; }
|
||||
|
||||
void NotifyRootWindowSize( float w, float h ) { m_rootWidth = w; m_rootHeight = h; }
|
||||
void ViewSource( const char* fileName, int line );
|
||||
void ViewSource( const char* fileName, int line, const char* functionName );
|
||||
|
||||
Reference in New Issue
Block a user