From 0f215c739388e28c8dc2c8c5f483f2d30cbb8cd2 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sat, 20 Nov 2021 01:55:47 +0100 Subject: [PATCH] Keep text shadow offset constant. ImGui aligns the text to be pixel perfect. Fractional offset of shadow made it move not in sync with the text proper. --- server/TracyImGui.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/TracyImGui.hpp b/server/TracyImGui.hpp index 2784f464..2b794fd4 100644 --- a/server/TracyImGui.hpp +++ b/server/TracyImGui.hpp @@ -150,7 +150,7 @@ static const ImVec4 SyntaxColorsDimmed[] = { [[maybe_unused]] static inline void DrawTextContrast( ImDrawList* draw, const ImVec2& pos, uint32_t color, const char* text ) { - const auto scale = GetScale(); + const auto scale = round( GetScale() ); draw->AddText( pos + ImVec2( scale, scale ), 0xAA000000, text ); draw->AddText( pos, color, text ); }