mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
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.
This commit is contained in:
@@ -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 )
|
[[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 + ImVec2( scale, scale ), 0xAA000000, text );
|
||||||
draw->AddText( pos, color, text );
|
draw->AddText( pos, color, text );
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user