mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-25 15:34:36 +00:00
Fix macOS DPI scaling
This commit is contained in:
parent
1491e5d708
commit
ed54848536
@ -136,6 +136,13 @@ static void SetupDPIScale( float scale, ImFont*& cb_fixedWidth, ImFont*& cb_bigF
|
||||
{
|
||||
LoadFonts( scale, cb_fixedWidth, cb_bigFont, cb_smallFont );
|
||||
|
||||
#ifdef __APPLE__
|
||||
// No need to upscale the style on macOS, but we need to downscale the fonts.
|
||||
ImGuiIO& io = ImGui::GetIO();
|
||||
io.FontGlobalScale = 1.0f / dpiScale;
|
||||
scale = 1.0f;
|
||||
#endif
|
||||
|
||||
auto& style = ImGui::GetStyle();
|
||||
style = ImGuiStyle();
|
||||
ImGui::StyleColorsDark();
|
||||
|
Loading…
Reference in New Issue
Block a user